Skip to content

Dialogue tools

Lint, preview and control branching dialogue.

3 tools in the dialogue category. Badges: read-only tools never change the project; mutating tools are undoable and attributed; open-world tools reach outside the engine and MCP clients ask before running them.

Tool Summary
dialogue_check Lint a .dialogue script (Yarn-style): syntax errors with line numbers, jumps to missing nodes (with did-you-mean), a missing start node, unreachable nodes, variables read but never set, empty nodes.
dialogue_preview Simulate a conversation without UI or play mode and get the transcript: every line (speaker, text, tags), each choice offered and taken, commands sent, node jumps, final variables and visit counts.
dialogue_control Drive a live conversation in play mode (enters play-paused when editing, like sim_control step): start a node, advance (finishes the typewriter first), choose an option (0-based), stop, or read the state (speaker, line, choices, typing).

dialogue_check

Check dialogue read-only

Lint a .dialogue script (Yarn-style): syntax errors with line numbers, jumps to missing nodes (with did-you-mean), a missing start node, unreachable nodes, variables read but never set, empty nodes. Also lists nodes (lines, choices, jumps), variables and custom commands (each becomes the Wander event "dialogue:"). Run it after writing or editing dialogue. Format: nodes are title: Name / --- / lines / ===; lines are Speaker: text #tag #portrait:name; choices are -> text with indented bodies; commands <>, < 1>>..<>..<>..<>, <>, <>, <>, <>.

Argument Type Required Description Values
path string Script file (project-relative .dialogue)
source string Script text (instead of path)
entity integer | string Entity whose dialogue component's script to check
start string Start node (default "Start")
dialogue_check {"path": "story/intro.dialogue"}
skywalker call dialogue_check '{"path": "story/intro.dialogue"}' --project my_game
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "dialogue_check",
    "arguments": {
      "path": "story/intro.dialogue"
    }
  }
}

dialogue_preview

Preview dialogue read-only

Simulate a conversation without UI or play mode and get the transcript: every line (speaker, text, tags), each choice offered and taken, commands sent, node jumps, final variables and visit counts. choices picks options in order by 0-based index or by a text fragment; when they run out the preview stops at the pending choice and lists it. Use it to test branches and variable logic. Example: {"path": "story/intro.dialogue", "choices": [0, "refuse"], "vars": {"trust": 2}}

Argument Type Required Description Values
path string Script file
source string Script text
entity integer | string Entity with a dialogue component
start string Start node (default "Start" or the component's startNode)
choices integer | string[] Choices to take, in order
vars object Initial variables (names without $)
max_steps integer Safety limit (default 500)
dialogue_preview {"path": "story/intro.dialogue", "choices": [0, "refuse"], "vars": {"trust": 2}}
skywalker call dialogue_preview '{"path": "story/intro.dialogue", "choices": [0, "refuse"], "vars": {"trust": 2}}' --project my_game
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "dialogue_preview",
    "arguments": {
      "path": "story/intro.dialogue",
      "choices": [
        0,
        "refuse"
      ],
      "vars": {
        "trust": 2
      }
    }
  }
}

dialogue_control

Drive dialogue mutating

Drive a live conversation in play mode (enters play-paused when editing, like sim_control step): start a node, advance (finishes the typewriter first), choose an option (0-based), stop, or read the state (speaker, line, choices, typing). Events reach Wander on the next tick (on dialogue "choice", "end", "").

Argument Type Required Description Values
action string yes What to do start advance choose stop state
entity integer | string Dialogue runner entity (default: the first with a dialogue component)
node string start: node to start at (default: the component's startNode)
choice integer choose: 0-based option index
dialogue_control {"action": "start", "entity": "Vale"}
skywalker call dialogue_control '{"action": "start", "entity": "Vale"}' --project my_game
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "dialogue_control",
    "arguments": {
      "action": "start",
      "entity": "Vale"
    }
  }
}