Bots:Adding bots to your map

From Custom Map Makers Wiki
Revision as of 09:03, 19 August 2011 by John (talk | contribs) (bot_roam)
Jump to: navigation, search

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.

Shaping bot navigation

In order to improve the bots navigation, especially around complex brush work, create a smooth path using 2 bot clipped walls.

Using this method you can create a clean easy to navigate pathway through your map using bot clip walls.

Using entities to attract bots

There are very few entities that will attract bots in a significant way.

item_botroam

item_botroam was traditionally used to attract bots to a specific part of a map, the entity has been described as being "bot candy".

Personal test with this entity have shown very little effect. Instead use the player_info_start entity, these do attract bots and they will visit these if they have nothing else to do.

bot_camp

This entity can be placed and weighted (add the key weight to the entity) highly to attract chicken and raven bots. These have a high tendency to camp. You should use values of 300 or greater to have any real effect.