Repository navigation
Overlay Pipeline and Mod Compat
Isllan Toso edited this page Nov 21, 2026
·
2 revisions
Bullet's overlay pipeline is engineered to prepare match overlays in tens to hundreds of milliseconds without touching Riot's game files.
- Scans
DATA/FINAL/WAD archives in parallel using memory-mapped I/O (memmap2) and persists a versioned binary index (game_index) for instant subsequent startups. - Automatically invalidates both
game_indexandOverlayCachewhenevergame_version::checkdetects a new game binary stamp (PETimeDateStampon Windows, deterministic Mach-O header hash on macOS).
-
Deduplication & Conflict Resolution: When multiple mods (e.g., an official skin + custom map + announcer) are active,
resolve_insideandresolve_againstensure later mods in priority order cleanly override earlier ones. -
SubChunkTOC & Shared WAD Protection: Entries matching game
SubChunkTOChashes are filtered out; entries identical to the base game WAD are dropped as no-ops; shared champion/map WAD paths are propagated consistently to every WAD that references them. -
Map11 Collision Guard: Prevents champion-slot mods from accidentally overriding
Map11.wad.clientshared entries. -
Overlay Cache (
OverlayCache): Records a fingerprint of(game_dir stamp, OVERLAY_BUILDER_REVISION, active mod hashes)so re-picking the same loadout skips WAD rewriting completely.
-
100 ms / 900 ms Debounce: Initial picks arm after
100 ms; subsequent switches debounce at900 msso rapid browsing does not waste disk I/O. - No Polling Ticker: Arming is triggered strictly by selection changes, never by a fixed-frequency loop.
-
2-Second Safe Hook Window: Bullet never hooks an already-loading game process older than
SAFE_HOOK_WINDOW(2 s) unless explicitly configured (HOOK_LOADING_GAME), preventing mid-load corruption. -
Explicit Hook Confirmation: The pipeline distinguishes
Armed,Hooked(Confirmed),Unconfirmed,Failed, andPatcherExited, surfacing exact status in the tray and logs.
-
safe_extract_zipLimits & Traversal Guards: Validates every ZIP/archive entry before writing — rejects.., absolute paths, symlinks, junctions, and canonicalizes paths withPath::starts_with. Enforces hard bounds (16 GBtotal,8 GBper file,200,000entries) after checking free disk space. -
Atomic State Persistence (
atomic_write): Writes config, presets, and history to a temporary file on the same volume,fsyncs, and atomically renames. -
Custom Mod Repair (
mod_compat): On startup (and via Support → Repair skins and mods), Bullet scans.fantome,.modpkg, and.zipmods incustom_mods/, repairs stale.binlinks against the installed game version, backs up untouched originals instate/mod_originals/, and supports one-click restoration.
-
Local Match Statistics (
live_game&stats.rs): Tracks per-skin wins, losses, and win rate from live game end events intostate/skin_stats.json, displayed on the Home tab. -
Structured Logging (
tracing): File logs default toINFO(configurable viaBULLET_LOG/RUST_LOG), rotated across 7 daily files, with non-blocking appender drop counters. Secret tokens and party keys are never logged. -
Diagnostics Export: Support → Export diagnostics redacts Windows/macOS user profile paths and UUIDs (
diagnostics/control_panel/redact.rs) before packaging logs.
Architecture & Domain
Client & Asset Pipeline
Platform & Security