A module for the Godot Engine for parsing Twine stories (exported to JSON via twine_to_json).
Only compatible with Godot 2.2+ (as the API for RegEx was changed). For use in prior versions, replace .search( with .find( and handle the return values differently.
Binary builds of Godot 2.2+ are available here.
This leverages Twine as a story editor for Godot projects.
You could also use it as a dialog system (example scene will be provided at a later date).
More complex scripting is coming! Global variables, conditional text, text generation via TraceryCpp (when that library and the corresponding Godot wrapper are ready)!
- Clone this repository
- Put it into your Godot project (in folder
modules/twine-story) - Create a RichTextField in your scene
- Attach the script
story_label.gdto your RichTextField - If you haven't already, change your Twine 2 Story format to Snowman
- Export to HTML, then use
twinetojsonto make JSON out of it (don't parse markdown using the-mflag):twinetojson -i story_snowman.html -o story.json -p -m - Change the script path in the Inspector to your Twine JSON file
- Connect the
meta_clickedsignal of the RichTextField to its script - ???
- Profit