Catch bugs before
your players do.
BranchPy's Script Analysis scans your entire Ren'Py project for broken jumps, undefined variables, unreachable paths, and logic errors — surfaced as a structured, filterable report inside VS Code. No playtesting required.
Ren'Py is a scripting language. Static analysis isn't built in.
Ren'Py parses and executes your scripts at runtime. That means a jump broken_label
buried inside a rarely-taken branch won't be caught until a player actually reaches it — potentially
months after release, reported as a crash in a review.
BranchPy performs static analysis across your entire project before you run anything. It resolves every label reference, tracks variable assignments through all branches, and flags issues at the line they occur — no guessing which playthrough triggered the crash.
What a findings report looks like
Findings are sorted by severity and grouped by file. Each entry links directly to the offending line.
jump ghost_scene — label ghost_scene is not defined anywhere in the projectalex_trust read before assignment on branch path_refuse → chapter3_coldsecret_ending_b is defined but unreachable from any known entry pointcall chapter4_outro — called label exists but has no return statement"Stay silent" leads to the same label as "Say nothing" — may be a duplicateTypes of findings
Undefined jump / call targets
A jump or call references a label that doesn't exist anywhere in the project. Will crash at runtime when reached.
Variable read before assignment
A variable is accessed on a branch where it was never assigned. Creates a NameError or AttributeError at runtime.
Unreachable labels
Defined labels that no jump, call, or menu option can reach. Often signals cut content, renamed labels, or structural bugs.
Call without return
A call target has no return statement. Execution will continue past the called block unexpectedly.
Duplicate branch paths
Two menu choices that navigate to the same label — often a copy-paste oversight that erodes the illusion of meaningful choice.
Reading time outliers
Labels significantly longer or shorter than the project average — useful for pacing review and QA prioritisation.
✓ Three analysis passes — one command
BranchPy runs three complementary passes on every analysis:
- Analyze — base pass: label graph, jump resolution, basic variable tracking, reading time.
- PILOT (stats2) — path enumeration pass: walks every reachable path to surface per-branch variable states and impossible combinations.
- OMEGA — heuristic state-space pass: bounds variable ranges, spots dead conditions and impossible flag combinations at scale.
Analyze is free for all Ren'Py Free users. PILOT and OMEGA unlock at higher tiers. All passes write structured JSON reports that feed the Compare, Flowchart, and PFI tools.
What's available at each tier
| Capability | Ren'Py Free | Pro | Team |
|---|---|---|---|
| Label graph & jump resolution | ✓ | ✓ | ✓ |
| Missing-target & unreachable label detection | ✓ | ✓ | ✓ |
| Reading time analysis | ✓ | ✓ | ✓ |
| PILOT path enumeration (stats2) | ✓ | ✓ | ✓ |
| OMEGA heuristic state-space analysis | — | ✓ | ✓ |
| Custom BQF lint rules | — | ✓ | ✓ |
| Team-shared policy templates | — | — | ✓ |
What you get right now
Script Analysis is available in BranchPy for Ren'Py Free and above.
Every jump, call, and scene is resolved against all .rpy files in your project, not just the current file.
BranchPy tracks variable assignments through branches and flags reads on paths where assignment never occurred.
Every analysis writes a timestamped JSON report. Reports feed the Compare, Flowchart, and PFI panels — all from the same data source.
The built-in Doctor command checks your environment (SDK path, Python version, config files) and reports any setup problems before analysis starts.
What's coming next
Ready to stop finding bugs in reviews?
Install BranchPy for VS Code. Run an analysis. Read the report before your players do.
Get BranchPy Read the docs