{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://neon-sprawl.local/schemas/npc-behavior-def.json", "title": "NpcBehaviorDef", "description": "Single NPC behavior archetype row for catalogs (e.g. content/npc-behaviors/*_npc_behaviors.json). IDs are stable forever—rename display in displayName only. See docs/decomposition/modules/E5_M2_NpcAiAndBehaviorProfiles.md.", "type": "object", "additionalProperties": false, "required": [ "id", "displayName", "archetypeKind", "maxHp", "aggroRadius", "leashRadius", "telegraphWindupSeconds", "attackDamage", "attackCooldownSeconds" ], "properties": { "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "description": "Immutable behavior key for NPC instance binding, aggro, telegraph scheduling, and combat resolution. Never change after content ships; add a new id if the archetype splits." }, "displayName": { "type": "string", "minLength": 1, "description": "Player-facing label; safe to change without migrating NPC data." }, "archetypeKind": { "type": "string", "description": "Prototype archetype grouping for HUD, telemetry, and state-machine routing.", "enum": ["melee_pressure", "ranged_control", "elite_mini_boss"] }, "maxHp": { "type": "integer", "minimum": 1, "description": "Maximum HP for NPC instances bound to this behavior def." }, "aggroRadius": { "type": "number", "exclusiveMinimum": 0, "description": "Horizontal proximity radius for re-aggro after leash clear (XZ-only at runtime)." }, "leashRadius": { "type": "number", "exclusiveMinimum": 0, "description": "Horizontal radius beyond which aggro holder clears when the player leaves (must exceed aggroRadius)." }, "telegraphWindupSeconds": { "type": "number", "exclusiveMinimum": 0, "description": "Windup duration before NPC attack resolves after telegraph starts." }, "attackDamage": { "type": "integer", "minimum": 1, "description": "Deterministic damage dealt to players after telegraph resolves in prototype Slice 2." }, "attackCooldownSeconds": { "type": "number", "exclusiveMinimum": 0, "description": "Seconds after last attack before the NPC may enter telegraph again." } } }