Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

combat

combat configures scripted combat style for stalker NPCs. It selects a combat type through a condlist and installs the planner hooks used by camper and zombied combat helpers.

Parameters

combat_type

Type: condlist. Optional. Default: null.

Resolves to a scripted combat type. Supported enum values in the TypeScript source are camper, zombied, and monolith.

The section also supports common switch fields. They are parsed into state.logic, although the main combat behavior is driven through planner evaluators and actions.

Runtime behavior

On activation, the scheme:

  1. marks combat overrides as enabled;
  2. reads combat_type;
  3. defaults zombied-community NPCs to combat_type = zombied when no field is provided;
  4. resolves the selected combat type with pickSectionFromCondList;
  5. stores it on the object registry state as scriptCombatType.

The add method registers IS_SCRIPTED_COMBAT, changes the base combat action precondition, and installs helper actions for combat_camper and combat_zombied.

Runtime sequence

  1. Activation checks whether the section exists or whether the NPC community is zombied.
  2. The scheme reads common switch fields and combat_type.
  3. Zombied-community NPCs get combat_type = zombied when no field is configured.
  4. setCombatType resolves the condlist and stores scriptCombatType on the object registry state.
  5. add registers IS_SCRIPTED_COMBAT and blocks the base COMBAT action while scripted combat is active.
  6. Camper and zombied helper actions are installed into the planner.

Example

[logic]
active = walker@guard

[walker@guard]
path_walk = guard_walk
path_look = guard_look
combat_type = {+ambush_started} camper, nil

Notes

  • combat is usually combined with another active movement or state scheme. It changes combat planner behavior rather than replacing movement by itself.
  • The monolith value exists in the enum, but the inspected implementation only wires specific helper actions for camper and zombied combat.
  • Use the combat_camper and combat_zombied pages when debugging the helper actions installed by this scheme.