Changes between Initial Version and Version 1 of Tutorial4ConfigurationFilesandSpawning


Ignore:
Timestamp:
Jul 31, 2007 4:06:12 PM (11 years ago)
Author:
Maverick
Comment:

Initial version

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial4ConfigurationFilesandSpawning

    v1 v1  
     1[[TracNav(Index)]] 
     2^This tutorial has been copied with the approval of D1st0rt from [http://d1st0rt.sscentral.com D1st0rt's website].^ 
     3 
     4= Tutorial 4: Configuration Files and Spawning = 
     5''Written by D1st0rt @ Saturday, 20 November 2004''[[BR]] 
     6''Last updated: Saturday, 20 November 2004 '' 
     7 
     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,~~  
     9 
     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: 
     11 
     12{{{ 
     13#!java 
     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 
     18InitialArena=mybotland 
     19 
     20//The info for the first bot 
     21Name1=MyBot 
     22Password1=pass 
     23//The info for the second bot 
     24Name2=MyBot2 
     25Password2=pass2 
     26}}} 
     27 
     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.)  
     29 
     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. 
     31 
     32[wiki:Tutorial3Commands Previous Tutorial] | [wiki:Tutorial5TWBotExtensionBasics Next Tutorial]