← Core Game Mechanics Recovery System Open Calculator →

Recovery System

Authors:perturbperturbIncognitoIncognito

Overview

What is Recovery?

The recovery system is how enemies react to taking damage. When an enemy detects incoming ranged fire, melee hits, or other threat triggers, the recovery behavior tree acts as an interrupt. This will override whatever the enemy was currently doing and will execute a defensive/retaliatory response.

Recovery is how the enemy units interact with the players. While player actions generally dictate combat flow, the recovery system is what dictates how the units reply. Teleport escapes, counterattacks, and many more actions all fall under this umbrella. Knowing how enemies recover is integral to understanding enemy behavior.

Generic Recovery Flowchart

All recovery trees operate in the same general way:

Root (Behavior Selector):
  [1] StunlockActivationBehaviour (wrapped in ForceFail)
      -> Sets stunlock durations, always "fails" so the selector continues
  [2] Threat check #1 (highest priority) -> Response
  [3] Threat check #2 -> Response
  [4] Threat check #3 (lowest priority) -> Response

Step 1: Stunlock

The first child is always a StunlockActivationBehaviour wrapped in a BehaviourNodeFailer (ForceFail). This means it runs every time recovery triggers but is designed to return failure as the default response so the selector moves on to the actual response. Here's how it works:

  1. Checks the enemy's current body state.

  2. If NOT in a hit reaction: returns failure, recovery skips ahead to threat-response branches. Recovery can fire without a stun, and this is the path it takes in that case.

  3. If IN a hit reaction: AI sits and waits for the appropriate duration based on body state + damage source. (May optionally forces an early break-out via InterruptHeavyHit).

This is to say that stunlock sets how long the enemy is locked in a hit reaction animation before it can act. These durations vary by damage source and enemy:

Stunlock Type

What Triggers It

Default_HeavyHit

Heavy hits from melee/ranged

Default_Stagger

Stagger effects

Default_Riposte

Player riposte attacks

Ranged_Stagger

Stagger from ranged sources

Grenade_Stagger

Krak grenade / explosive stagger

For a complete list of stagger durations on each enemy, please see Poise and Stagger (not yet published, sorry).

Step 2: Threat Detection

The recovery selector checks against the AI's current knowledge of the players. Below are triggers commonly used by the recovery system to establish the concept of threat and to decide who will be the the target of the recovery action:

Key

What Sets It

RangeThreat

Threat established by ranged damage

MeleeThreat

Threat established by melee damage

StaggerDamager

Body state entering STAGGER

GuardbreakDamager

Guard broken by attack

PriorityThreat

High-priority target flagged

TopDamageThreat

Highest cumulative damage dealer

IsUnderAim

Player is actively aiming at enemy

RangeFarThreat

Ranged damage from far distance

For more information on threat evaluation and the aggro system in general, please see Enemy Aggro System.

Step 3: Response

Each threat check gates a response subtree. Below are common response patterns one would see as they encounter different enemy units:

  • Dodge - move to a new position

  • Counterattack - strike back at the threat source

  • Dodge + Counterattack - dodge first, then retaliate

  • Block/Parry - raise shield or weapon to block

  • Teleport - relocate to a distant position

  • Vanish - go invisible (specifically only Lictor)

  • Sprint to engage - close distance aggressively

  • Flee - retreat to safe distance

Key Nuances

Interruptions Throttle

Most recovery trees are gated by AllowInterruptions or BhvNodeDecoratorCheckInterruptionsAllowed. This can be thought of as an on/off toggle controlling whether or not recovery is a viable action. When the enemy is in a state that disables interruptions (such as a scripted sequence, or during an attack animation), recovery cannot execute. This is why occasionally you may come across enemies who get "stuck" while taking a high volume of sustained damage.

Endurance

Some recovery responses apply Endurance status effect, which grants stagger immunity during the action (ex: Whip Warriors gain Endurance during dodge) which prevents the player from interrupting the recovery action.

Should a recovery option be granted endurance and also have a counterattack element, your options are to dodge, use natural cover, or get hit. If the recovery does not apply Endurance, sustained damage can interrupt the counterattack.

Two variants exist:

Status Effect

Protection Level

Used By

Endurance

Full stagger immunity

Rubric Marine, Tyranid Warrior, Chaos Spawn, Occult Terminator Melee, Lesser Sorcerer, etc

SoftEndurance

Lighter protection

Tzaangor (range recovery, initial melee block phase)

Token System Bypass

If a recovery option should include any sort of counterattack, it should be noted that these attacks ignore the token system entirely. At all times, recovery counterattacks can execute despite the state of the token pool. This is to say regardless of access to a token, the counterattack will happen; it can occur in parallel with any other token-generated attack.

Behavior Selector

The way that enemies choose counterattacks is not the same across the board. The selector type determines how the AI decides on which counterattack to use. There are 5 selector types:

Selector Type

How It Picks

Used By

BhvNodeUtilitySelector

Weighted random

(BasePriority * Random multiplier)

Tyranid Warrior (range), Rubric Marine, Chaos Spawn, Zoanthrope, Neurothrope, Exalted Sorcerer

BehaviourNodeRandomSelector

Equal-weight random

Tyranid Warrior (melee)

BehaviourNodeRandomBranch

