Soldier AI Control Interface


The soldier AI control interface is the first of the advanced soldier controls GUIs enabled with the use of a Command Baton. This interface may be accessed with any rank of Baton, merely by interacting with the soldier while the Baton is equipped (default right-click).
The most important buttons are at the bottom:

Finalize - This button finalizes your AI selections, and sends the relevant information to the server (yes, even in SSP). If you logout or disconnect before finalizing, your changes will be lost. If you exit the screen without finalizing, your changes will not be committed and will not have taken effect. You may return to finalize later, and your changes should be intact (unless someone else updates the soldiers behavior before you).
Done - Exit the number-filled screen. Press Finalize first if you want your changes to be committed and the soldier updated.

Basic stats and behaviors (top area)

Basic vital stats and information are displayed at the top.

In addition, there are currently six buttons in the top-right area. Three are currently for debugging and testing purposes, but are also currently the only way to select different soldier classes.
Sold--Select Soldier class
Eng--Select Engineer Class
Med--Select Medic Class

Also present, but currently non-functional are: (in the future when the class buttons are gone, these will be expanded to the right, with non-abbreviated descriptions)
Host--Hostile AI (will seek out targets)
Pass--Will not seek targets, nor counterattack
---- -- (unlabeled)(This will be changed to a defensive / counter-attack preset later).

AI Range Setting Area (left side)

These ranges all correspond to blocks of distance of radius that the AI for this soldier will use for certain tasks. These are all bounded to 0-144 blocks. Not all range combinations will produce desirable outcomes. Default ranges have been thoroughly tested, but feel free to play around--even at max range they should not be -too- taxing due to target-list caching.

Home Range

The soldier will stay within this distance of his home. If he ever travels out of this distance, on his next AI travel tick, he will begin to move towards his home point, stopping at 1/4 of this range (or range 4, whichever is larger). If the soldier is set to follow another entity, this is the range and behavior he will use when following that entity.

Com. Range

If a soldier has a soldier commander, he will attempt to stay within this distance of his commander. If he leaves this range, he will attempt to return to 1/4 of this range of his commander (or range 4, whichever is larger).

Player Range

Player follow distance. If following a player, this is the leash range. If he wanders outside of this range, he will return to within 4 blocks of the player before being allowed to wander off/resume his task.

Heal Range

Heal range is the range in which a Medic or Engineer will seek out wounded targets for healing.

Melee T. Range

Melee Targeting distance. This is the distance that soldiers will look for targets within when they are not mounted.

Mnt T. Range

Mounted Targeting Range. The distance that soldiers will look for targets within while they are mounted on a vehicle. While targeting distance is statically set here, soldiers will use individual vehicle ranges to determine when to close-on-target.

Dismnt. Range

Dismount Range. If there are any enemy targets within this range, and the soldier is mounted on a vehicle, he will dismount. This is so they are not left vulnerable and unprotected while mounted on a vehicle when an enemy is too close for it to hit. Set to 0 to essentially disable dismounting (he still will not melee while mounted, and will not attack in close range unless on a battering ram).

AI Options Area (right side)

This area contains options for additional configuration, and to turn some behaviors off completely.

Use Ranged Weapon

Off / Range. Turn off to disable ranged weapon use, or set a range at which, if the enemy is further than, the soldier will use ranged weapon instead of closing for melee attack.

Heal Thresh

For Engineers and Medics, when looking for targets to heal, they must be below this percentage in order to be a valid target.

Dodge Chance

0-100. If being targeted by a hostile soldier, this number represents a soldiers percent chance to dodge in a random direction, at each tick of the AI (which happens frequently..values above 30 are probably going to look like a cracked-out squirrel).

This is not a direct chance to dodge, but actually calculated as:
if random < chance/2
--dodge left
else if next_random < chance/2
--dodge right

Two chances to dodge, one left, one right. Only checks the second if the first fails. So a 100% dodge chance would actually be 50% first roll, 50% second roll if first failed. 75% total?


If set above zero (something other than no), a soldier will use nearby chest-carts within this range to resupply himself, and drop-off excess items. Solders will only pick up items from the world if this is turned on.


If set to no, a soldier will not mount vehicles. Otherwise, they will look for vehicles within this range to mount.