Patches: Operating Systems
I make no claims as to the accuracy of the information provided in this post. I have made every attempt to be as accurate as possible, but this information and the files in this post are provided "AS-IS".
Results may vary.
WYSIWYG (What you see is what you get).
REMEMBER BOTS ARE NOT OFFICIALLY SUPPORTED!
THAT MEANS THAT IF YOU HAVE A PROBLEM YOU WILL JUST HAVE TO READ THIS AGAIN AND TRY TO GET IT FIGURED OUT OR WAIT UNTIL THEY ARE OFFICIALLY SUPPORTED.
Now that I've said all that, I thought it would be nice to have all of this information in one location, Coroner, Liquid and LordOfKao$ have provided enough information to help us get the ingame bots working and I have spent quite a bit of time trying to get it all figured out, sorted out and organized for you, so here is a little HOWTO for those that are interested in having in-game bots:
Pull down the console and type:
\developer 2 (I use 2 here because 1 causes me to get spammed with some errors.)
\devmap <mapname> (Example: \devmap obj_snow)
Join the game and once it starts type:
\timelimit 0 (This will disable the timer and cause it to show 0:00, because this may take awhile.)
\bind w "wp_addtopath"
\bot_editwaypoints 2 ( 3 will cause the node and flag info to print in the console)
\addbot (You can add a few if you like, but you will probably need to type \timelimit 1 and start another round, be sure to type \timelimit 0 again before you get too far.)
Now go find that bot and stand in front of his spawn, he'll run out of ammo soon enough.
Now walk around the map pressing W to drop nodes along the way, be sure to drop them in the line of site with each other so the bots can find them and follow these other rules:
* Don't place nodes too close to each other. *
* Don't place nodes too far away from each other.
* 1024 is the limit for nodes in a map.
* 12 is the limit for links in a map. MUST BE LIMIT FOR LINKS TO A NODE.
* It just unnecessarily slows down the bots navigation algorithm.
Link and node flags:
In order to allow the bot to navigate through the map and participate in the game objectives you will need to set flags on some of the links and nodes, to set a link flag you will need stand at one node and point at the node you intend to link it with, then use the \wp_setlinkflags command to set the desired flag, to set a node flag you will need to point to the node and use the \wp_setflags command. The options are as follows:
(Ripped from the bots source code.)
Link flags (Numerical value):
CROUCH="1" (Bot should crouch to the next node.)
SPRINT="2" (Bot should sprint to the next node.) WRONG VALUE CODED, USE "8" INSTEAD.
JUMP="4" (Bot should jump to the next node.) WRONG VALUE CODED, USE "2" INSTEAD.
WALK="8" (Bot should walk to the next node.) WRONG VALUE CODED, USE "4" INSTEAD.
BLOCKED="16" (Path to the next node is blocked.)
LADDER="32" (Bot should climb a ladder to the next node.) NOT REQUIRED.
Node flags (Numerical value):
CAMP="1" (Camping spot for the bot.)
BREAKABLE="2" (Breakable object, bot should shoot through to reach the next node.)
OBJECTIVE="4" (Objective, see objective flags for type and second digit.)
ACTIVATE="8" (Bot should activate node, door, switch, etc.) NOT REQUIRED FOR DOORS.
AXIS_UNREACHABLE="16" (Unreachable for axis bots.)
ALLY_UNREACHABLE="32" (Unreachable for allies bots.)
AXIS_DELIVER="128" (Axis bots should deliver stolen documents/objective to this node.)
ALLY_DELIVER="256" (Allies bots should deliver stolen documents/objective to this node.)
OBJECTIVE_DYNAMITE="0" (Blow this objective up!)
OBJECTIVE_STEAL="1" (Steal the documents!)
OBJECTIVE_CAPTURE="2" (Get the flag - not intented for checkpoint, but for spawn flags.)
I still haven't figured out how these work for objectives.
Walk out different paths and use \wp_terminatepath to start a new path, you can make several paths if you wish and connect them using \wp_link. If you need to relocate a node you can do so by pointing at it and using \wp_relocate. You'll find it wise to save often and watch to make sure the bots are able to navigate your path before saving. If you really mess things up you'll have to start from the beginning again with \wp_clear but if you have a good file saved you can use \wp_clear and then \wp_load <mapname> (Example: \wp_load obj_snow) to load the file from your last save.
You can watch the bot as he will begin to follow you, this is a good way to see if your path is going to cause the bot any problems. (Besides he's mad as hell and out of ammo, so it's also funny.)
To end a path or the path type:
\wp_link to link the last node to the first (Optional), then
Once your finished with all of your paths or your path and have terminated it or them type:
\wp_save <mapname> (Example: \wp_save obj_snow)
This will save your waypoint file to botroutes\ (Example: botroutes\obj_snow.wps)
To load a waypoint file for editing that you have already saved you must be running in unpure mode (\sv_pure 0), you will need to do that before you start the map, after the map starts and you have joined and set your time limit then type \wp_load <mapname> (Example: \wp_load obj_snow), you can relocate a node by pointing at it and typing \wp_relocate, the node will then move to your current location, if you can't see the nodes to relocate them then use \addbot and watch the bot for an ideal of the path then you can try \wp_editwaypoints 3, this will tell you in the console when you are pointing at the node and give you the node number and the flag set for that node if any are set, you can use \con_drawnotify to have your console draw to the screen for easier viewing.
You can use \wp_link to link nodes together to create branches off of your main path or to link several paths together. You can also use \wp_connect <#> <#> to connect two nodes together for one way travel, example would be \wp_connect 0 1, that would connect node zero to node one but not the other way around meaning the bots can only travel from node zero to node one and not back to node zero.
Now when your ready to play against the bots type:
\map <mapname> (Example: \map obj_snow)
Now use \addbot to add some bots. (You can also use \bot_minplayers to have several bots join each round, if your running a server these bots will come and go as players leave or join to keep that many players on the server.), you may need to restart the map to get all of your bots in the game if your too slow about adding them, otherwise they will time out, they don't know how to spectate.
You can also use \addbot <skill level> <team>,where <skill level> is a number between 2 and 9? <team> is either "r" for terrorists or "b" for specops and although it's not very useful "s" for spectators.
The bots will only use their primary weapon, but they don't make missing a habit.
If you are lucky enough to see this while editing your waypoints then you have it easy, LordOfKao$ provided this screenshot, I don't see that and I think it's because of one of my settings, though I haven't been able to figure out which one yet, so if you know please share.
LordOfKao$ has also provided this example waypoint file for obj_snow, to use it create a folder inside of your tcetest folder called botroutes and place the file in there. Keep in mind that this is not complete, it's just for proof of concept and is an example only.
The 3rd Party Map obj_mout has a waypoint file included so be sure to check that out.
Please, If I learn more than what I have here then I will edit this post and if their are any mistakes in this post then I will fix them as soon as I can, so don't bother asking, I'm no Superman. Obviously if I don't know I can't tell you and this is ALL I know about the in-game bots right now, but be sure to check back.
The bots included in game are are based on the free source of Teamwhores RTCW Ubersoldat bot which Coroner adapted to run with ET.
Coroner's Blog! wrote:
The bots are based on the free source of Teamwhores RTCW Ubersoldat bot which I adapted to run with ET.