actor_variant

An actor variant specializes an actor by defining their use of weapons, grenades, their health, their color, and what equipment they drop. While the actor tag defines common behaviour of an AI type and rank, the actor variant adds additional variety in their appearance and weapon use.

Burst geometry

A burst is a series of shots made at a target. The burst geometry controls how the shots within a burst start and move over time.

At the start of every burst, the game picks a random origin point horizontally near the target to fire at, either to the left or right. The AI will then correct their shots by returning aim back towards the target over the course of the burst.

See the burst geometry fields in the tag structure for more information.

Firing patterns

Firing patterns modify the burst geometry and ranged combat values depending on the actor's state:

  • New-target is when the actor finds a new target to shoot at.
  • Moving is when the actor is moving between scenario firing positions while shooting.
  • Berserk is when the actor is in a berserk state charging at the player.

The firing pattern multipliers (starting at new target burst duration) modify the default burst geometry and ranged combat values only when their value is non-zero.

Change colors

The change colors block of the tag can be used to change armor color, which relies on the bipeds model's shader_model shader(s) having a multipurpose map with an alpha channel, which acts as a mask for color change. Using the change colors block of this tag overrides the biped's color change permutations.

Halo randomly interpolates between the upper and lower bound colors, in either RGB space or HSV if the interpolate color in HSV flag is checked. This gives the Flood their varying skin tones, for example.

If you are looking for multiplayer armor colors, see here.

Structure and fields

Field Type Comments
flags bitfield(32)
Flag Mask Comments
can shoot while flying 0x1
interpolate color in hsv 0x2

Determines if change colors upper and lower bounds are interpolated in HSV space as opposed to RGB.

has unlimited grenades 0x4

Gives the actor an unlimited supply of grenades to throw.

moveswitch stay w friends 0x8
active camouflage 0x10

Gives the actor permanent active camouflage, e.g. stealth Elites.

super active camouflage 0x20

When enabled, makes the active camouflage the hyper stealth variant from globals, which can have a different appearance.

cannot use ranged weapons 0x40

Disables ranged combat settings (beginning at the weapon reference). Even if the AI is holding a weapon, it will not fire it.

prefer passenger seat 0x80

The actor will prefer to enter a vehicle's passenger seat over a gunner seat, as determined by the unit's seat flags.

mcc actor type enum

Used for kill scoring and achievements in MCC. Since this field was padding in pre-MCC editions, maps compiled for MCC should use MCC-extracted actor_variant tags or set these fields, or else enemies may be scored as Brutes or other unexpected types due to having zeroed-out or garbage data.

  • Only applicable to the following engine versions: mcc.
Option Value Comments
brute 0x0
grunt 0x1
jackal 0x2
skirmisher 0x3
marine 0x4
spartan 0x5
drone 0x6
hunter 0x7
flood infection 0x8
flood carrier 0x9
flood combat 0xa
flood pure 0xb
sentinel 0xc
elite 0xd
huragok 0xe
mule 0xf
turret 0x10
mongoose 0x11
warthog 0x12
scorpion 0x13
hornet 0x14
pelican 0x15
revenant 0x16
seraph 0x17
shade 0x18
watchtower 0x19
ghost 0x1a
chopper 0x1b
prowler 0x1c
wraith 0x1d
banshee 0x1e
phantom 0x1f
scarab 0x20
guntower 0x21
spirit 0x22
broadsword 0x23
mammoth 0x24
lich 0x25
mantis 0x26
wasp 0x27
phaeton 0x28
watcher 0x29
knight 0x2a
crawler 0x2b
pad(22)
movement type enum
Option Value Comments
always run 0x0
always crouch 0x1
switch types 0x2
pad(2)
initial crouch chance f32
  • Maximum: 1
crouch time f32 (seconds) (min & max)
run time f32 (seconds) (min & max)
maximum firing distance f32 (world units)

The maximum range, in world units, where the unit can fire at a target.

rate of fire f32

This lets you pick the firing rate for this actor. Which affects firing behavior in the following ways:

  • Any above 0 rate of fire is limited by the referenced weapon's minimum rounds per second as the actor will only tap the trigger not hold, not causing the firing speed to climb.

  • When set to 0, the actor will hold the trigger causing it to use the weapon's windup behavior and allows it to reach the weapon's max firing rate.

  • If 0 and the weapon is a charging weapon the actor will hold the charge until the burst ends or the weapon's overcharged action behavior kicks in.

  • If not 0 charging the weapon will fire their uncharged projectiles if they have them.

  • Setting a number higher than the weapon's minimum rate of fire can prompt the actor to fire their gun slower than the weapon's minimum because it will try to tap fire at every 1/rate_of_fire causing it to not be able to fire again immediately after the firing delay.

