Problems and checks

Tsumugi checks your story while you type. It finds mistakes before they become bugs in the game.

The four kinds

Kind Colour Means
Broken Red The game would stop here, or show something wrong. Fix these first.
Needs code Purple The story asks for something the game can’t do yet. A programmer still has to write it.
Needs art Amber A picture is missing, or is still a placeholder.
Worth a look Grey Probably fine, but worth checking.

Each kind has its own style of underline as well as its own colour, so you can tell them apart without colour. You can change the colours in Settings.

What Tsumugi checks

This list grows as Tsumugi learns more. The main checks:

  • The file’s shape. Every node has a title:, a unique name, and an end (===). Nothing is written outside a node.
  • Branches. Every <<if>> has its <<endif>>. Every <<else>> and <<elseif>> belongs to an If.
  • Jumps and hops. The node they lead to exists, in this file or another. If not, Tsumugi suggests the closest name: Did you mean …?
  • Files the game loads. Every story file is in your game’s Included Files, and your game loads it.
  • Commands and events. Each one is a Chatterbox command or one of your game’s events. Events your game has no code for yet need code.
  • Art. Every portrait, item, area, map place and unlock icon the story uses has a picture.
  • Variables. Each variable the story checks or changes has a starting value.
  • Text that fits. Lines, pages and options fit your game’s text area (Nodes and lines).
  • Options. No option is empty, no more options show than your game can fit, and no line ends a menu by mistake.
  • Writing. Lines no character says, colons in narration, Scribble tags Tsumugi doesn’t know, and spelling.

Where problems show

  • In the writing: the line is underlined in its colour.
  • In this node: under the writing, a list of the open node’s problems. Click Go to this line to jump to one. The same problem on several lines is one row, with + more to see the others.
  • On the map: the node’s box takes the colour of its worst problem.
  • Under the map: counts for the whole file. Click one to see those problems in the Needs tab.
  • The Needs tab: everything still to do, in one list. See Missing art and code.
  • VS Code’s Problems panel: broken lines are errors. Needs code, needs art and text too long for the text area are warnings. The rest are information. Click one to go to it. This works in the text editor too.

Fixing

Some problems have a fix button, like Move it in for a line that should be under an option. Click it, and Tsumugi makes the change in the file. ⌘ Z takes it back.

In the text editor, the light bulb offers the same fixes, and spelling suggestions. See Editing .yarn as text.

Missing art and code can be made from the Needs tab: placeholders for your artist, and empty functions for your programmer.

Turn a check off

  • Lines no character says: untick Warn about lines no character says in Settings, if your game shows narration with no name.
  • Spelling: untick Check spelling in Settings.

Check every file at once

Run Tsumugi: Check the Story from the Command Palette, or click Check every story file in the Tsumugi sidebar. Tsumugi checks every story file in the game, and says whether anything would break it. Show Details lists each problem. It changes nothing.

This is the same check that runs before every Git push. See Git and the pre-push check.