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.

🔴 Error detection ⚠️ Warning triage ✓ Cross-file resolution 📊 Structured reports

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.

ERROR
jump ghost_scene — label ghost_scene is not defined anywhere in the project
scripts/chapter2.rpy · line 147
ERROR
Variable alex_trust read before assignment on branch path_refuse → chapter3_cold
scripts/chapter3.rpy · line 52
WARN
Label secret_ending_b is defined but unreachable from any known entry point
scripts/endings.rpy · line 310
WARN
call chapter4_outro — called label exists but has no return statement
scripts/chapter4.rpy · line 88
INFO
Menu choice "Stay silent" leads to the same label as "Say nothing" — may be a duplicate
scripts/chapter1.rpy · line 204

Types of findings

ERROR

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.

ERROR

Variable read before assignment

A variable is accessed on a branch where it was never assigned. Creates a NameError or AttributeError at runtime.

WARN

Unreachable labels

Defined labels that no jump, call, or menu option can reach. Often signals cut content, renamed labels, or structural bugs.

WARN

Call without return

A call target has no return statement. Execution will continue past the called block unexpectedly.

INFO

Duplicate branch paths

Two menu choices that navigate to the same label — often a copy-paste oversight that erodes the illusion of meaningful choice.

INFO

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

CapabilityRen'Py FreeProTeam
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.

🔍
Cross-file label resolution

Every jump, call, and scene is resolved against all .rpy files in your project, not just the current file.

🧮
Variable tracking

BranchPy tracks variable assignments through branches and flags reads on paths where assignment never occurred.

📊
Structured JSON reports

Every analysis writes a timestamped JSON report. Reports feed the Compare, Flowchart, and PFI panels — all from the same data source.

🩺
Doctor diagnostics

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

Analyze (base pass) Label graph · Jump/call resolution · Missing targets · Variable tracking · Reading time · Structured JSON output ✓ Done
PILOT (stats2) Full path enumeration · Per-branch variable states · Impossible combination candidates ✓ Done
OMEGA Heuristic state-space analysis · Variable bounds · Dead condition detection · PF triad visualisation ✓ Done
Custom BQF rules User-defined lint policies · Team-shared presets · VS Code Problems panel integration ✓ Done
Incremental analysis Re-analyse only changed files · Sub-second feedback on save Upcoming

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