Nodes
t-Plot script files contain nodes. Nodes are where your story is written. A file can contain as many nodes as needed, but we recommend organizing nodes into files based on their meaning, for example, one chapter per file. Nodes help break the story into manageable parts, making it easier to work with longer narratives and branching paths.
Each node consists of, at a minimum, a header and a body. Every node must have at least one header, which is the title. The title gives the node its name, and the body contains the Yarn script with the dialogue for your game.
The node title is important because the game uses it to determine which node to start executing. The title is also used when jumping between nodes.
The node title is not shown to the player.
Node titles must begin with a letter and can only contain letters, numbers, and underscores.
For example, FirstNode, First_Node, and Node1 are valid, but First Node and 1stNode are not.
Writing Nodes in a Text Editorβ
A t-Plot node looks like this:
title: Node_Title
---
Here is your first line!
Awesome!
===
In this example, Node_Title
is the name of the node, which is set in the title
header on the first line. You can also add other headers as needed.
The ---
marker indicates where the body of the node begins. After this point, you can write the Yarn script. The ===
marker indicates the end of the node. After this, you can start writing the next node.
Additional Parametersβ
You can add extra parameters to override the values set in the settings, but only for this specific node.
title: Node_Title
wait: 4
time_for_status: 3
reaction: std
checkpoint_name: βChapter 1β
is_entry_point: true
---
Here is your first line!
Awesome!
===
waitβ
The wait
parameter specifies how many seconds to wait before sending the next message.
time_for_statusβ
The time_for_status
parameter specifies how many seconds to show the sending status.
reactionβ
The reaction
parameter specifies what reaction to show if the user sends an unexpected response.
checkpoint_nameβ
The checkpoint_name
parameter sets the name of a checkpoint. The user will be able to return to this checkpoint at any time.
The checkpoint_name
must be in quotes. You can use any characters except quotes, but remember that this name will be displayed to the user in the checkpoint menu. Make sure it is clear and short so that it fits in the checkpoint selection button.
is_entry_pointβ
The is_entry_point
parameter specifies whether the node is an entry point. If set to true
, the node will be used as the starting point for the script.
Only one node can be set as the entry point.