Bots:Adding bots to your map
Contents
Making the .aas file
In order to add bots to your map you will need a tool called bspc. In some versions of Radiant this tool is included with the installation. If not you'll need to download a version suitable for your operating system.
Please note: You should ALWAYS add the surface sounds before creating a .aas file.
The bspc tool is invoked from the command line, generally from the same folder as the .bsp of your map. A minimal bot build would use the following command line.
bspc -bsp2aas YOURMAPNAME.bsp -forcesidesvisible -optimize
There are other options / switches avaiable which might or might not help performance.
- reach <filter.bsp> = compute reachability & clusters
- cluster <filter.aas> = compute clusters
- aasopt <filter.aas> = optimize aas file
- aasinfo <filter.aas> = show AAS file info
- output <output path> = set output path
- threads <X> = set number of threads to X
- cfg <filename> = use this cfg file
- optimize = enable optimization
- noverbose = disable verbose output
- breadthfirst = breadth first bsp building
- nobrushmerge = don't merge brushes
- noliquids = don't write liquids to map
- freetree = free the bsp tree
- nocsg = disables brush chopping
- forcesidesvisible = force all sides to be visible
- grapplereach = calculate grapple reachabilities
Of these, grapplereach is probably the only other switch worth trying for Urban Terror bots.
After running bspc you should find a .aas file with the same name as your map in same folder as your .bsp. This file will need to be copied to the maps folder of your pk3
Common problems
Using bot clip
Bot clip is a shader available in the common shaders set. It's purpose it to provide a solid wall which the bots cannot pass or enter.
The clip is invisible to everything except bots.
Bot clip should be used to prevent bots from falling off walls or taking routes that you do not wish them to go.
An example of this would be a swimming pool, bots are generally attracted to dropped weapons and will quite happily dive into a pool of water to pick up a grenade. Unfortunately they might not be able to get out of the water.
Block all sides of the swimming pool with bot clip.
In order to improve the bots navigation, especially around complex brush work, create a smooth path using 2 bot clipped walls.