Actor definitions configure core AI behaviours, including which decisions they make and how, irrespective of the character's appearance or rank-specific alterations (which is what actor_variant is for).

Actor type definitions

There are 16 actor types. Each actor type maps to one of 13 unique actor type definitions which are hardcoded and contain a combination of basic settings and references to game code implementing the particular behaviours of that actor type. Some actor types use the same definition, like monitor and sentinel.

Each actor type definition has a unique way to decide on one of 14 actions. It is difficult to understand how exactly each actor type definition differs without extensive testing and/or reverse engineering. It's known that there is a lot of similarity between their code, but that Flood units are the most unique.

Name

Race

When to search at target

When to search pursuit

Pursuit controller

Swarm

Known behaviours

elite

covenant

always

not_when_group

true

false

...

jackal

covenant

never

never

false

false

...

grunt

covenant

always

always

false

false

Flees when Elite is killed. Cannot evade.

hunter

covenant

always

not_when_group

true

false

...

engineer

covenant

always

always

false

false

...

marine

human

never

never

false

false

Prefers to group together.

crew

human

always

always

false

false

...

flood

flood combat

always

always

true

false

Cannot throw grenades.

infection

flood infection

never

never

false

true

...

flood carrier

flood carrier

always

never

true

false

...

sentinel

sentinel

always

always

false

false

Cannot throw grenades.

mounted_weapon

none

never

never

false

false

...

Structure and fields

FieldTypeComments
flagsbitfield
FlagMaskComments
can see in darkness0x1
sneak uncovering target0x2
sneak uncovering pursuit position0x4
unused0x8
shoot at targets last location0x10

When no target is visible, briefly shoot at where the target was last seen.

try to stay still when crouched0x20
crouch when not in combat0x40
crouch when guarding0x80
unused 10x100
must crouch to shoot0x200
panic when surprised0x400

When an enemy unit is newly detected within this actor's surprise distance, panic.

always charge at enemies0x800

Always ignore other paramaters such as desired combat ranges and run at enemies.

gets in vehicles with player0x1000
start firing before aligned0x2000
standing must move forward0x4000
crouching must move forward0x8000
defensive crouch while charging0x10000
use stalking behavior0x20000
stalking freeze if exposed0x40000
always berserk in attacking mode0x80000
berserking uses panicked movement0x100000
flying0x200000
panicked by unopposable enemy0x400000
crouch when hiding from unopposable0x800000
always charge in attacking mode0x1000000

When this actor's squad is in attacking mode, ignore other paramaters such as desired combat ranges and run straight at enemies.

dive off ledges0x2000000

Will not attempt to avoid sheer drops when diving away from dangerous objects.

swarm0x4000000
suicidal melee attack0x8000000
cannot move while crouching0x10000000
fixed crouch facing0x20000000
crouch when in line of fire0x40000000
avoid friends line of fire0x80000000
more flagsbitfield
FlagMaskComments
avoid all enemy attack vectors0x1
must stand to fire0x2
must stop to fire0x4
disallow vehicle combat0x8
pathfinding ignores danger0x10

Will not attempt to avoid live grenades, projectiles, environmental damage, etc when moving.

panic in groups0x20
no corpse shooting0x40
typeenum

This field acts as an index into an actor type definitions array where hardcoded actor behaviours are defined.

OptionValueComments
elite0x0

Uses the elite actor type definition.

jackal0x1

Uses the jackal actor type definition.

grunt0x2

Uses the grunt actor type definition.

hunter0x3

Uses the hunter actor type definition.

engineer0x4

Uses the engineer actor type definition.

assassin0x5

Uses the elite actor type definition (duplicate).

player0x6

Uses the marine actor type definition (duplicate).

marine0x7

Uses the marine actor type definition.

crew0x8

Uses the crew actor type definition.

combat form0x9

Uses the flood actor type definition.

infection form0xA

Uses the infection actor type definition.

carrier form0xB

Uses the flood carrier actor type definition.

monitor0xC

Uses the sentinel actor type definition (duplicate).

sentinel0xD

Uses the sentinel actor type definition.

none0xE

Uses the grunt actor type definition.

mounted weapon0xF

Uses the mounted_weapon actor type definition.

max vision distancefloat
  • Unit: world units

Maximum range of sight.

central vision anglefloat

Horizontal angle within which the actor sees targets out the the maximum range.

max vision anglefloat

Maximum horizontal angle within which the actor sees targets at range.

peripheral vision anglefloat

Maximum horizontal angle within which the actor sees targets "out of the corner of its eye" (Guerilla description).

peripheral distancefloat
  • Unit: world units
standing gun offsetVector3D
FieldTypeComments
ifloat
jfloat
kfloat
crouching gun offsetVector3D?
hearing distancefloat
  • Unit: world units
notice projectile chancefloat
  • Min: 0
  • Max: 1
notice vehicle chancefloat
  • Min: 0
  • Max: 1
combat perception timefloat
  • Unit: seconds
guard perception timefloat
  • Unit: seconds
non combat perception timefloat
  • Unit: seconds
inverse combat perception timefloat
  • Cache only
inverse guard perception timefloat
  • Cache only
inverse non combat perception timefloat
  • Cache only
dive into cover chancefloat
  • Min: 0
  • Max: 1
emerge from cover chancefloat
  • Min: 0
  • Max: 1
dive from grenade chancefloat
  • Min: 0
  • Max: 1
pathfinding radiusfloat
  • Unit: world units
glass ignorance chancefloat
  • Min: 0
  • Max: 1
stationary movement distfloat
  • Unit: world units
