SCREE FORMAT


About This Template

By default, when compiled (File > Compile), this project can generate a plain text file in “twee” format, a flat-file Markdown-like format for gamebooks that is also used by the graphical gamebook editor Twine. Optionally, the template can also compile the “twee” file into an HTML gamebook using an additional compiler program such as Twee2 (http://twee2.danq.me) or Tweego (https://www.motoslave.net/tweego/); the instructions below include installation and use of these compilers.


You can also import an existing Twine or twee file into Scrivener by following the Import/Export directions below, and it will be separated into scenes for you automatically.


Installation

Install the Scree template: Unzip the appropriate Scree archive for your version of Scrivener.  This template is for Scrivener 3.  (For any Scrivener 2, or for Scrivener 1 on Windows, use the Scrivener 2 version of Scree.)  To install the template file, Scree.scrivtemplate, open the Project Templates window, either by just opening Scrivener, or, if it doesn't appear then, by choosing File > New Project from the Scrivener menus.  In the Options dropdown at the bottom right of the Project Templates window, click Import Templates…, then browse to and open the template file in the file dialog.  After that, you can create a new project using the Scree template.




If you have trouble installing Ruby and the gem on Windows (or MacOS), you can always use Tweego instead.  For more help with Tweego, see the documentation (https://www.motoslave.net/tweego/docs/).  Note that Twee2 does not support decompiling on Windows while Tweego does; Twee2 includes story formats while Tweego does not.


How To Use This Template


Compiling with Scrivener


Compiling Outside of Scrivener

You don't have to use the Scrivener post-proccessing options (and cannot use them if you have a Scrivener from the Mac App Store).  Instead you can compile Scrivener's twee output using a command prompt or terminal window.  First, navigate to the directory containing your compiled file.  (For help with this, see http://www.wikihow.com/Change-Directories-in-Command-Prompt.)

  1. If, for example, you saved your compiled story as mystory.txt, then you would type the following in the command prompt or terminal to compile with Twee2:  
  2. Twee2 and Tweego may give you a warning about a StoryIFID.  You can ignore this warning in Twee2, but in Tweego you should copy the text it gives you into the Twee Settings document in Front Matter on a new line.
  3. If all goes well, you can now open your html output file, mystory.html, in a browser, and read your story interactively.
  4. You can change story format at the Twee2 command line.  For example, you may need the SugarCube format on twee files that include an older style of Twine scripting:  
  5. You can also open your generated html file in Twine 2, at http://twinery.org/2/, or in a downloadable version of Twine 2 and change the story format there instead of at the command line.
  6. See the Tweego documentation for help doing similar actions using Tweego instead:


Making Changes

There are various minor changes you can make to the settings to tweak this template and Scrivener itself so that it better suits your needs, as follows:


Import/Export


Scripting and Styling


Credits

This template is by M. C. DeMarco, http://mcdemarco.net, and is released as-is.  Version: 3.0.3a, 26 July 2018.

Twee2 is by Dan Q, https://danq.me, and is released under GPL 2.0.

Tweego is by Thomas Michael Edwards, and is available under a BSD license.

Twine2 is by Chris Klimas and many others and is released under GPL 3.0.