Settings � Engine

Excusez-nous — cette page est actuellement disponible en anglais uniquement.

La traduction française n'est pas encore prête. Le contenu ci-dessous est la version anglaise la plus récente.

Control how BranchPy detects and interacts with your game engine.

What it controls

BranchPy auto-detects your project’s engine on first analysis. Engine Settings let you override that detection, tune per-engine analysis flags, and adjust performance/precision trade-offs.

Engine selection

By default BranchPy runs engine detection automatically (confidence-based). If detection gets it wrong, or if you have a multi-engine workspace, you can force a specific engine:

# .branchpy.toml
[discovery]
force_engine = "renpy"         # Options: renpy, godot, unity, unreal, generic
force_engine_always = false    # true = force even when auto-detection matched
discovery_threshold = 0.5      # Minimum confidence to accept auto-detected engine

Set force_engine_always = true only if you always want the override regardless of confidence score (useful in CI or strict mono-engine projects).

Discovery cache

Engine detection results are cached to avoid re-scanning on every run:

[discovery]
cache_enabled = true    # default: true
cache_ttl = 3600        # seconds (default: 1 hour)

If you restructure your project and re-detection is not picking up changes, clear the cache by deleting .branchpy/cache/ or setting cache_enabled = false temporarily.

Per-engine analysis flags

Setting Default Effect
flowchart.pfi.enabled true Phase Flow Inference � builds jump/call edge graph
flowchart.sae.enabled true Semantic Action Extraction � tags narrative events
flowchart.synthetic.enabled false Adds synthetic edges for implicit flow (experimental)

Disabling PFI or SAE speeds up analysis on very large projects at the cost of reduced flowchart detail.

When to change these settings

  • First-run setup � if auto-detection picks the wrong engine, set force_engine immediately.
  • Switching targets � if your project gained a new engine directory, clear the cache and re-run.
  • Tuning speed vs precision � disable SAE on projects with thousands of .rpy files if analysis is too slow.
  • CI pipelines � always set force_engine explicitly; do not rely on auto-detection in CI.

Common pitfalls

  • Changing force_engine mid-run does not affect the current run � re-run Analyze after saving the config.
  • Mixing synthetic.enabled = true with production scans can surface false-positive edges; keep it off unless debugging.
  • force_engine_always = true will suppress the detection warning even if your project layout changes � check it periodically.

Learn more: Analysis Internals