Weighted random branch (explicit weights)

Tyranid Warrior

BehaviourNodeSelector

Strict priority (first success wins)

Occult Terminator Melee

BhvNodeActiveSelector

Strict priority with re-evaluation

Tzaangor (shielded)

Most enemies use BhvNodeUtilitySelector with multiplier ranges like (0.7, 1.0). This means that counterattacks are somewhat random but weighted such that certain counterattacks will happen more frequently than others.

Recovery Branch Type Catalog

Core / Universal Branches

These are the foundation present on nearly every enemy with a recovery tree.

Branch

Present On

What It Does

Stunlock

26/27 Enemies

Passive animation lockout after heavy hit / stagger / riposte / grenade. Holds the enemy frozen for the stunlock duration before any counter-response can fire

Melee Recovery

25/27 Enemies

Standard response when player lands melee hits above the melee threat threshold

Range Recovery

24/27 Enemies

Standard response when player lands ranged damage above the range threat threshold

Specialized Threat Branches

Extra threat-reaction branches bolted onto specific enemies.

Branch

Found On

Notes

Stagger Recovery

Rubric Marine Flamer, Tyranid Warrior, plus 2 others

Counterattack fired the moment the stagger animation ends. Usually Endurance-protected. Turns what would be a safe stagger window into a retaliation

Guardbreak Recovery

Tyranid Warrior

Specific reaction when a guardbreak attack lands on the enemy. Warrior also has a "block hit amount >= 2" counter

PriorityThreat Recovery

Tyranid Warrior Whip

Tyranid-specific threat tier handled separately from MeleeThreat / RangeThreat - higher priority

Far Range Recovery

Chaos Spawn

A fourth tier for distant ranged damage; spawn has 4 recovery tiers vs the usual 2-3

TopDamage Recovery

Carnifex

Prioritizes the highest cumulative damage source rather than the most recent threat

Evasion / Dodge Branches

Movement-focused branches that react to aim or pin state rather than landed damage.

Branch

Found On

Notes

Under Aim Evasion

Rubric Marine Bolter, Tzaangor Spearman, Tyranid Warrior Assault

Triggers while the player is scoping / aiming, even before a shot lands

Has No Pin gate

Rubric Marine Bolter

Wraps Ranged Recovery and Under Aim Evasion - a stuck krak grenade disables both branches entirely, leaving only melee recovery available

Dodge & Attack loop

Neurothrope, Zoanthrope

Dodge step immediately followed by a psychic counterattack

Boss / Unique Branches

One-off branches unique to specific bosses or elite archetypes.

Branch

Found On

Notes

Custom Heavy-Hit Reaction

Occult Terminator

Boss-class override for standard melee / range recovery

Counter Cross

Chaos Spawn

Signature counter-move on heavy-hit damagers. Spawn has the most complex recovery tree in the game (9+ response options per trigger)

Taunt

Carnifex

Displays aggressive behavior when flagged

Blink Recovery

Lictor

Camouflage / teleport evasion instead of standard dodge.

Status / Ability Branches

Recovery triggered by status effects rather than damage or threat.

Branch

Found On

Notes

Teleport Recovery

Lesser Sorcerer

Escape teleport when shields pop or the player marks them. Based on Auspex status condition, fires once per trigger

Shields Broken Reaction

Lesser Sorcerer

Separate status-driven response tied to shield destruction

The TLDR Model

Every enemy's recovery tree is built from this formula:

  1. Stunlock (always fires first, determines stun duration)

  2. Melee Recovery

  3. Range Recovery

Then on top of that foundation, specific enemies add "extra" branches keyed to different signals:

  • Stagger / Guardbreak damager keys -> counterattack-on-stagger branches (Flamer, standard Tyranid Warrior)

  • Under Aim -> evasion branches that react to being scoped (Rubric Bolter, Spearman, Assault Warrior)

  • Status effects (broken shields/auspex mark) -> ability-escape branches (Sorcerers)

  • Boss-only flags -> signature counters (Carnifex, Spawn, Occult Terminator)

  • Subarchetype splits -> completely different subtrees per variant (ex: Ravener Burrower vs Dancer)

Exploiting Recovery Cooldowns

Most recovery actions have cooldowns (typically 4-10s). After an enemy recovers, there's a window where it can't recover again.

Examples

  • Neurothrope dodge: 6s cooldown - fire freely for 6s after dodging

  • Ravener: 10s cooldown on both melee and ranged recovery

  • Zoanthrope dodge: 8s cooldown

  • Tzaangor Spearman under-aim dodge: 10s cooldown

Game Files

Recovery behavior trees are stored per-enemy in the server pak:

  • server_pc/root/mods_source/ssl/characters/{faction}/{enemy_name}/{enemy}_recovery.sso

Some enemies split recovery into sub-files:

  • {enemy}_recovery_melee.sso - melee threat response

  • {enemy}_recovery_range.sso / {enemy}_recovery_ranged.sso - ranged threat response

  • {enemy}_recovery_teleport.sso - teleport escape response

  • {enemy}_recovery_heavy.sso - stagger/guardbreak response

SM2 Melee Calculator Calculate exact damage for any weapon, variant, and perk combination against any enemy on any difficulty.
Open Calculator →