Narrative Events

narrativeEvents

narrativeEvents are one-off cues for story moments that play out over one or more turns. Unlike a plain trigger, a narrative event stays active while the engine watches for its intended outcome; when that outcome clearly happens, it completes and can fire normal trigger effects. Use them for briefings, ambushes, staged reveals, boss entrances, short challenges, or any guided scene that needs continuity across turns.

In the editor

"Multi-turn narrative beats that can be started by triggers"

Editor location
Files → World → Advanced → Narrative Events
Editor type
Edit in Studio + View JSON
Size limits

No character-length caps for this section.

Schema

json
{
  "narrativeEvents": {
    "<key>": {
      "title": "string",
      "beats": "string",
      "targetTurns": "number",
      "onCompleteEffects": [
        {
          "type": "story",
          "instruction": "string"
        }
      ]
    }
  }
}

Example: a narrative event

json
{
  "narrativeEvents": {
    "wounded_courier": {
      "title": "The Wounded Courier",
      "beats": "A wounded courier should stagger into the scene and collapse. His wounds are serious enough that he can't get up again on his own, and he is unable to speak more than a gasped syllable at a time. With bloody hand, he should produce a letter and try to hand it to the player. With his dying breaths, he should plead for the letter to be taken to the king before it is too late.",
      "targetTurns": 3,
      "onCompleteEffects": [
        {
          "type": "quest-init",
          "operator": "set",
          "value": "Deliver the Sealed Letter"
        }
      ]
    }
  }
}

The event above does nothing until a trigger starts it. A trigger fires a narrative-event-start effect naming the event by its map key:

Starting it with a trigger

json
{
  "deliver_letter_intro": {
    "name": "deliver_letter_intro",
    "recurring": false,
    "conditions": [
      {
        "type": "party-location",
        "operator": "equals",
        "value": "The Forest Road"
      }
    ],
    "effects": [
      {
        "type": "narrative-event-start",
        "eventId": "wounded_courier"
      }
    ]
  }
}

Fields

title

Required. A short name for the event. The engine uses it to track and check the active narrative event; it is not exposed to the storyteller or intent functions, so it is a label, not part of the guidance. Triggers reference the event by its outer map key (through eventId).

beats

Required. The main instruction text. While the event is active the engine gives this to the storyteller and to intent functions, and it uses this same field to decide whether the event's intended outcome has happened. Write it as something the AI can plausibly stage in the story: who appears, what happens, and what state signals it is done.

targetTurns

Optional number -- a pacing target in turns that tells the storyteller roughly how quickly to move through the event. Nothing is forced when the target itself is reached. As a fallback, once the event has run for twice targetTurns active turns, the engine force-completes it -- but only at the end of a turn where the AI judged the outcome neither complete nor stopped (AI verdicts always win first). A forced completion fires onCompleteEffects exactly like a normal one. Omit targetTurns to leave the pace open with no forced cap.

onCompleteEffects

Optional list of normal trigger effects -- quest-init, story, write-boolean, player-resource, narrative-event-start, and so on. The engine fires them after it decides the event is complete, letting the event hand off into the rest of your world.

For quest-init, the value is the authored quest's key. Which next-step effect fits follows from what each one takes: quest-next-step-set needs a questId, so it cannot run before the quest exists, while party-next-step-set carries only text and source and works at any point. Setting source matters because the engine clears next steps by source, so an event-sourced hint goes away with the event rather than lingering.

How narrative events work

A narrative event is a named entry in the narrativeEvents map. Defining one does not start it:

  • Start -- a trigger fires a narrative-event-start effect naming the event's key.
  • Run -- while active, the beats steer the storyteller and NPC intents, and the engine watches the story against those same beats.
  • Complete -- when the engine judges the outcome has happened, the event completes and its onCompleteEffects fire.