projectile error Angle: f32

Adds error on top of the weapon's own error. This makes actors fire inaccurately.

first burst delay time f32 (seconds) (min & max)

The delay in seconds before the actor starts its first burst on a new target.

new target firing pattern time f32 (seconds)
surprise delay time f32 (seconds)
surprise fire wildly time f32 (seconds)
death fire wildly chance f32

Sets the chance that the actor will fire their weapon while dying.

  • Maximum: 1
death fire wildly time f32 (seconds)

Controls how long the actor will continue firing after death.

desired combat range f32 (world units) (min & max)

The distance in world units the actor will try to be in to attack; lower bounds is the minimum range and upper is the maximum. The actor may still fire outside this range, but will move to attain it.

custom stand gun offset
Vector3D (3)
  • i: f32
  • j: f32
  • k: f32
custom crouch gun offset
Vector3D (3)
  • i: f32
  • j: f32
  • k: f32
target tracking f32

Determines how closely the actor will follow moving targets when firing. bursts. A value of 0 means only firing at the target's location at the start of the burst, while while 1 means following the target perfectly. with each shot. A value in-between can be provided.

  • Maximum: 1
target leading f32

Determines how accurately to predict lead on moving targets. A value of 0 means not leading at all and shooting directly at the target, while 1 means perfectly predicting how far in front of the target to lead based on projectile speed and distance. A value in-between can be provided.

  • Maximum: 1
weapon damage modifier f32

Allows weapon damage to be buffed or nerfed for this actor variant. A value of 0 disables this modifier.

damage per second f32

Overrides weapon damage if set and weapon damage modifier is 0.

burst origin radius f32 (world units)

The starting point of the burst, randomly to the left or right of the target in world units.

burst origin angle Angle: f32

Controls the maximum angle from horizontal that the orgin can be, from the point of view of the actor. For example, a value of 0 indicates the origin will alway be directly to the left or right of the target, while 90 would allow the origin to be above or below the target as well.

burst return length f32 (world units) (min & max)

How far the burst point moves back towards the target. This can be negative to make the burst lead away from the target.

burst return angle Angle: f32

Controls how close to horizontal the return motion can be.

burst duration f32 (seconds) (min & max)

Cotrols the length of burst, during which multiple shots are fired.

burst separation f32 (seconds) (min & max)

Controls how long to wait between bursts.

burst angular velocity Angle: f32 (degrees per second)

Sets the maximum rotational rate that the burst can sweep. A value of 0 means unlimited. For example, if the burst origin radius is large and the burst duration is short, the return burst will cover a large area in a short amount of time unless limited by this angular velocity.

pad(4)
special damage modifier f32

A damage modifier for special weapon fire (e.g. overcharged shots and secondary triggers), applied in addition to the normal damage modifier. No effect if 0.

  • Maximum: 1
special projectile error Angle: f32

An error angle, applied in addition to normal error, for special fire.

new target burst duration f32

Multiplier for burst duration in the new target state. No effect if 0.

new target burst separation f32

Multiplier for burst separation in the new target state. No effect if 0.

new target rate of fire f32

Multiplier for rate of fire in the new target state. No effect if 0.

new target projectile error f32

Multiplier for projectile error in the new target state. No effect if 0.

pad(8)
moving burst duration f32

Multiplier for burst duration in the moving state. No effect if 0.

moving burst separation f32

Multiplier for burst separation in the moving state. No effect if 0.

moving rate of fire f32

Multiplier for rate of fire in the moving state. No effect if 0.

moving projectile error f32

Multiplier for projectile error in the moving state. No effect if 0.

pad(8)
berserk burst duration f32

Multiplier for burst duration in the berserk state. No effect if 0.

berserk burst separation f32

Multiplier for burst separation in the berserk state. No effect if 0.

berserk rate of fire f32

Multiplier for rate of fire in the berserk state. No effect if 0.

berserk projectile error f32

Multiplier for projectile error in the berserk state. No effect if 0.

pad(8)
super ballistic range f32
bombardment range f32

When non-zero, causes the burst target to be offset by a random distance in this range when the enemy is not visible.

modified vision range f32

Overrides the actor's vision range. Normal if 0.

special fire mode enum

If set, allows the actor to use their weapon in alternate ways.

Option Value Comments
none 0x0

No special fire will be used.

overcharge 0x1

The actor will hold down the primary trigger for an overcharged shot. Jackals use this with the plasma pistol.

secondary trigger 0x2

The actor will fire the weapon's secondary trigger.

special fire situation enum

Determines the situation in which the actor has a chance of using special fire.

Option Value Comments
never 0x0

