NPC Intents
generateNPCIntentsRuns during turns to choose what the NPCs present try to do, before their actions are resolved and narrated. Its sections control which NPCs act, how often and how boldly, and how their goals respond to the player and the scene.
"Runs during turns to choose what present NPCs try to do before their actions are resolved and narrated. Use it to control which NPCs act, how often and boldly they act, and how their goals respond to the player and current scene."
- Editor location
- Files → AI → Advanced → NPC Intents
- Editor type
- Edit in Studio + View JSON
- Size limits
- Each string leaf under
aiInstructions.generateNPCIntents— 8,000 aiInstructions.generateNPCIntentstotal — 40,000
- Each string leaf under
Schema
{
"aiInstructions": {
"generateNPCIntents": {
"<key>": "string"
}
}
}Beside the seeded keys you can add keys with any name, and each is added to the task as extra guidance. Reusing a seeded key's name replaces that section's default text.
Example
{
"aiInstructions": {
"generateNPCIntents": {
"core_principles": "You generate NPC combat intentions for the current turn of a roleplaying game. Each intent is an attempt for the engine to resolve, not an event that has already happened.\nFirst decide whether a fight is underway or an NPC will start one now. When neither applies, call the output tool once with an empty intents array.",
"when_to_generate": "## WHEN TO GENERATE INTENTS\nChoose one case for the whole turn, using the current situation at the end of Recent Story:\n1. No fight is underway and no NPC will attack now: return an empty intents array and stop.\n2. A fight is underway: generate the participating NPCs' combat intents.\n3. An NPC will start a fight now: generate its immediate attack and the participating NPCs' combat intents.\n\nFor each NPC who is fighting, generate this many separate intents:\n- trivial/weak: exactly 1\n- average: exactly 2\n- strong: 2-3\n- elite/boss/mythic: 3-4",
"what_is_not_action": "## PRACTICE AND SPARRING\nTraining, drills, demonstrations, invitations to spar, and consensual sparring are not a real fight. Return an empty intents array unless an actual attempt to injure or subdue someone begins.",
"description_economy": "## DESCRIPTION ECONOMY\nUse plain, accessible language. Describe the attempt and method in enough detail for resolution, using the NPC's established abilities, equipment, condition, and position.",
"summary_established_beats": "## ESTABLISHED STORY\nRecent Story and Past Story Summary record what has already happened. Continue from the latest exchange, accounting for injuries, active effects, positions, and changed objectives.",
"action_format": "## ACTION FORMAT\nFor combat, heal, and buff intents, write 1-3 sentences describing the attempted action, its method, and its intended target. Use the imperative mood.\nLeave success unresolved: do not state that an attack hits, healing takes effect, or an escape succeeds.",
"story_driver": "## FINAL CHECK\nIf no fight is underway and no NPC attacks now, return an empty intents array.\nOtherwise, check each fighting NPC's tier count, first attack, and targets. Each attempted action needs its own intent object.",
"combat_tactics": "## COMBAT BEHAVIOR\n\n### Ability Usage\n- Check each NPC's abilities before generating actions\n- Reference abilities by name and describe their execution\n\n### Don't Be Predictable\n- Vary tactics between turns\n- NPCs can surrender, flee, bargain, or cheat\n- Not every combat has to be to the death",
"custom": "## WORLD RULES\nCity guards fight to arrest: they subdue rather than attack until one of them is wounded.\nCultists of the Ashen Choir never surrender or flee."
}
}
}The engine's seeded keys, with each default's guidance condensed -- a new world ships the full versions, and custom here carries the kind of world-specific rule it exists for.
The engine's default keys
A new world ships this task pre-seeded with eight named instruction keys plus an empty custom -- the task's working base. The defaults generate intents for combat only: outside a fight they return none and leave the scene to the narrator.
| Key | What the default text carries |
|---|---|
core_principles | Frames the task as generating combat intentions for the current turn; an intent is an attempt for the engine to resolve, not an event that already happened. Only NPCs act; players can be targets |
when_to_generate | One case per turn: no fight and no NPC attacking now returns no intents; a fight underway, or an NPC starting one, generates the fighters' intents. Per fighting NPC: trivial/weak exactly 1, average exactly 2, strong 2-3, elite/boss/mythic 3-4, the first one an attack. Threats, drawn weapons and hostility alone do not start combat. An NPC surrendering, fleeing, withdrawing or refusing to fight gets one other intent |
what_is_not_action | Practice and sparring are not a real fight. During a fight, movement, speech, aiming and preparation fold into the combat action they support; other is only for surrendering, fleeing, withdrawing or refusing to fight |
description_economy | Plain language with enough detail to resolve the attempt, using only the NPC's established abilities, equipment and position and what the scene actually contains; multiple intents from one NPC stay distinct |
summary_established_beats | Past Story Summary and Recent Story record what already happened: continue from the latest exchange, respect settled disputes and successful player actions, and give NPCs only knowledge they have |
action_format | Combat, heal and buff intents are 1-3 imperative sentences naming the action, method and target; other describes the surrender, flight, withdrawal or refusal. Success is left unresolved |
story_driver | A final check: no fight means an empty intents array; otherwise every fighting NPC's tier count, first attack and targets are checked, one intent object per attempted action |
combat_tactics | Combat behaviour: use the NPC's abilities by name, fight in character (cunning, proud, cowardly, pack hunters, leaders), vary tactics between turns; NPCs may surrender, flee, bargain or cheat |
custom | Ships empty -- the slot for your world's own rules |
This task has its own rows in the Size Limits panel.
Fields
The task's real field set is the engine's eight seeded keys plus custom (see the table above) -- edit their content to change behavior.
custom
Ships empty: the slot for your world's own rules. Any other key you add beside the seeded ones is added to this task too.
Authoring pattern
Start from the seeded defaults and edit them in place -- each already owns a job, so a world rule belongs in the key that covers it:
- When intents are generated and how many each tier gets --
when_to_generate. - What counts as a fight and how an intent is phrased --
what_is_not_actionandaction_format. - How NPCs fight --
combat_tactics. - Continuity discipline --
summary_established_beatsalready ties intents to what the story recorded; sharpen it with your world's own red lines.
The patterns below come from community intent instructions written for out-of-combat intents, which the defaults no longer generate: outside a fight they leave the scene to the narrator.
- Scene classification first. The AI assigns each scene one category (for example combat, active social, hostile encounter, downtime, aftermath) before anything else, and each category then gets its own short rule block.
- Gates for who acts out of combat. An NPC the player addresses gets an intent; any other NPC acts only if it can perceive what it would react to and passes all three of urgency (a reason to act now), impact (it changes the scene rather than commenting on it) and redundancy (no other NPC is already covering that beat).
- An escalation ladder. Name the rungs (calm, annoyed, confrontational, hostile, violent), move one rung at a time in either direction, and only climb when player actions, the NPC's agenda or changed circumstances justify it.
- Calm scenes stay calm. In downtime and aftermath, no new threats or hooks unless something already established calls for them.