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.

🔀 Interactive graph ✓ Jump navigation ⚡ Click-to-source 💾 Saveable layouts

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.

Test start rightaway game book marry later

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)

Certain edge — provably always executes based on static analysis.
Likely edge — high confidence, but not provably certain. Hover to see the condition expression.
Unknown condition — requires runtime validation. Hover for uncertainty details.

⚡ 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.

ToolWhat it does
Custom ArrowClick button → click a start node → click an end node. Adds a visual-only directed arrow between any two nodes.
Text AnnotationClick button → click anywhere on the canvas → type text in brackets. Freeform notes pinned to the graph.
Highlight NodesClick button → click nodes to toggle a yellow highlight. Useful for marking nodes for review or presentation focus.
New ContainerShift+Drag or Ctrl+Click to select nodes → click button. Groups selected nodes inside a named container region.
Edit Display NameClick button → click any node → enter a custom label. The original code name is unchanged.
Hide ElementsClick button → click a node to hide it temporarily. Useful for decluttering complex graphs during review.
Delete AnnotationSelect a custom arrow or text annotation → press Delete.
Clear All GraphicsOne-click button to remove all visual overlays and restore the clean generated graph.

Navigation, filters & multi-select

🧭
Pan, zoom & minimap

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 by node type

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.

Multi-select

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.

🔄
Auto-layout

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.

🗺️
Full project graph

One graph covering every label, menu, jump, and call across all your .rpy files — built from the same analysis pass as BranchPy's reports.

🔍
Missing-target detection

Labels referenced by jump or call but never defined are flagged immediately — before playtesting reveals them.

💾
10 named save slots

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.

🔥
Hotspots panel

Weighted severity scoring surfaces the five most problematic labels. Each hotspot is a one-click jump to the node and its findings.

📤
PNG & SVG export

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.

⏱️
Reading time per node

Click any label node to see estimated reading time (Fast / Normal / Slow), word count, menu count, and image count for that scene.

↩️
Full undo / redo history

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.

🎨
Custom style templates

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

Flowchart Full CFG graph · Jump/call edge resolution · Missing-target detection · Click-to-source · Node details popup · SVG export · Persistent layouts ✓ Done
Flowchart+ Prerequisite orchestration · PILOT / OMEGA compatibility gating · Report provenance manifest · Silent analysis execution ✓ Done
Graph rendering (Phase 4+) Advanced layout algorithms · Cluster views for large projects · Chapter-level roll-up nodes Upcoming
Playthrough simulation Walk a specific variable state through the graph · Highlight reachable paths from a given save state Planned

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