T.TAO
Core Creation

Story System

The Story System is the core module of Alfheim for writing, organizing, and testing game narratives. It provides a visual node-graph editor, built-in dialogue writing tools, and instant preview functionality.

Feature Overview

  • Organize stories by Episode (chapter)
  • Node-graph visual editing with 8 node types
  • Built-in dialogue editor with speaker selection and script editing
  • Conditional and random branching
  • Episode-level variable system
  • Folder grouping management
  • Instant test run

Three Work Tabs

The Story panel has three tabs at the top:

Story Planning

The main story editing environment, containing the node-graph canvas and related panels.

Yggdrasil (World Tree)

Timeline and calendar system. See Yggdrasil Timeline for details.

Test Run

Experience the current story from the player's perspective. See the Test Run section on this page for details.

Episode Management

Episode (chapter) is the basic organizational unit of a story. Each Episode is an independent story file with its own node graph and variables.

Creating an Episode

  1. On the Story Planning page, click the Story Selector at the top.
  2. Click New Story.
  3. Enter the Episode name and confirm creation.

Switching and Deleting

  • Switch between Episodes via the top dropdown menu.
  • Delete unwanted Episodes in the Story Selector.

Folder Grouping

Nodes can be grouped and organized using folders:

  1. Click New Folder in the Folders panel on the left.
  2. Name the folder.
  3. Drag nodes into the folder to categorize them.

Nodes not assigned to a folder appear in the "Uncategorized" group.

Node Types

Stories are composed of different types of nodes connected together. Create new nodes via the Add Node menu on the toolbar.

Start Node

The entry point for each Episode. Each Episode has only one Start node; the story begins execution from here.

Dialogue Node

The most commonly used node type for character dialogue and narration. Dialogue nodes can contain multiple lines, each with a different speaker.

Condition Node

Determines story flow based on variable values. After setting conditions, the Condition node outputs different branch paths.

Random Node

Randomly selects one path from multiple output branches for execution. Suitable for scenarios requiring randomness.

Set Variable Node

Modifies variable values. Can perform assignment or arithmetic operations on integer, float, string, or boolean variables.

Event Node

Triggers special events in the game, such as scene changes, playing sound effects, etc.

Comment Node

Used to add notes and explanations in the node graph. Does not affect actual game execution; for creator reference only.

End Node

Marks the end of the story. An Episode can have multiple End nodes representing different endings.

Node Graph Editing

Connecting Nodes

Drag from a node's output port to another node's input port to create a connection. Connections represent the flow direction of the story.

Edit and View Modes

The toolbar provides two mode switches:

  • Edit Mode: Move nodes, create connections, modify content.
  • View Mode: Lock the canvas for viewing only; suitable for review.

Node Inspector

When any node is selected, the Inspector panel on the right displays the node's details:

  • Node ID (copyable)
  • Node name
  • Node type
  • Enter conditions (optional)
  • Variable operations (optional)
  • Dialogue preview (Dialogue nodes only)
  • Notes

Dialogue Editing

Double-click a Dialogue node or click Edit in the Inspector to open the Dialogue Editor.

Writer Mode

A WYSIWYG editing environment for story creators:

  • Write lines of dialogue one by one
  • Select a speaker (character or narrator) for each line
  • Add branch options

Program Mode

For advanced users who need fine-grained control:

  • Edit dialogue data directly in the script editor
  • Syntax highlighting and auto-completion support

Episode Variables

Each Episode can define its own local variables for conditional logic and state tracking within that chapter.

  1. Click Add in the Episode Variables area of the Inspector.
  2. Enter the variable name and select the type (integer, float, string, boolean).
  3. Set the default value.

Episode variables are independent of global variables. For variables shared across chapters, use global variables in the Variable System.

Episode Characters

Manage characters used in the current Episode on the Story Planning page:

  1. Open the Episode Characters panel.
  2. Search for and add existing characters from the project.
  3. Added characters can be selected as speakers in dialogue editing.

Test Run

Switch to the Test Run tab to experience the story as a player would.

Interface Components

  • Dialogue Box: Displays current lines; click to advance dialogue.
  • Character Stage: Shows the speaking character's portrait.
  • Options Panel: Appears when branch options are available for player selection.
  • Node Info Panel: Displays debug information for the current node.
  • Playback Controls: Fast-forward, pause, reset, etc.
  • Debug Console: View variable state and execution logs.

How to Use

  1. Select the Episode to test in Story Planning.
  2. Switch to the Test Run tab.
  3. The story runs automatically from the Start node; click the dialogue box to advance.
  4. Make choices in the Options Panel when branches appear.
  5. Use the Debug Console to monitor variable changes.

Tips

  • Use Comment nodes to mark important information in the node graph for team collaboration.
  • Regularly use Test Run to verify story flow and ensure all branch paths work correctly.
  • Folder grouping significantly improves node management efficiency in large projects.
  • Node IDs can be copied from the Inspector for use in scripts.