Skip to content

MarkTriggerFired

Referee: record that an authored trigger has fired.

Full documentation: MarkTriggerFired. Wire type: mark_trigger_fired.

Legal session modes: battle, encounter, exploring, game_over, town, victory

JSON Schema

{
  "description": "Referee: record that an authored trigger has fired.\n\nOne of the lifecycle commands a trigger-and-quest interpreter, a game's own\nlistener, or an LLM referee drives: the mark goes in before the trigger's\nconsequences issue, so fired-state is what answers once-only semantics, and it\nsurvives save, load, and replay like any other session state. Referee commands\nare legal in every mode, terminal modes included. Marking an already-marked\ntrigger is accepted and changes nothing: session state records that a trigger\n*has* fired, while each mark in the command log records *one* firing.\n\n`trigger_id` is an **open domain**: a mark records that something fired, needs no\nauthored trigger behind it, and a game drives it with ids from its own systems.\nThe quest lifecycle commands invert that deliberately:\n`ActivateQuest` and its three siblings\nresolve their ids against the adventure's quest specs, because the state they\nadvance is projected into the player view and an id with no spec behind it has\nnothing to show.\n\nModes:\n    `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n    None.\n\nEvents:\n    `TriggerFiredEvent` with the\n    trigger id and the beat, for every mark.",
  "properties": {
    "command_type": {
      "const": "mark_trigger_fired",
      "default": "mark_trigger_fired",
      "title": "Command Type",
      "type": "string",
      "description": "The wire discriminator. Each subclass fixes it to its own snake_case literal, like\n`\"move_party\"` or `\"open_door\"`, so you never set it yourself: constructing the subclass\ndoes. It's what `parse_command` and the\n`AnyCommand` union read to rebuild the right class\nfrom a serialized mapping, and it stays the same across releases."
    },
    "source": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source",
      "description": "An annotation naming the authored object (a trigger or quest id) or the game\nsystem on whose behalf the command was issued. Execution never reads it: a stamped\ncommand does exactly what the same command unstamped does. It is logged and replayed\nwith the command, so the log alone answers \"why did this happen\". Absent is `None`,\nand the empty string is not a value."
    },
    "trigger_id": {
      "minLength": 1,
      "title": "Trigger Id",
      "type": "string",
      "description": "Which trigger fired. The domain is open: the id needs no authored trigger behind it, so a\ngame marks its own systems' events with its own ids. Session state records a mark once,\nwhich is what answers once-only questions, and the command log records every mark as its\nown line."
    },
    "narrative": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Narrative",
      "description": "The authored beat for the firing, included on the event at referee\nvisibility. Trigger internals are the game's secret, so this is the referee's\nline about the wiring. The players' line is a journal entry\n(`AddJournalEntry`). Authored text on a\ncommand is content data in a structured field, and the command still has\nits type and its facts."
    }
  },
  "required": [
    "trigger_id"
  ],
  "title": "MarkTriggerFired",
  "type": "object"
}