NOTE: while the Guide is in its complete form,
it will be updated when SugarCube 2 updates (or if I spot a typo/error).

The 100% Good Twine SugarCube Guide!

This SugarCube Guide was create as an alternative to the official documentation, providing a comprehensive and wide look of over the use of Twine, particularly the SugarCube format.

The Guide is compartmentalised in (currently) four categories:

  • The Basics
    • or the absolute basics to start with SugarCube
    • No need for extra knowledge. Just the base needed to make something.
  • The Basics+
    • adding interactivity, and creating a fully rounded IF game
    • May require a bit of CSS knowledge (formatting rules)
  • Intermediate Mode
    • adding more customisation and complex code
    • Will probably require some CSS knowledge, and maybe some JavaScript
  • Advanced Use
    • the most complex macros and APIs
    • Will surely require some JavaScript/jQuery knowledge

Each category explains a multitude of aspects of the format, tailored to a specific level of the user. More simpler explanations and examples are available in earlier chapters, compared to the later ones.

If something is unclear, you found a mistake, you would like more examples in the guide, or would like a feature covered, let me know!

The Guide currently covers all macros (as of SugarCube v.2.36.1*), all functions and methods, and APIs. It touches upon the use of HTML, CSS, JavaScript and jQuery, when relevant. It also discusses aspects of accessibility.
*In case of format update, this Guide will make relevant edits.

The Guides also provides a list of further resources, for the different coding languages.

The Guide is available in a downloadable form for offline view:

  • HTML file that can be opened in Twine
  • .tw file that can be opened in Twine
  • source code, separating the chapters, .js and .css files
Roadmap (not fixes)

Below are the elements planned for addition in the Guide.
An announcement will be made when they will be included.

  • Adding the answers of the Coding Support posts
  • The Audio API
  • More Demos?
  • Update when the new SugarCube version comes out


Twine® is an “an open-source tool for telling interactive, non-linear stories” originally created by Chris Klimas maintained in several different repositories ( Twine is also a registered trademark of the Interactive Fiction Technology Foundation.

SugarCube is a free (gratis and libre) coding format for Twine/Twee created and maintained by TME.


SugarCube Guide.twee 443 kB
SugarCube Guide.html 1 MB
Download 141 kB

Development log