Gamebook Creation Tool using Twine/Sadako/TiddlyWiki/Markdown as Input

I made a thingy:

It’s a tool for the purpose of creating gamebooks. It takes TiddlyWiki exported JSON, Twine published/archived HTML, Twine twee source files, Sadako script files, and standard markdown files as input. It outputs standard markdown (converted from other formats), graphviz flowcharts, and epub files.


  • Configuration settings are done inside <!-- --> HTML comments so they don’t interfere with viewing of HTML or markdown, and will also be supported by most syntax highlighters.

  • Graphviz flowcharts have some mild markup to allow you to color start, bad ending, and good ending sections, along with listing story flags that are enabled/disabled in a passage.

  • Conversion to an epub book is as simple as setting two metadata settings (a title and a unique identifier for ISBN) and table of contents. Then just zip the folder and rename to .epub and you have a working book that you can dump into your ebook reader. I made sure all generated epub files don’t throw a single error or warning when being checked against epubcheck.

  • Some convenient epub settings:

    • Marked blocks of sections to be can be collected into a single page, which is really convenient for a gamebook (not so much for a normal book).

    • Marked blocks of sections can be automatically renamed in a numeric ascending order starting with a defined starting point. In other words, you can use normal names for your sections (“get key” or something) and the converter will rename it to 1, 2, 3, etc. Links in the sections’ text directing to these sections will also be changed to reflect the name change. So if you link to it with Turn to [[get key]]. in the source, it’ll display as Turn to [[1]]. in the epub.

    • Marked blocks of sections can be shuffled. Not only will they be rearranged in the print order, but if you have numeric renaming of sections enabled, they will be be renamed in correct order. In other words, if “get key” was the 10th section in the story and it gets changed to being the 2nd section from where the title renaming begins, it’ll be renamed to “2” and all links directing to it will also be renamed to “2”.

I think that’s about it. Just like Sadako, this is a toy that I made for myself and decided to share with others. Hopefully someone find it helpful.

Here’s an example of the generated graphviz flowchart, for those curious.

1 Like