free flying sidestepfloat
  • Unit: world units
begin moving anglefloat
cosine begin moving anglefloat
  • Cache only
maximum aiming deviationVector2D
FieldTypeComments
ifloat
jfloat
maximum looking deviationVector2D?
noncombat look delta lfloat
noncombat look delta rfloat
combat look delta lfloat
combat look delta rfloat
idle aiming rangeVector2D?
idle looking rangeVector2D?
event look time modifierBounds
FieldTypeComments
minfloat
maxfloat
noncombat idle facingBounds?
  • Unit: seconds
noncombat idle aimingBounds?
  • Unit: seconds
noncombat idle lookingBounds?
  • Unit: seconds
guard idle facingBounds?
  • Unit: seconds
guard idle aimingBounds?
  • Unit: seconds
guard idle lookingBounds?
  • Unit: seconds
combat idle facingBounds?
  • Unit: seconds
combat idle aimingBounds?
  • Unit: seconds
combat idle lookingBounds?
  • Unit: seconds
cosine maximum aiming deviationVector2D?
  • Cache only
cosine maximum looking deviationVector2D?
  • Cache only
do not useTagDependency: weapon
  • Unused
do not use 1TagDependency: projectile
  • Unused
unreachable danger triggerenum
OptionValueComments
never0x0
visible0x1
shooting0x2
shooting near us0x3
damaging us0x4
unused0x5
unused10x6
unused20x7
unused30x8
unused40x9
vehicle danger triggerenum?
player danger triggerenum?
danger trigger timeBounds?
  • Unit: seconds
friends killed triggerint16
friends retreating triggerint16
retreat timeBounds?
  • Unit: seconds
cowering timeBounds?
  • Unit: seconds
friend killed panic chancefloat
  • Min: 0
  • Max: 1
leader typeenum?
leader killed panic chancefloat
  • Min: 0
  • Max: 1
panic damage thresholdfloat
  • Min: 0
  • Max: 1
surprise distancefloat
  • Unit: world units
hide behind cover timeBounds?
  • Unit: seconds
hide target not visible timefloat
  • Unit: seconds
hide shield fractionfloat
  • Min: 0
  • Max: 1
attack shield fractionfloat
  • Min: 0
  • Max: 1
pursue shield fractionfloat
  • Min: 0
  • Max: 1
defensive crouch typeenum
OptionValueComments
never0x0
danger0x1
low shields0x2
hide behind shield0x3
any target0x4
flood shamble0x5
attacking crouch thresholdfloat
defending crouch thresholdfloat
min stand timefloat
  • Unit: seconds
min crouch timefloat
  • Unit: seconds
defending hide time modifierfloat
attacking evasion thresholdfloat
defending evasion thresholdfloat
evasion seek cover chancefloat
  • Min: 0
  • Max: 1
evasion delay timefloat
  • Unit: seconds
max seek cover distancefloat
  • Unit: world units
cover damage thresholdfloat
  • Min: 0
  • Max: 1
stalking discovery timefloat
  • Unit: seconds
stalking max distancefloat
  • Unit: world units
stationary facing anglefloat
change facing stand timefloat
  • Unit: seconds
uncover delay timeBounds?
  • Unit: seconds
target search timeBounds?
  • Unit: seconds
pursuit position timeBounds?
  • Unit: seconds
num positions (coord)uint16
  • Min: 0
num positions (normal)uint16
  • Min: 0
melee attack delayfloat
  • Unit: seconds

Minimum time between consecutive melee attempts.

melee fudge factorfloat
  • Unit: world units

Determines where to start the melee animation:0 begins on top of the target, positive values begin in front of the target, negative values begin behind the target.

melee charge timefloat
  • Unit: seconds

How long to chase a target to begin a melee attack before giving up.

melee leap rangeBounds?
  • Unit: world units
melee leap velocityfloat
  • Unit: world units per tick
  • Min: 0
  • Max: 1
melee leap chancefloat
  • Min: 0
  • Max: 1
melee leap ballisticfloat
  • Min: 0
  • Max: 1
berserk damage amountfloat
  • Min: 0
  • Max: 1

When HP is below the berserk damage threshold, the actor may berserk when receiving any damage that deals this much of the actor's maximum HP in one tick.

berserk damage thresholdfloat
  • Min: 0
  • Max: 1

Below this fraction of total HP, the actor may berserk when receiving damage, depending on their berserk damage amount.

berserk proximityfloat
  • Unit: world units

When an enemy unit is within this radius of the actor, berserk.

suicide sensing distfloat
  • Unit: world units
berserk grenade chancefloat
  • Min: 0
  • Max: 1

How likely the actor is to berserk when grenades or supercombining projectiles attach to them.

guard position timeBounds?
  • Unit: seconds
combat position timeBounds?
  • Unit: seconds
old position avoid distfloat
  • Unit: world units
friend avoid distfloat
  • Unit: world units

Constraints the minimum distance that this actor can be from its allies. Increase this to avoid actors "clumping" together.

noncombat idle speech timeBounds?
  • Unit: seconds
combat idle speech timeBounds?
  • Unit: seconds
do not use 2TagDependency: actor
  • Unused

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Conscars (Reversing actor type definitions)
  • Elefant (Researching sentinel and grunt actor type behaviour)
  • gbMichelle (Reversing actor type aliases)
  • justinpyne (Explaining the friend avoid dist field)
  • Kavawuvi (Invader tag definitions)
  • Kornman (Providing actor type definition structure)
  • MosesOfEgypt (Tag structure research)
  • Vennobennu (Field documentation)
  • zatarita (Reversing actor type definitions)