To support the writing of my branching stories, I wrote a Python tool (see attachment) to create a flowchart of the story line. The tool parses the RenPy story files (.rpy) in the game directory for label and jump commands and creates a .graphml file that can then be opened with yEd (free graph editor). The flow chart allows direct jumps to the correct line of an .rpy file in the Atom editor. Hopefully this is helpful, feel free to edit/improve it! I use it in Windows, the code might need some adapting to work in Apple/Linux environments (folder paths probably).
There is a short demo video at https://www.youtube.com/watch?v=7dfGgJRAEZY.
Short instructions:
- Create a new folder inside RenPy's "game" directory, copy the VNavigator.py file into it and execute it.
- Non-story files gui.rpy, options.rpy, and screens.rpy are skipped.
- Comments (#) behind label and jump commands are copied to the flowchart.
- After opening the .graphml file with yEd, select Layout > Hierarchical to optimize the flowchart.
- To prevent labels from being taken into account, start their comment with a "-".