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:
- marks combat overrides as enabled;
- reads
combat_type; - defaults zombied-community NPCs to
combat_type = zombiedwhen no field is provided; - resolves the selected combat type with
pickSectionFromCondList; - 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
- Activation checks whether the section exists or whether the NPC community is
zombied. - The scheme reads common switch fields and
combat_type. - Zombied-community NPCs get
combat_type = zombiedwhen no field is configured. setCombatTyperesolves the condlist and storesscriptCombatTypeon the object registry state.addregistersIS_SCRIPTED_COMBATand blocks the baseCOMBATaction while scripted combat is active.- 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
combatis usually combined with another active movement or state scheme. It changes combat planner behavior rather than replacing movement by itself.- The
monolithvalue exists in the enum, but the inspected implementation only wires specific helper actions for camper and zombied combat. - Use the
combat_camperandcombat_zombiedpages when debugging the helper actions installed by this scheme.