Changes between Initial Version and Version 1 of Tutorial4ConfigurationFilesandSpawning

Jul 31, 2007 4:06:12 PM (12 years ago)

Initial version


  • Tutorial4ConfigurationFilesandSpawning

    v1 v1  
     2^This tutorial has been copied with the approval of D1st0rt from [ D1st0rt's website].^ 
     4= Tutorial 4: Configuration Files and Spawning = 
     5''Written by D1st0rt @ Saturday, 20 November 2004''[[BR]] 
     6''Last updated: Saturday, 20 November 2004 '' 
     8~~Now we need to compile our bot. Open a command prompt in your twcore folder and type "bld mybot".~~ (Compilation goes automatic using Eclipse.) ~~Once its compiled,~~  
     10we need to add a configuration file so it knows what to do. In the first section, we made a call "String initial = config.getString("InitialArena");", which loaded data from a cfg file. Make a new text file in your mybot folder called mybot.cfg: 
     14//This is how many mybots you can have running at any one time 
     15//make sure each has a name and password 
     16Max Bots=2 
     17//This is where all of your bots will go when they are spawned 
     20//The info for the first bot 
     23//The info for the second bot 
     28~~An important thing to note here is that the TWCore does not create these accounts for you, in order for the bot to login the username and password must already exist.~~ (The newest TWCore version can create accounts.)  
     30We've got a configuration and a compiled bot, its time to run it! In your twcore folder, you can either double click on runbots or run it from a command prompt. When your hub bot appears in #robopark, pm it with "!spawn mybot", and one should appear in mybotland. When you enter mybotland, the friendly mybot will welcome you. 
     32[wiki:Tutorial3Commands Previous Tutorial] | [wiki:Tutorial5TWBotExtensionBasics Next Tutorial]