Chatterbox syntax
Tsumugi saves plain Chatterbox. This page lists what it reads and writes, in short. The Chatterbox documentation explains each command in full.
A node
title: Harbour
tags: Draft
color: blue
---
// The node's lines go here.
Ayumi: The boats are back.
===
| Line | Means |
|---|---|
title: Harbour |
The node’s name. One word, unique in the file. |
tags:, color: |
Tsumugi’s own labels for the map. Chatterbox ignores them. |
--- |
The node’s lines start here. |
=== |
The node ends here. |
Lines
| Line | Means |
|---|---|
Some words. |
Narration: no name in front. |
Ayumi: Some words. |
A character speaking. Anything before the first colon is the name. |
Ayumi_Happy: Some words. |
A character with a portrait: the part after _ is the expression. |
// A note |
A comment. The game ignores it. Also at the end of a line. |
-> Some words |
An option. Lines indented under it belong to it. |
-> Some words <<if $x > 1>> |
An option that shows only when its check is true. |
Commands
| Command | Means |
|---|---|
<<jump Harbour>> |
Go to a node. |
<<jump ChapterTwo.yarn:Harbour>> |
Go to a node in another file. |
<<hop Shop>>, <<hopback>> |
Visit a node, then come back. |
<<jumpback>> |
Go back to the node the story jumped from. |
<<stop>> |
End the conversation. |
<<wait>> |
Wait for the player. |
<<set $courage to 3>> |
Change a variable. = works as well as to. |
<<declare $courage = 0>> |
Give a variable a starting value. |
<<if …>>, <<elseif …>>, <<else>>, <<endif>> |
Lines that happen only sometimes. |
<<random option>> |
The game picks one of the options below. |
<<addItem("Fish")>> |
One of your game’s events: any function your game gives Chatterbox. |
Tsumugi also knows Chatterbox’s other built-in commands, so they need no game code.
Checks
Checks go inside <<if …>>.
- Compare with
==,!=,>,<,>=,<=, or the wordsis,eq,neq,gt,lt,gte,lte. - Join with
and,or,not(or&&,||,!). - Built-in functions include
visited("Node"),optionChosen()andonce("id"). - Your game’s own functions work too. The preview counts them as true.
In the text
| Write | Means |
|---|---|
{$courage} |
Shows the variable’s value. |
[wave]words[/wave] |
A Scribble tag: colour, effect or sprite. |
[[ |
A real square bracket. |
#line:12ab |
A hashtag. The player never sees it. |
\n |
A new line. |
Lines that start with >
> gets Onigiri is not Chatterbox. It is how you type an event in Tsumugi. Press Enter and it becomes the Chatterbox command. A > line left in the file is shown as broken until you finish it. See Events.
Spaces
Indentation shows what belongs to an option. Tsumugi keeps one tidy style, four spaces a step, and keeps your file’s line endings (Windows or not).