See your story.
Not just your code.
BranchPy's Story Flowchart converts your Ren'Py script into a live, interactive graph inside VS Code. Every label, jump, menu choice, and call is a node you can click — no external tools required.
Ren'Py scripts don't tell you where they go
A production Ren'Py project can have hundreds of labels spread across dozens of .rpy files.
jump chapter3_intro is just a string. Without a tool that resolves every jump, call, and
menu branch, you're navigating your own story blind.
BranchPy builds a complete Control Flow Graph from your scripts and renders it as a pannable, zoomable flowchart — directly inside Visual Studio Code. Clicking any node opens the source file at that exact label.
Your script, rendered as a graph
Every label is a node. Every jump, call, or menu branch is a directed edge. Node colours tell you exactly what each block does at a glance.
Example: the_question · 6 nodes · 12 edges · Reproduced from BranchPy Story Flow Visualization · Node colours = node type · Edge style = certainty
Node types in the graph
Entry
The starting point of the story flow. Usually the first label that executes when the game or a scene begins.
Narrative
Story content and dialogue blocks — the scenes your players actually read and experience.
Containers
Execution containers that group related code blocks together. Shown as a bordered region wrapping their child nodes.
Routing
Conditional logic and branching points — menus, if/else forks, and any node that splits the flow into multiple paths.
System
System-level operations and actions — variable assignments, flag changes, and other non-narrative code blocks.
Exit
End points and return statements — labels where a path terminates or control returns to the caller.
Unknown
Unclassified or special nodes that don't match a known pattern. Often worth investigating for unexpected flow.
Edge types (line styles)
⚡ Click-to-source navigation
Every node in the flowchart is interactive. Clicking a label node opens the corresponding .rpy file
in your VS Code editor, scrolled to that exact line. No more manual searching: jump to any part of your
story in one click.
Use the Search panel to find any node by label name and center the viewport on it instantly. The Hotspots panel surfaces the five highest-severity labels ranked by issue density — each is a one-click jump to that node.
Visual editing — presentation-ready, code untouched
The graph is a live view of your code — but you can layer visual annotations on top of it for presentations,
documentation, sprint reviews, or in-game design maps. None of these tools modify your .rpy source.
The graph can always be regenerated from scratch.
| Tool | What it does |
|---|---|
| Custom Arrow | Click button → click a start node → click an end node. Adds a visual-only directed arrow between any two nodes. |
| Text Annotation | Click button → click anywhere on the canvas → type text in brackets. Freeform notes pinned to the graph. |
| Highlight Nodes | Click button → click nodes to toggle a yellow highlight. Useful for marking nodes for review or presentation focus. |
| New Container | Shift+Drag or Ctrl+Click to select nodes → click button. Groups selected nodes inside a named container region. |
| Edit Display Name | Click button → click any node → enter a custom label. The original code name is unchanged. |
| Hide Elements | Click button → click a node to hide it temporarily. Useful for decluttering complex graphs during review. |
| Delete Annotation | Select a custom arrow or text annotation → press Delete. |
| Clear All Graphics | One-click button to remove all visual overlays and restore the clean generated graph. |
Navigation, filters & multi-select
Click-drag the canvas to pan. Mouse wheel or trackpad pinch to zoom. A minimap in the bottom-right shows the full graph — drag its viewport rectangle to jump to any area instantly.
Filter tab: check or uncheck Entry, Narrative, Containers, Routing, System, Exit, or Unknown to show only what matters. Reset restores defaults. Filter state is tracked in undo/redo and saved with layouts.
Shift+Drag for box selection. Ctrl+Click to add/remove individual nodes. Bulk-highlight, bulk-hide, or fit the view to your selection — all tracked in undo/redo.
Click Rearrange to reflow nodes using ELK (Eclipse Layout Kernel) with crossing minimisation. Connected nodes flow left-to-right; disconnected nodes are packed below or to the side.
What you get right now
Story Flowchart is available in BranchPy for Ren'Py Free and above.
One graph covering every label, menu, jump, and call across all your .rpy files — built from the same analysis pass as BranchPy's reports.
Labels referenced by jump or call but never defined are flagged immediately — before playtesting reveals them.
Save, load, rename, and delete up to 10 named layouts. Each slot preserves node positions, filter state, and all visual graphics. Slots persist across sessions.
Weighted severity scoring surfaces the five most problematic labels. Each hotspot is a one-click jump to the node and its findings.
Export the full graph or a selection as PNG (1×–4× scale) or SVG. SVG output is editable in any design tool. Use Ctrl+Shift+E or the Export button in Settings.
Click any label node to see estimated reading time (Fast / Normal / Slow), word count, menu count, and image count for that scene.
Ctrl+Z / Ctrl+Y across all operations — arrows, annotations, highlights, labels, hidden nodes, filters, and positions. The History tab shows a timestamped log with Jump-to-State support.
Save node style customisations as named templates. Apply to individual elements, all nodes of a type, or export as JSON to share with your team.
What's coming next
Ready to see your story as a map?
Install BranchPy for VS Code. Run an analysis. Open the Flowchart in under a minute.
Get BranchPy Read the docs