Skip to content

When a writer edits a line, Tone is designed to notice, outline that one line and wait for you before anything is regenerated.

Published
By
The Tone team
Reading time
2 min read

Scripts change late, and usually by a word or two. A Short Hike (adamgryu, 2019) has a small, real example. Between a copy of its script extracted in January 2020 and another from July 2020, both made by fan translators, one of Avery’s lines changed:

- so there's this abandoned building\nto the east of here+ so there's this abandoned building\nto the west of here

One word, in one line, in a game with no voice acting. Had the game been voiced, that word would have needed a new take, and someone would first have had to notice it.

Knowing which line moved

The hard part of a late change is not the new take. It is knowing which lines changed. Without a record of each line, the safe move is to regenerate the whole scene, or the whole script, and to hope that the files which come back still have the names the game expects.

A Short Hike is written in Yarn Spinner, which gives every line a code of its own. In the game’s line table for version 1.10.2, the line is listed under its code, with its speaker:

line:021dc4   Avery   so there's this abandoned building\nto the west of here

The code stays the same when the wording changes. That is what lets a tool tell an edited line from a new one: the same code with new words means the line was edited.

I used Yarn Spinner to integrate dialogue trees into my game pretty quickly.

Adam Robinson-Yu, in Game Developer’s “Road to the IGF”, 21 Feb 2020

What watching means

Tone is designed to watch the script file. Every time a line changes, you are alerted, the line is outlined in the liquid gradient, and you choose whether to accept it. Accepting does not regenerate anything. It brings the new wording in and makes a candidate take beside the approved one, so nothing you liked is replaced, and nothing is generated or spent until you say so.

The dialogue tree on our home page, with Avery’s changed line open on its incoming change from MountainQuest.yarn: east struck out, west added.
The dialogue tree on our home page uses this real edit: line 021dc4, east to west.

Three rules come with it:

  • Keep the ids you already have. Lines stay under the ids your project uses, so the files your engine loads keep their names.
  • Flag what cannot be read. A line Tone cannot map is shown to you, not guessed at.
  • Change only what changed. Lines whose words did not move keep their takes, approved or not.

The formats

Tone is designed to read scripts from Yarn Spinner, Ink, Ren’Py, CSV, XLSX, JSON and Final Draft, and to keep each format’s own line ids where it has them. The fix in A Short Hike is the whole idea at its smallest: the line kept its code, one word changed, and only that line would have needed a new take.

Comments

Add a comment

Up to 1,000 characters. Enter posts; Shift and Enter start a new line.