Getting bots to use landmines, expacks, other deployable weapons


The trick to get any dropped handweapons to work well with bots is to:

- increase the weapons velocity (usually at least 9)
- use direct AI template settings (weaponTemplate.indirect 0)
- set the AI strength values high enough that the bots will use the dropped weapon over a handweapon.
- Set the time to live value very low for expacks so they explode soon after being set since bots won't automatically use the detonator.
- Set a narrow AI weapon range so the bots don't spam the map - since bots never run out of ammo.

Here's the template example for a landmine:

rem *** Add Landmine ***
weaponTemplate.create aiLandmine
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 3.0
weaponTemplate.maxRange 10.0
weaponTemplate.isThrown 1
weaponTemplate.weaponActivate PIMenuSelect5
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry 0.0
weaponTemplate.setStrength LightArmour 10.0
weaponTemplate.setStrength HeavyArmour 9.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Submarine 0.0
weaponTemplate.setStrength Air 0.0