home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2007 September / maximum-cd-2007-09.iso / Assets / data / AssaultCube_v0.93.exe / docs / cube_bot-readme.txt next >
Encoding:
Text File  |  2007-06-02  |  17.0 KB  |  482 lines

  1. Official 'Cube with Bots' readme.
  2.  
  3. Current version: 0.32
  4.  
  5.  
  6. AUTHOR:
  7.  
  8. Rick Helmus
  9. E-Mail: rickhelmus@gmail.com
  10. MSN: rick_helmus8@hotmail.com
  11. ICQ: 224332897
  12. AIM: rickakame
  13.  
  14.  
  15.  
  16.  
  17. CONTENT
  18.  
  19. 1. Features
  20. 2. Installing & Uninstalling
  21.      2.1 Installing
  22.      2.2 Uninstalling
  23. 3. Starting a game
  24. 4. Bot settings
  25.      4.1 Bot names & teams
  26.      4.2 Bot skills
  27.      4.3 Bot configuration file
  28. 5. Bot commands & CVARS
  29.      5.1 How to execute a command
  30.      5.2 List of all server side commands
  31.      5.3 List of all client side commands
  32.      5.4 How to change a bot CVAR
  33.      5.5 List of all bot CVARS
  34.      5.6 List of all waypoint commands
  35. 6. Waypoints
  36.      6.1 What are waypoints?
  37.      6.2 When should I make my own waypoints?
  38.      6.3 List of all waypoint commands
  39.      6.4 How to use & Tips
  40. 7. Dedicated servers
  41. 8. Source code
  42. 9. Credits
  43. 10. Questions, suggestions, comments etc
  44.  
  45.  
  46.  
  47.  
  48. 1. FEATURES:
  49.  
  50. See the file 'changelog.txt' in your cube/bot folder.
  51.  
  52.  
  53.  
  54.  
  55. 2. INSTALLATION & UNSTALLATION
  56.  
  57.  
  58. 2.1 Installing
  59.  
  60. Extract all the files to your cube folder.
  61. Don't worry it won't overwrite any cube specific files.
  62.  
  63. Note: Since the file structure changed a bit, it might be handy to uninstall previous cube bot versions first.
  64.  
  65. 2.2 Uninstalling
  66.  
  67. If you want for some reason uninstall the bots you have to delete these files:
  68. - The bot folder,
  69. - bin/cubebot.exe
  70. - 'cube_bot_linux',
  71. - 'cube_bot_fbsd',
  72. - 'cube_bot_win.bat',
  73. - 'cube_bot_linux-ded',
  74. - 'cube_bot_fbsd-ded',
  75. - 'cube_bot_win-ded.bat'
  76. - This file
  77.  
  78.  
  79.  
  80.  
  81. 3. STARTING A GAME
  82.  
  83. Run either cube_bot_win.bat (for windows users), cube_bot_fbsd(for FreeBSD users) or cube_bot_lin (for linux users).
  84.  
  85. For linux/unix users: if you have problems with running cube, you might want to 'chmod it'.
  86. Type this in a console in your cube directory:
  87. chmod +x ./cube_bot_lin
  88.  
  89. To add a bot you can simply open the main menu(esc) and open the bot menu, from there
  90. you can add a bot in a team or change the default bot skill.
  91. You can also use the addbot command(see section 6) to add a bot.
  92.  
  93. Bots work for every singleplayer and multiplayer mode. In singleplayer they will help you to fight monsters and finish a level.
  94. In multiplayer they try to kill you instead ;-)
  95.  
  96. For dedicated servers see section 7.
  97.  
  98.  
  99.  
  100. 4. BOT SETTINGS
  101.  
  102. 4.1 Bot names and teams
  103.  
  104. When you add a bot and don't specifiy a name, the bot will pick a name from the file
  105. 'bot_names.txt' in the folder cube/bot. This is a plain text file, you can modify existing names
  106. and add up to 150 names. Note that names in cube can't contain more than 16 characters.
  107. When you add a bot and don't specify his team, it will pick one from the file 'bot_teams.txt'
  108. found in the cube/bot folder. This file can contain 20 different team names with a maximal
  109. length of 5 characters.
  110.  
  111. 4.2 Bot skills
  112.  
  113. There are 5 skills for the bots. The skill for a bot can be specified from the menu or via the console(see section 6).
  114. Each skill can be modified by editing the file 'bot_skills.txt' found in the bot folder.
  115. 4.3 Bot configuration file
  116.  
  117.  
  118. 5. BOT COMMANDS
  119.  
  120. 5.1 How to execute a bot command
  121.  
  122. There are 2 ways to execute a (bot)command:
  123. - Hit the chat key(default t) and type /<commandhere>
  124. - Hit the console key(default ~) and type the command.
  125.  
  126.  
  127. 5.2 List of all server side bot commands
  128.  
  129. Server side commands(works if your the host, otherwise people have to vote for it):
  130.  
  131. addbot <teamname> <skill> <botname>
  132. Adds a bot in the current game. Command arguments:
  133.  
  134. <teamname>:     Specifies the team for the bot, when you leave it blank or
  135.                 use "random" as team the bot will choose a team from the file
  136.                 'bot/bot_teams.txt'.
  137. <skill>:        The skill of the bot; can be best, good, medium, worse, bad, default or random.
  138.                 When blank or "default" is used as skill, the bot will use skill good. When "random" is used,
  139.                 the bot will use a random skill.
  140. <name>:         The name for this bot. When blank the bot will pick a name from the
  141.                 file 'bot/bot_names.txt'
  142.  
  143. Examples:
  144. To add a bot with a random team, default skill(good) and a random name:
  145. addbot
  146. To add a bot in team red, default skill with the name Joe:
  147. addbot red default Joe
  148.  
  149.  
  150. addnbot <count> <teamname> <skill>
  151. Adds multiple bots to the game. Command arguments:
  152.  
  153. <count>:        Number of bots to add.
  154. <teamname>:     Specifies the team for the bots, when you leave it blank or
  155.                 use "random" as team the bot will choose a team from the file
  156.                 'bot/bot_teams.txt'.
  157. <skill>:        The skill of the bot; can be best, good, medium, worse, bad, default or random.
  158.                 When blank or "default" is used as skill, the bot will use skill good. When "random" is used,
  159.                 the bot will use a random skill.
  160.  
  161.  
  162. kickbot <botname>
  163. Will kick the bot with the name <botname> from the server.
  164.  
  165. Example: To kick bot Joe from the server:
  166. kickbot Joe
  167.  
  168.  
  169. kickallbots
  170. Will kick all bots from the server
  171.  
  172.  
  173. botskill <botname> <skill>
  174. Will change the skill of the bot with the name <botname> to <skill>.
  175. <skill> can be best, good, medium, worse or bad.
  176.  
  177. Example:
  178. To change the skill of the bot Joe to best:
  179. botskill Joe best
  180.  
  181.  
  182. botskillall <skill>
  183. Will change the bot skill and the default skill to <skill>.
  184. <skill> can be best, good, medium, worse or bad.
  185.  
  186.  
  187. 5.3 List of all client side commands(Works if you're a host or joined a server):
  188.  
  189.  
  190. drawbeamtobots
  191. Will draw some particles(same as the rifle) to all bots. This more used for
  192. debugging to see where the bots are :-)
  193.  
  194.  
  195. togglegrap
  196. Will toggle the focus of the mouse in game. Normally you can use your mouse to look around,
  197. when you type this command your mouse cursor is visible and can be used as normally. This is only
  198. usefull when you run cube windowed ofcourse.
  199.  
  200.  
  201. togglebotview <botname>
  202. When used you will see what the bot with the name <botname> sees. Type it again
  203. (with or without name) to return to the game(you will respawn).
  204.  
  205.  
  206. 5.4 How to change a bot cvar
  207.  
  208. This works like bot commands: First open the console (with the chat key or the console key),
  209. then just type the variabele name and put the desired value after it.
  210.  
  211.  
  212. 5.5 List of all bot CVARS (Server side variabels, host only)
  213.  
  214. botsshoot 1|0
  215. Enables or disables bot shooting. 1 is enabled, 0 is disabled. Default is 1.
  216.  
  217.  
  218. idlebots 1|0
  219. When enabled, all bots are idle(they won't 'think'). 1 is enabled, 0 is disabled. Default is 0.
  220.  
  221.  
  222. maxbots 0-50
  223. Specifies how many bots can be in a game. Ranges from 0 to 50, default is 7.
  224. Note that there cannot be more bots than maxclients-1(so atleast one human can be in the game).
  225.  
  226.  
  227. allowaddbotvotes 1|0
  228. When enabled, clients are able to add bots through voting. 1 is enabled, 0 is disabled. Default is 1.
  229.  
  230.  
  231. allowbotskillvotes 1|0
  232. When enabled, clients are able to change the bots skill through voting. 1 is enabled, 0 is disabled.
  233. Default is 1.
  234.  
  235.  
  236. allowkickbotvotes 1|0
  237. When enabled, clients are able to kick bots through voting. 1 is enabled, 0 is disabled.
  238. Default is 1.
  239.  
  240.  
  241. monstersperbot 1-25
  242. Specifies how with how much the total monster count should be increased in DMSP mode. This number also depends on the skill:
  243.  
  244. nr of monsters = monster skill x monstersperbot cvar.
  245.  
  246. So for example, if monstersperbot is 7(default) and the monster skill is 8, the total monster count will be 7x8=56. 
  247.  
  248.  
  249. monsterspawnmillis 1-2000
  250. Specifies the delay in milliseconds for when new monsters should be added in DMSP mode. The default is 1000(=1 second).
  251. Decrease this value if you want a monster war :) You should use it with caution though, since many monsters at the same time will
  252. be very CPU intensive.
  253. Note: The formula for the number of new monsters per spawn is: 1 + 1/3 of the number of bots ingame.
  254. So for example, if monsterspawnmillis is 1000 and there are 3 bots ingame, there will be
  255. 1 + 1 (1/3 of 3 = 1) = 2 monsters that will spawn every second.
  256.  
  257.  
  258.  
  259.  
  260. 6. WAYPOINTS
  261.  
  262. 6.1 What are waypoints?
  263.  
  264. Waypoints are used by bots to help them navigate through a map. A waypoint
  265. is simply a spot in a map, by connecting them with other waypoints bots know how to
  266. move from waypoint to waypoint. Note that waypoints can be connected 1 way or 2 way,
  267. if a waypoint is connected 1 way this means that waypoint A can be connected with B, but
  268. B is NOT connected to A.
  269. The waypoints are stored in the directory bot/waypoints in your cube directory.
  270.  
  271. When waypoint viewing is enabled(see the 'wpvisible' command below) you can view all the waypoints
  272. in the current map. Jump waypoints are red lines, the nearest normal waypoint
  273. is a green line and all the others are blue lines. Connections between waypoints are
  274. white lines. If a waypoint has a yaw(see the 'setwpyaw' command below) a short red line from the waypoint
  275. in the direction taken from the yaw will be drawed.
  276.  
  277. 6.2 When should I make my own waypoints?
  278.  
  279. If a map is loaded and no waypoints exist for this map, it will be flooded with waypoints(Automatically waypointed).
  280. For most of the multiplayer maps this is enough(except complex maps like '32') but for SP(Single Player) maps
  281. its better to make your own waypoints. This because these maps are generally more complex and there are one or more goals.
  282.  
  283. However the following SP maps are already waypointed by me or can be played without custom made waypoints:
  284. - cruel01 & cruel02
  285. - kksp1
  286. - nsp2
  287. - wsg1 & wsg2 & wsg3
  288. - mpsp4
  289.  
  290. 6.3 Waypoint commands
  291.  
  292. addwp
  293. Adds a waypoint at the place where you are, all nearby waypoints will be connected with it.
  294.  
  295.  
  296. delwp
  297. Deletes the nearest waypoint.
  298.  
  299.  
  300. wpsave
  301. Saves the waypoints to a file.
  302.  
  303.  
  304. wpload
  305. Loads waypoints from a file, only handy when you want to undo your changes.(Waypoints will
  306. be loaded automaticly when a map is started).
  307.  
  308.  
  309. wpclear
  310. Will clear all waypoints from the map. You usually want to use this to clear all automaticly generated
  311. waypoints when you start making your own waypoints.
  312.  
  313.  
  314. wpvisble 1|0
  315. When enabled(1) you can view all the waypoint in the current map, 0 will
  316. disable this. (Waypoints will be automaticly visible when you use any
  317. waypoint command). Jump waypoints are red lines, the nearest normal waypoint
  318. is a green line and others are blue lines. Connections between waypoints are
  319. white lines.
  320.  
  321.  
  322. autowp 1|0
  323. Enables(1) or disables(0) autowaypointing. When enabled you will drop waypoints while
  324. you walk around in the map.
  325.  
  326.  
  327. wpinfo 1|0
  328. If enabled(1)(disabled=0) you can view info(such as waypoint property flags, trigger numbers, yaw etc) from
  329. a nearby waypoint.
  330.  
  331.  
  332. addtelewps
  333. Adds waypoints on all teleporters and their destination in the current map and connects
  334. the waypoints at a teleporter with the waypoint at its destination.
  335.  
  336.  
  337. addtriggerwps
  338. Adds waypoints at all triggers(such as carrots and switches) in the current map.
  339.  
  340.  
  341. setwptriggernr <nr>
  342. Assigns a number to the nearest waypoint. This is only used for trigger waypoints, so that the bots go to triggers in the
  343. right order. If you don't do this bots will search for every trigger, even when they are not reachable yet.
  344.  
  345.  
  346. setwpyaw
  347. Sets the yaw of this waypoint. If a bot reaches a waypoint with a given yaw, it equalize his yaw with the one from
  348. the waypoint. This is usefull for very narrow spaces or jump waypoints.
  349. The yaw is taken from the yaw of the player.
  350.  
  351.  
  352. addpath1way1
  353. Selects first waypoint to connect with another waypoint.
  354.  
  355.  
  356. addpath1way2
  357. Will connect the waypoint you selected with the command 'addpath1way1' with the
  358. nearest waypoint.
  359.  
  360.  
  361. addpath2way1, addpath2way2
  362. Same as above, though it will connect both waypoints
  363. with each other(that is there is a connection between the one
  364. you select with 'addpath2way1' and the nearest waypoint AND there
  365. is a connection between the nearest waypoint and the one you
  366. selected with 'addpath1way1').
  367.  
  368.  
  369. delpath1way1, delpath1way2, delpath2way1, delpath2way2
  370. Same as above, but will remove connections between waypoints.
  371.  
  372.  
  373. setjumpwp
  374. Makes the nearest waypoint a "jump waypoint" this simply means that a bot will
  375. jump when it reaches this waypoint(usefull when the bot has to jump over an obstacle
  376. for example).
  377.  
  378.  
  379. unsetjumpwp
  380. Removes the jump flag from the nearest waypoint.
  381.  
  382.  
  383. startflood
  384. Starts flooding the map with waypoints. This is normally done when the game starts and no waypoints exist for the current map.
  385.  
  386.  
  387. 6.4 How to use & Tips
  388.  
  389. 6.4.1 Simple howto
  390.  
  391. Lets say you want to make waypoints for map 'foo'. This map is a singleplayer map you found on Quadropolis(http://cube.snieb.com/).
  392.  
  393. Here are some simple steps to waypoint the map:
  394. - Start the game(see section 3) and load the map. Since its a singleplayer map it may be better to load it in
  395.   multiplayer mode, so you won't get killed during waypointing ;)
  396. - Now since the map is automaticly waypointed, the best thing todo is to clear these waypoints first.
  397.   Simply type 'wpclear' in the console to remove them.
  398. - Map foo has several teleporters, therefore its handy to put some waypoints on them and their destination. Luckely there is a
  399.   command which does that and will even connect the waypoint on the teleporter with the waypoint on the teleport-destination.
  400.   Simply type 'addtelewps' in the console to add them.
  401. - Like most maps, foo has several triggers to open doors, unlock monsters etc. The command 'addtriggerwps' will put waypoints on all
  402.   the triggers for you.
  403. - Now you can actually start waypointing. On simple, not complex places you can type 'autowp 1' so it will drop 
  404.   waypoints (within a certain radius) where you walk and connect them(2 way) with each other. However on more complex places
  405.   (for example a place where you have to climb up) its better to place them manually with the command 'addwp'.
  406. - After thats its a good thing to givbe the 'trigger waypoints' a number. Bots will go to the trigger with the
  407.   lowest number(except 0) first, then go to the next one and the next one etc etc. First type 'wpinfo 1' so you can see which
  408.   waypoints are trigger waypoints and which not. Now go to the trigger waypoint which should be triggered first and type
  409.   'setwptriggernr 1'. Then go to the next trigger waypoint and type 'setwptriggernr 2' and continue like that untill you're done.
  410.   Note: If the order doesn't matter(very rare) you can skip this step.
  411. - When you're done type 'wpsave' to save the waypoints, reload the map and add some bots to check if they can finish the map by
  412.   their selves :-)
  413.  
  414. 6.4.2 Waypoint tips
  415.  
  416. - If you start with new waypoints, its mostly better to type 'wpclear' in the console to remove the waypoints which where automaticly  
  417.   generated. If, however, you just want to make some minor modifications you can leave them.
  418. - When you waypint a singleplayer map, its better to load the map in multiplayer mode so you the monsters won't annoy you.
  419. - On narrow spaces its better to manually waypoint with 'addwp' and disable autowaypointing('autowp 0').
  420. - Always check if every waypoint is connected with the right waypoints. Waypoints can be connected with to
  421.   much waypoints or not connected at all. The following commands can be used to solve this: addpath1way1, addpath1way2, addpath2way1,
  422.   addpath2way2, delpath1way1, delpath1way2, delpath2way1 and delpath2way2.
  423. - If a bot should jump somewhere you can set the jump flag with the command 'setjumpwp'. Its handy to set the direction to where
  424.   the bot should jump to with the command 'setwpyaw'.
  425.  
  426.  
  427.  
  428.  
  429. 7. DEDICATED SERVERS
  430.  
  431. As of release 0.3 there is dedicated support! :) Though the standalone server binary is less light than the one
  432. for cube. It also needs some additional directories/files:
  433. - The bot folder
  434. - The packages folder, however it only needs the map files so you can remove all the sounds and textures.
  435. - Server script file
  436.  
  437. If you want to configure bot cvars, add a few bots on startup etc. You should edit the bot.cfg file in the bot folder.
  438. Explanation can be found in the file itself.
  439.  
  440. You can start a server by executing on of the following scripts:
  441. cube_bot_linux-ded (linux)
  442. or
  443. cube_bot_fbsd-server (FreeBSD)
  444. or
  445. cube_bot_win-ded.bat (Windows)
  446.  
  447.  
  448.  
  449.  
  450. 8. SOURCE CODE
  451.  
  452. You can find the modified source in the "bot/bot_src" directory. Atleast 90% off all the changes are
  453. marked by me with comments(mostly something like 'added by Rick').
  454.  
  455.  
  456.  
  457.  
  458. 9. CREDITS
  459.  
  460. Wouter van Oortmerssen aka Aardappel and all the other people
  461. that made cube as what it is now(see the cube readme).
  462.  
  463. Pierre-Marie Baty (PMB): for most of the current navigation code and other misc. code.
  464. Check out his RACC bot for half-life at racc.bots-united.com
  465.  
  466. Botman : 'The father of all half-life bots'. He created the HPB bot(hpb-bot.bots-united.com) which
  467. is the base for almost all half-life bots. A lot of ideas are inspired by him.
  468.  
  469. arghvark : Fix for ATI based gfx cards on linux.
  470.  
  471. Internet Nightmare : Optimizing waypoint file reading/writing
  472.  
  473. People at bots-united forums and cube forums: For feedback, suggestions, reporting bugs
  474. and bot names :)
  475.  
  476.  
  477.  
  478. 10. Questions, suggestions, comments etc
  479.  
  480. Feel free to send them to me :) (check top of file for contact info)
  481. You can also visit the forums: http://forums.bots-united.com/forumdisplay.php?f=77
  482.