« Home

Gordian Book

Formats a traditonal choose-your-own-adventure style gamebook from Twine / Twee


Gordian Book imports a Twine game (either a Twine Archive, or a Twison/Twee version), and converts it to a gamebook output by numbering and shuffling the paragraphs, and converting links to the appropriate "turn to page x" form. Once converted, you can view the game in the browser, download as a standalone HTML file (e.g. for further editing), or export it as a simple PDF. (See Workflow notes).


Getting Started

The best way to learn to use Gordian is to follow the tutorial.

Learn better from an example? Download the following and open it in Twine: Skeleton Passage (which is used in the tutorial)

Or, if you just want a blank starting point: Blank Story


Create your Adventure
Create your adventure in Twine (twinery.org) using the format of your choice (Gordian supports formatting for Harlowe 3, Sugarcube 2, and WritingFantasy), or write it in Twee format. This export is intended for a paper output, so avoid using variables, javascript and the like.
Links will be formatted as "Link name (turn to X)". If you just want "turn to X" us the special link name turnto (or Turnto to force an initial capital). To just get the number as a link, use the link name #.
Special Passages
The following special passages will be extracted:
  • gb-settings: Used to store your Gordian settings in JSON (see Export Settings)
  • gb-templates: Used to store your Gordian templates (see Templating System)
  • gb-placeholders: Used to store your Gordian placeholders (see Placeholders)
  • gb-front-cover: Used to create the PDF front cover
  • gb-introduction: Placed before the first numbered entry
  • gb-rear: Placed at the end of the PDF, after a page break
  • gb-rear-cover: Used to create the PDF rear cover
Special Tags
You can tag your passages with the following special tags: (Certain alternatives are supported for compatibility with WritingFantasy)
  • backmatter: Appears between the last numbered passage and gb-rear. Use backmatter_1 (etc.) to order multiple tagged passages.
  • breakbefore: The game will insert a pagebreak before this passage
  • breakafter: The game will insert a pagebreak after this passage.
  • death: The game will show 'YOU DIED'. You can customise the text in settings
  • end: The game will show 'THE END'. You can customise the text in settings
  • frontmatter: Appears between the front cover and gb-introduction. Use frontmatter_1 (etc.) to order multiple tagged passages.
  • last: The game will put this passage at the end of the numbered passages. If multiple last passages exist they will end up at the end in the order encountered. (Synonym: ending)
  • long: The game will not try to avoid page breaks in this passage
  • skip: The game will skip this passage. (Synonym: hidden)
Link Syntax
Links work as expected for Twine (e.g. [[text->passage]], [[passage<-text]], [[text|passage]]) with some special link names:
  • #: Makes a link out of the passage number
  • turnto: Makes a link with the text "turn to X", where X is the passage number. Tries to guess if the T should be upper or lower case.
  • Turnto: Makes a link with the text "Turn to X", where X is the passage number.
  • returnto: Makes a link with the text "return to X", where X is the passage number. Tries to guess if the R should be upper or lower case.
  • Returnto: Makes a link with the text "Return to X", where X is the passage number.
  • literal:text: Makes a link with "text" and doesn't include the passage number.
Numeric Tags
You can tag a passage with a number to reserve that paragraph number in the final game — make sure to pick a valid number. (Synonym: fixednumber_<number>)
Special HTML
The following html-like tags will get special styling:
  • <after> Content placed following the passage (e.g. an image) (see Workflow notes)
  • <before> Content placed preceeding the passage number
  • <check> For inline rules text and checks
  • <checkboxes> Creates a row of checkboxes (see Checkboxes)
  • <checkbox-list> Creates a list of passages with checkboxes (see Checkboxes)
  • <item> Marks an in-game item (also <it>)
  • <keyword> Marks a keyword (see Keywords)
  • <keywords> Outputs a list of keywords (see Keywords)
  • <page-before> Content placed on a new page preceeding the passage (e.g. a full-page illustration)
  • <reference> Prints the number of the referenced passage (e.g. <reference>home</reference>), (also <r>)
  • <rules> For boxed out rules text
  • <special> Use inside <stats> for special abilities
  • <stats> For monster or NPC stat blocks
If you wish, you can prefix custom tag names with gb-, for example if your development environment cares about them.
Macros are not supported with the exception of (display: "passage name") and <<include "passage name">>, which cannot be nested.
Text Formatting
The majority of Harlow Markdown and Sugarcube Wiki-Formatting is supported, see Supported Text Formatting.
Gordian has a templating system. Read the full guide.
Export from Twine
Export your adventure, by using Twine's "Publish to File", or using a format such as Twison or Entweedle, or by authoring it in Twee. Then, copy or save the resulting file. (You can use Twee created outside Twine if you wish, as long as you use Harlowe 3, Sugarcube 2, or plain HTML for your formatting.)
Import into Gordian
Click the Import Game link, and paste your game into the import window, or upload your exported file, and click Import, your game is now loaded into the Gordian. All further steps work on this imported copy, so if you change your Twine original you'll have to export it and import it again.
After you import the game, it will be converted into a gamebook. This happens automatically, though you can convert it again by clicking the Convert to Gamebook link. This will do the following:
  • Extract the Introduction, if any.
  • Number each paragraph, except the start, randomly
  • Order the newly numbered paragraphs
  • Trace any links and add numbers to them
  • Process your Markdown, Harlowe styling, tags, and markup
  • Extract any marked up keywords
If you don't like the random order produced, you can convert again until you do.
Use the Play Gamebook link to view the gamebook in the browser. Use Export Settings to save a copy of the game settings only. User Print to get your PDF for printing or downloading. For details of how Gordian formats the HTML that generates your PDF, see: generated html.
Other formats:
  • Gordian JSON — a complete dump of the converted game, use to re-import later
  • Twine Archive — use to re-import into Twine
  • HTML — an HTML version of the game suitable for proofreading (can be imported to Google Docs)
  • Twee — a Twee3 version of the game, use to import elsewhere


Gordian doesn't store your game long-term. If you close the window, or even leave it idle too long, Gordian will forget your game — make sure you export it if you want to keep it. If you plan to keep tweaking it in Gordian later, export it as Gordian JSON or a Twine file first, so you can re-import it later.