Skip to content

Behavior and Perception

HIKI edited this page Oct 26, 2026 · 2 revisions

Behavior and perception

File: tacznpc_behavior.json. Global sections apply to every loadout. Put partial overrides under loadouts.<id>, using the same section names.

{
  "perception": {
    "calmRange":16,
    "restingRange":6,
    "alertRange":48
  },
  "loadouts": {
    "guard": {
      "perception": {
        "calmRange":24
      }
    }
  }
}

This is a minimal standalone behavior file. In an existing file, merge the fields rather than discarding other sections.

perception

Key Default Meaning / bounds
enabled true Awareness-based detection; disabled uses the ordinary follow-range behavior
calmRange 16 Detection while calm
restingRange 6 Detection while resting; at least 1
alertRange 48 Alert detection; no more than 128
alertDurationTicks 600 Alert memory; 20–72000
allyAlertRadius 12 Nearby ally notification radius; 0–48

Require restingRange ≤ calmRange ≤ alertRange. Detection remains subject to the entity's follow-range limits. Setting a larger alert range does not automatically turn every gun into a long-range weapon.

Alert is separate from having a live target. An NPC can stay alert after its opponent disappears. Ordinary dialogue observes the combat/alert restrictions; a leader has special interaction rules for their own companion.

damageEscape

Key Default Meaning / bounds
enabled true Enable the escape reaction
reactToAllies true Allow reaction to damage attributed to allies
durationTicks 100 Reaction duration; 20–1200
searchRadius 12 Candidate area; 4–32
minDistance 4 Desired separation; 1–searchRadius
speed 1.3 Navigation speed multiplier; >0–4
repathIntervalTicks 20 Path refresh interval; 5–100

This is movement behavior, not permission to attack an ally and not friendly-fire damage reduction. See Friendly fire for those protections.

Other sections

rest, campfire and global campfires are covered in Campfires and resting. combat is covered in Combat.

Changing behavior does not directly rewrite saved inventory, XP or faction reputation. Reload applies a new policy; a new spawn is required to test starting equipment or minimum spawn level.


Home · Configuration map · Troubleshooting

Clone this wiki locally