What Tsumugi changes

Tsumugi can add things to your game for you: story files, placeholder art, scripts for events. Before it adds or changes anything in your project, it shows what it will change and asks first.

The rules it keeps

  • It asks first. You see the list of changes before anything is written. Only what you save yourself is written straight away: settings from the Settings tab, words added to the dictionary, and variables removed in the Variables tab.
  • Your own code is changed only when you ask. That is two things: adding a line that loads a story file, and renaming a name everywhere (Names and renaming). Everything else goes in new files, or in scripts Tsumugi wrote itself.
  • It never deletes your files or resources. To delete something, use GameMaker.
  • It never replaces finished art. Placeholders can be replaced. Your artist’s work can’t.
  • All or nothing. If a file changed since you said yes, or anything goes wrong, nothing is written, and earlier changes are put back.
  • It keeps your project’s style. Line endings, and the order GameMaker keeps lists in, stay as they are. If Tsumugi can’t be sure how to change a file, it refuses rather than guess.

What it may add

What When
tsumugi.json Set up this project, and settings saved from the Story Writer.
A new .yarn file, and its Included Files entry New story file…
A ChatterboxLoadFromFile line, under your last one When a story file isn’t loaded yet.
Sprites Placeholders, your own pictures, unlock icons and animations, from the Needs tab.
Objects, placed in a room New areas, map markers, and the box for typed answers.
Scripts Story variables, events, unlocks, map places, player input and the test start.

Scripts it writes

Tsumugi’s scripts start with this line:

// Written by Tsumugi.

Tsumugi changes only scripts with that line. They go in a Tsumugi folder in GameMaker’s asset browser, the way Chatterbox and Scribble keep theirs. If its scripts are already in another folder, new ones go there.

For programmers

When the story needs a new event, Tsumugi adds an empty function to its events script, registered with Chatterbox, with a @tsumugi-stub line inside:

  1. Write what the event does.
  2. Delete the @tsumugi-stub line.

The event then stops showing needs code. New functions are added at the end of the script.

You can rename these scripts under generated in tsumugi.json.

Tip

Keep your game in Git. You can then see every change Tsumugi made, and take back any of them.