The actor will never special fire their weapon.

enemy visible 0x1

Special fire happens only when the target is visible.

enemy out of sight 0x2

Special fire happens only when the target is behind cover.

strafing 0x3
special fire chance f32

How likely the actor will use their weapon's special fire mode. Setting this to 0 is equivalent to using the never situation.

  • Maximum: 1
special fire delay f32 (seconds)

How long the actor must wait between uses of special fire mode.

melee range f32 (world units)

Sets how close an enemy must get to trigger a melee charge by the actor.

melee abort range f32 (world units)

The actor will stop trying to melee the enemy goes outside this range.

berserk firing ranges f32 (world units) (min & max)

When berserking and outside the maximum range, the actor will advance towards the target and stop at the minimum range.

berserk melee range f32 (world units)

Similar to melee range, but used when the actor is berserking.

berserk melee abort range f32 (world units)

Similar to melee abort range, but used when the actor is berserking.

pad(8)
grenade type enum

Sets which type of grenade the actor throws, assuming grenade stimulus is not never.

Option Value Comments
human fragmentation 0x0

A "human fragmentation" grenade will be thrown. The actual projectile and effects used are defined in the first item of the grenades block in globals.

covenant plasma 0x1

As above, but uses the second item ("covenant plasma") in globals.

trajectory type enum
Option Value Comments
toss 0x0
lob 0x1
bounce 0x2
grenade stimulus enum

What causes the actor to consider throwing a grenade. It is still dependent upon grenade chance.

Option Value Comments
never 0x0

The actor never throws grenades.

visible target 0x1
seek cover 0x2
minimum enemy count u16

How many enemies must be within the grenade's radius before the actor considers throwing there.

enemy radius f32 (world units)

Only enemies within this radius of the actor are considered when choosing where to throw a grenade.

pad(4)
grenade velocity f32 (world units per second)

This is responsibile for giving the grenade it's thrown velocity, rather than the projectile initial velocity or the unit grenade velocity.

grenade ranges f32 (world units) (min & max)

The minimum and maximum ranges that the actor will consider throwing a grenade.

collateral damage radius f32 (world units)

If there are friendlies within this radius of the target, grenades will not be thrown.

grenade chance Fraction: f32

How likely the actor is to throw a grenade when a grenade stimulus applies.

  • Maximum: 1
grenade check time f32 (seconds)

How often to consider throwing a grenade while a continuous grenade stimulus, like visible target, applies.

encounter grenade timeout f32 (seconds)

The AI will not throw a grenade if another AI in the encounter threw one within this timeout. This prevents AI from all throwing grenades at the same time.

pad(20)
grenade count u16 (min & max)

Determines how many grenades the actor spawns with, with the type determined by the grenade type field. The actor will use up these grenades unless has unlimited grenades is true. On death, the grenades are dropped.

don't drop grenades chance f32

The chance that the actor drops no grenades on death, even if they have some.

  • Maximum: 1
drop weapon loaded f32 (fractions of a clip) (min & max)

A random range for how loaded the dropped weapon is, as a fraction of its magazine size or charge. Plasma weapons are dropped at 100% charge no matter this field's value under special circumstances:

  • If a model region was destroyed and that region's forces drop weapon flag is enabled, such as shooting the arm off a Flood actor.
  • If the actor has a chance of feigning death and reviving, but not if the damage exceeds the hard death threshold.

  • Maximum: 1
drop weapon ammo u16 (rounds) (min & max)

The total number of reserve ammo rounds included with the dropped weapon. Ignored for energy weapons.

pad(12)
pad(16)
body vitality f32

Overrides the biped's collision geometry maximum body vitality for a different amount of health.

shield vitality f32

Overrides the biped's collision geometry maximum shield vitality for a different amount of shields.

shield sapping radius f32 (world units)
forced shader permutation Index: u16

If non-zero, forces the bitmap index for any shader the biped uses. For example, the Elite major uses the value 1 which forces its shaders to use the second (red) cubemap in characters\elite\bitmaps\cubemaps.bitmap. Bitmap tags which do not have a bitmap for this index will instead use the first map (index 0).

pad(2)
pad(16)
pad(12)
change colors Block?

Overrides the bipeds color change permutations.

Field Type Comments
color lower bound
ColorRGB (3)
  • red: f32
  • green: f32
  • blue: f32
color upper bound
ColorRGB (3)
  • red: f32
  • green: f32
  • blue: f32
pad(8)

This information was partially generated using Invader tag definitions.

Acknowledgements

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

  • Jakey (Providing descriptions for all tag fields, further researching Rosy's discovery)
  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)
  • Rosy (Discovering actors drop 100% charge weapons on no-grenade deaths)