AI Agent Hub
Back to skills
🤖

Branching Dialogue Systems

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_3c6cb52e/dialogue-systems-sh-ljpnwj into your AI assistant according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

Dialogue in games usually needs more than displaying a line of text. It has to change later content based on player choices, existing flags, and numeric state. If dialogue lines, branches, conditions, and variables are all embedded in scripts, maintenance, localization, and testing become harder to reason about.

How It Works

This skill models dialogue as a graph: nodes hold lines, choices, commands, or jumps; conditions gate options; and variables remember what the player has done. It helps choose between Ink, Yarn Spinner, and a custom JSON resource graph:

  • Ink is author-oriented and fits dialogue-heavy or CYOA narratives.
  • Yarn Spinner is node-based and fits game-driven logic with many engine hooks.
  • A custom runner fits minimal-dependency or full-control scenarios. The goal is to build a graph, not to invent a scripting language.

The core steps are to define the node contract, separate variables from flow, localize from the start using line IDs and string tables, and drive the runner as a state machine in the game loop: current node, emit content, wait for input, advance branch, then validate that every path terminates correctly.

Boundaries

This skill does not render UI text boxes, portraits, or choice buttons, and it does not persist state across sessions. If dialogue state needs to be saved, pair it with save-systems; if dialogue data should live in Godot or Unity, use the relevant engine resource skills.

Use Cases

  • Design localized branching dialogue trees for visual novels.
  • Gate RPG choices by relationship values, gold, and seen-flags.
  • Integrate Ink or Yarn Spinner scripts into the game loop.
  • Refactor hardcoded lines into line IDs and string tables.

Best For

  • Writer for visual novels who needs maintainable choice and variable graphs.
  • Client engineer who must drive dialogue state machines in the game loop.
  • Localization lead who needs line IDs and string tables instead of hardcoded text.
  • RPG gameplay programmer who gates options by flags and numeric values.