Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Twee file format

Stormrose edited this page · 1 revision

Twee File Format Primer

The Twee file format is a text based format for the Twine authoring system. File will typically have the extensions .twee .tw or .txt . Twee files are considered to be the text file equivalent of the Twine cpickle based .tws format.

The basic unit of organisation in a .twee file is the "Passage". Passages begin wherever a line begins with a double colon. Passage end either when another passage begins or the file ends. Following the double colon is the passage title which may contain spaces. After the passage title is an option set of tags. Tags are space delimited and contained within square brackets. Following this a newline and the the passage contents.

::Passage Title 1 [tag1 anothertag yet_another_tag]
This is part of passage one.

::Passage Title 2
more content

Special Tags

Twine recognises a few special tags that alert Twine how to handle the passage:

  • script for passages that contain Javascript. The code within is run before the Start passage is displayed.
  • stylesheet these passage contain CSS code for styling the HTML output. The stylesheets are injected into the output HTML before the start passage is run.
  • Twine.private For passages that are not output into the .html story files. Use these to contain notes. (Deprecated: the tag "private" does the same thing).

Passage content

Generally passage content will be in Twine's tiddlywiki based syntax.

Something went wrong with that request. Please try again.