NPC State, Memory, And Interactions
What This System Is
NPC state, memory, and interactions define how an NPC definition, placement override, relationship memory, dialogue state, and service hooks resolve into the interaction options a player sees.
How Authors Use It
Authors edit NPC definitions, placement overrides, state variants, relationship/profile settings, dialogue links, and interaction slots in the scene and NPC workbenches. Use this system when an NPC needs different talk, service, stock, or state behavior based on player progress.
Rules And Invariants
Definition defaults apply before placement overrides. State variant priority must be deterministic. Actor ids used for memory must be stable. Synthesized talk slots and service slots must not collide with authored slots. Stock gates and dialogue gates must route through shared condition semantics.
Validation And Debugging
Validation should report missing NPC definitions, invalid overrides, duplicate interaction ids, broken dialogue targets, missing service hooks, and memory profile issues. Debug traces should name the resolved state variant and why an interaction was available or hidden.
Examples
An NPC can use a default talk option, expose a shop only after a quest step, and remember that the player already chose a branch. After editing, run scene validation and inspect the NPC interaction preview.