AI tips by Dnamro

- Bots will not fire on unmanned objects. This is why in Battle of Britain, the factory has a bot spawn point in it. This is also why you can save your tank from bot attack by getting out when its health gets low, before it gets critical.

- To get bots to attack a destructable object, add a bot spawn to it.

- Bots do not run out of ammo.

- You can get bots to spawn in vehicles by adding a spawnpoint next to the vehicle (within the entry radius) and then in the
SoldierSpawnTemplates.con file add the ObjectTemplate.setAIEnterOnSpawn 1 as shown in the example from BOB:

ObjectTemplate.create SpawnPoint SpawnAI_Axis_Airfield_1
ObjectTemplate.setSpawnId 21
ObjectTemplate.setGroup 3
ObjectTemplate.setAIEnterOnSpawn 1


- To Create spawn point groups only for bots add the line: spawnPointManager.OnlyForAI 1 to the
SpawnPointManagerSettings.con file as in the example from BOB:

spawnPointManager.group 3
spawnPointManager.groupTeam 1
spawnPointManager.groupEnableToChangeTeam 0
spawnPointManager.groupIcon test1.tga
spawnPointManager.OnlyForAI 1

To make spawn groups only for Humans add the line: spawnPointManager.OnlyForHuman 1
as in this example:

spawnPointManager.group 2
spawnPointManager.groupTeam 1
spawnPointManager.groupEnableToChangeTeam 0
spawnPointManager.groupIcon test1.tga
spawnPointManager.OnlyForHuman 1

 

Debugging tips:

Now for extra help with testing, you can set the following debug options on:

In aipathfinding.con file set game.aiPathfindingDebuggingActive 0 to 1 to get an ingame display of your location and some other debugging data. Note that with this on, your game will crash whenever you try to end the map.

In ai con file look for game.showAIstats 0 and set it to 1 -- this will show the strategic areas as blue box outlines in game as well as other stuff.

In ai con file add ai.showBotStats 1 -- this shows specific stuff about each bot above their heads, like what their mission is at the time.


Arc D' Wraith's bot support tutorials go into a lot more detail on all this stuff, and is a good place to go from here. Check out his tutorials on the BF1942 editing forums.

Good luck!