Skip to content

visualize ChoiceScript files as graphs using graphviz/dot

Notifications You must be signed in to change notification settings

mmitch/choicescript-graphviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

convert ChoiceScript files to GraphViz trees

Build Status

requirement

  • java
  • gradle (sudo apt-get install gradle)

installation

$ git clone https://github.com/mmitch/choicescript-graphviz.git
$ cd choicescript-graphviz
$ make

usage

java -cp /path/to/choicescript-graphviz/build/classes/java/main Main /path/to/choicescript/scene.txt > output.dot

Note: The output can be viewed with xdot or other graphviz software.

examples

  1. example ChoiceScript file
  2. converted to dot
  3. converted to SVG

project status

  • spontaneous idea
  • had some fun coding
  • works so far

Not all ChoiceScript parameters are implemented yet. I don't know if they ever will be.

Note that text nodes are shortened to T[character_count]. The first part of the text will be displayed as a tooltip.

todos

  • implement missing commands
    • *comment
    • *else
    • *elsif
    • *gosub
    • *goto_scene
    • *hide_reuse
    • *input_text
    • *return
    • *temp
  • *if between *choice and #selection
  • show *disable_reuse on #selection graph edge
  • show *selectable_if on #selection graph edge

resources

Releases

No releases published

Packages

No packages published