fountain-to-json
v2.2.2
Published
Fountain to JSON converter.
Downloads
3
Readme
Fountain Script
For linear / intermediate scripts for games. Scripts are written in Fountain, then parsed into JSON for use in games.
Usage Notes
Scenes
Scene headers are preceded by .
, and are used to distinguish distinct 'cutscenes'. Anytime there is an interruption or a choice, there should be a scene header. (This is akin to the label used in renpy scripts.)
Each scene is one contiguous cutscene, separated into its own JSON object. Currently, there is no syntax for transitioning between scenes, or choices and variables, since that is the role of the game engine. However, they may be implemented in the future as specific actions.
.SCENE 1
This is a scene that can be played ingame
.SCENE 2
This is a second scene. It does not have to be connected to the first scene.
Dialogue
Dialogue is as in Fountain. Parenthetical extensions after the speaker are used to set portraits, etc.
For dialogue without any speaker, use the NARRATOR
speaker tag.
CHARACTER (happy)
This is the character's dialogue!
NARRATOR
And then he died
CHARACTER (dead)
Oh no
Actions
Actions are ignored, and used to write personal notes into the script. (Or used to control flow.)
The only exceptions are actions put between --- deliminators. Those are narrative blocks, and which will be displayed without dialogue boxes, as overlays.
.EXAMPLE SCENE
This action block is only for notes.
---
This one will be shown ingame.
---
Make sure to fence off your blocks with `---` on both sides!