Three rules shape how you design them:

  • Only one narrative event is active at a time. Design chains and pacing around this; write beats that can play out fully before the next thing must happen.
  • They are always non-recurring. A given event runs once per start.
  • They can suspend and later resume. An event is rooted in the location where it starts, and the engine marks it stopped when it judges the player has disengaged. A stopped event stops steering the scene, but it is not a dead end -- a trigger can start it again and it resumes where it left off. See Suspending and resuming.

Triggers can gate on an event's progress with the narrative-event-status condition, and a quest can complete when an event completes via completionCondition: { "type": "narrative-event-completed", "eventId": "..." } (see Quests).

For example, a later trigger can act once this event has completed:

json
{
  "type": "narrative-event-status",
  "eventId": "wounded_courier",
  "operator": "equals",
  "value": "completed"
}

The statuses worth checking are active, completed, and stopped -- stopped means the event was suspended and can still resume (see Suspending and resuming).

What happens in play

Say a scene starts wounded_courier while the party is on the forest road.

The player engages. The courier staggers out, warns of riders, and presses the sealed letter into the player's hands over a couple of turns. The player clearly understands the job -- the engine marks the event complete and fires onCompleteEffects, so the quest Deliver the Sealed Letter is offered.

The player disengages. If the player defers, shifts focus, or wanders off without meaning to continue the scene, the engine marks the event stopped: it stops steering the scene, no quest starts, and nothing tied to its completion runs -- the story continues from the player's choice. It is not lost, though -- if a trigger starts it again, it resumes where it left off. Pushing back on the scene, arguing, negotiating, fighting, investigating, does not suspend it; that is still engaging.

Suspending and resuming

Each turn, the engine makes an AI judgment about whether the player has disengaged, and marks the event stopped when the player leaves the event's location, defers it, shifts focus away from it, or shows a clear desire to disengage. Two guardrails keep this from misfiring:

  • Leaving the location only counts when the player is no longer trying to continue the event. Travel that naturally carries the scene forward does not suspend it -- location exit is a signal, not a hard rule.

  • Active engagement never suspends it. Arguing, skepticism, negotiation, combat, investigation, partial cooperation, or anything else that naturally continues the event keeps it running.

Resuming. A stopped event is not a dead end. On any turn where no event is active, the engine re-checks every world and quest trigger whose effects include a narrative-event-start pointing at a stopped event and re-evaluates that trigger's conditions. If one fires, the event resumes: it returns to active, re-captures its starting location at the party's current position, and keeps its turnsActive -- so the force-complete clock (twice targetTurns) does not reset on resume.

A completed event is different: only a recurring trigger can start it again, and that restart resets the turn count to zero.

Chaining events

Because onCompleteEffects are ordinary trigger effects, an event can start the next one when it finishes:

json
{
  "onCompleteEffects": [
    {
      "type": "narrative-event-start",
      "eventId": "next_scene"
    }
  ]
}

That lets you chain across mechanics -- trigger to event, event to event, event to quest, quest-progress to event, and so on -- for briefings, staged encounters, multi-step introductions, boss scenes, and quest handoffs. Since only one event runs at a time, sequence them through completion rather than starting several at once.

The event to quest handoff is especially useful with the current UI, which surfaces the immediate objective above the input bar -- use it to give the player meta-guidance for navigating a chain.

Authoring tips

  • Prefer onCompleteEffects for what happens next. For most cases, let the event fire its own effects when it finishes. Reach for the narrative-event-status condition or a quest's narrative-event-completed only when another trigger or quest needs to watch the event from outside.
  • Keep beats concrete and stageable. Name who appears and what happens; write what the AI can act out in the current scene, not abstract state. The clearer the intended outcome, the more reliably the engine can tell the event is done.
  • Don't use them for background guidance. Narrative events are location-rooted, non-recurring, and suspend when the party leaves, so they are wrong for permanent world guidance or general story-state changes -- use a recurring trigger for that.
  • Guard against accidental suspension. The engine suspends an event when it judges the player has disengaged, so deferring or wandering off mid-scene can stop it unintentionally. When it matters, give the storyteller guidance to keep the scene in place until the beat resolves; and keep the trigger that starts the event available, so a stopped scene can resume.