Gameplay tweaks: patcher features in the engine
The disc patcher proves a change against the original game, on a console or an emulator. A change that is a fix or a gameplay option rather than new disc content is expected to graduate into an engine switch, so a player of the port gets it without patching a disc. This page sorts every patcher feature into one of three classes and lists the switches the engine carries.
At a glance
- Carrier
legaia_engine_session::session_switches::GameplayTweaks, carried whole by both play hosts- Native window
- At launch: the launcher’s Gameplay tweaks and Battle tuning rows, or the
play-windowflags - Browser play page
- At any time: its Gameplay tweaks and Battle tuning panels
- Lands on
WorldToggles, throughSessionSwitches::apply; retail-faithful mode holds every switch at retail’s value (WorldToggles::pin_retail)- Stacks with a patched disc
- Yes: the engine’s EXP rate multiplies a disc already patched with
--exp-scale
Two ways a patcher feature reaches the engine
The engine reads its game data from whatever disc it is given, and it never executes the game’s MIPS code. That splits the patcher in two.
SCUS_942.54 (World::install_seru_trade_config).- Data edits reach the engine on their own. A randomized drop table, a re-priced shop, a rescaled monster record or a re-routed door is bytes the engine parses at boot or scene entry.
- Code hooks do not. The engine runs its own Rust ports of the routines a hook patches, so a hook’s behaviour exists in the port only when the port implements it.
Classification
Every patcher feature falls in exactly one class. Class (b) is either carried (a switch below) or open (ranked at the end).
| Patcher feature | Class | Engine side |
|---|---|---|
--approach-softlock-fix | (a) | The approach drive does not depend on a live clip, so the state-0x19 park cannot form (exit gates). |
--conkram-freeze-fix | (a) | Move-VM op 0x3C’s keyframe pose is sized from its count, not a heap block: there is no failed allocation to copy through. |
Charm softlock fix (ships with --enemy-ally) | (a) | The victory arm keeps the acting slot only when it is a living party slot; the patch mirrors that invariant. |
Arts name fix (ships with --super-arts-pack) | (a) | The banner is centred on the name the port draws, measured each time, so there is no stale width to keep. |
--shiny-seru, --flee-exp, --exp-scale, --fortress-encounter-fix, --jewel-fix, --equipment-drops, --spirit-ap, --damage-ap, --seru-catch-rate, --enemy-attack-count | (b) carried | One WorldToggles field each (below). |
(no patcher flag) state-0x51 HP-readout park | (b) carried | WorldToggles::hp_readout_guard; the patcher has no fix for this park. |
--enemy-stat-scale | (b) carried, uniform | WorldToggles::enemy_stat_permille; the per-stat and regular: / boss: forms are open. |
--enemy-hp-bar, --enemy-ally, --seru-trade, --show-super-arts, --oscillating-ap | (b) open | Each needs engine work (ranked below). |
--drops, --chests, --steals, --shops, --casino, --encounters | (c) | Disc tables the engine parses. |
--doors, house and map doors, --rename-location | (c) | Scene MAN and place-name data. |
| Monster, move, element, spell, equipment and arts record edits | (c) | Randomized or hand-set records the engine reads. |
| Prices, starting bag, level and warps; unused enemies and items; custom items | (c) | Script literals, the new-game template and content the disc carries or gains. |
--super-arts-pack, --delilas-challenge, --delilas-party; texture, model and translation packs | (c) | Content mods and asset replacement. |
The full per-flag table is in docs/subsystems/gameplay-tweaks.md.
The carried switches
| Switch | play-window flag | Default | Retail mode |
|---|---|---|---|
| Shiny Seru | --no-shiny-seru | on | off |
| Run-away EXP | --flee-exp | off | off |
| EXP rate | --exp-rate MULT (0.1..=5) | 1x | 1x |
| Fortress battles fix | --no-fortress-encounter-fix | on | off |
| Tetsu spar order fix | --no-tetsu-spar-fix | on | off |
| Boss casts respect jewels | --jewel-fix | off | off |
| Battle freeze guard | --no-hp-readout-guard | on | off |
| Bonus equipment drops | --equipment-drops | off | off |
| Save anywhere | --save-anywhere | off | off |
| Action movement | --action-movement | off | off |
| Enemy strength | --enemy-stat-scale MULT (0.1..=5) | 1x | 1x |
| Enemy attack count | --enemy-attack-count MULT (0.1..=5) | 1x | 1x |
| Spirit AP | --spirit-ap AP (-100..=100) | 32 | 32 |
| AP from damage | --damage-ap AP (-200..=200) | 100 | 100 |
| Seru catch rate | --seru-catch-rate PCT | each Seru’s own | each Seru’s own |
A launcher or page slider cycles a fixed step list that starts at retail; the flags take any value in range. The two fixes default on because a game the defect never touched plays identically with them: the Fortress fix changes nothing on a save without the stale flag, and the readout guard is an identity while retail’s readout invariant holds. The balance changes default to retail.
- Shiny Seru
- At each formation battle entry the engine rolls 2%: one capturable monster gets +35% HP / ATK / DEF / SPD, and capturing it marks the learned spell shiny (+35% damage). Off skips the roll and its
rand()draw, which retail never takes, so every later battle-entry roll stays on retail’s position in the stream. - Run-away EXP
- Any successful escape (Run, an item or a spell) banks 5% of the fled formation’s EXP into each member’s total, as the hook banks it: no level-up runs until the next won battle.
- EXP rate
- Each monster record’s base EXP is scaled before the victory sum with the patcher’s arithmetic (round half up, zero stays zero, otherwise
1..=65535); retail’s 3/4 scale and the per-member split run on the scaled sum. - Fortress battles fix
- The encounter condition walk reads system flag
0x15as clear inderoaandchitei2, falling past the Floating Castle’s copied "no battles" group (field oddities). The patch rewrites the table; the engine leaves it alone. - Tetsu spar order fix
- In
town01a field script reads flag0x20C(the spar counts) as set once the spar and the measuring both are, so a spar with Tetsu fought before Mei measures Vahn still lets the hunters return. Retail never counts it and the story stops (field sequence breaks). The flag bank is left as retail wrote it. - Boss casts respect jewels
- Seven capture-class boss casts roll through the resist-respecting wrapper
FUN_801DD4B0instead of the bypassFUN_801DD6B4. That swaps the whole roll, not only the resist flag - the two wrappers read different attacker and defender terms (battle formulas). - Battle freeze guard
- Before each frame of the HP-readout ramp, a party slot whose readout differs from live HP with nothing pending gets the difference re-seeded, so state
0x51’s settle check opens (exit gates). - Bonus equipment drops
- Once per won battle, a 5% roll puts one equipment id straight into the bag, from the same pool the patcher embeds.
- Save anywhere
- The pause menu’s Save row works in every scene, not only where the scene header raises the save-allow bit. A port enhancement with no patcher counterpart.
Battle tuning
Each slider is one scale at the reader the patcher’s edit changes, with the patcher’s arithmetic. The patch scales the stored record; the engine scales at the reader, so a fight sees the same numbers but nothing on disc or in a save moves. Tetsu, the unwinnable sparring partner, is pinned against both enemy sliders, as the patcher pins him.
| Slider | What it scales |
|---|---|
| Enemy strength | HP, MP, ATK, UDF, LDF, INT and SPD of the monster record before the loader’s boost; AGL, EXP, gold and drops untouched |
| Enemy attack count | Each attack entry’s AGL price, held to 1..=min(AGL, 0xFE) so an attacker keeps one strike |
| Spirit AP | The 0x20 a Spirit turn grants; negative subtracts with a floor at zero |
| AP from damage | The hit charge over * scale / max_hp; 100 calls the retail kernel |
| Seru catch rate | One flat percent in place of the record’s own chance, capturable records only |
Verification
Each switch has a disc-free test that it changes behaviour when on and that its retail value is the unmodified path, across engine-core, engine-battle-vm, engine-session, engine-shell and web-play; the bonus-drop pool is pinned against the patcher’s by a disc-gated test. Tier 3 of the host-drift gate requires both hosts’ switch sites to pass the tweaks field, and the host frame trace digests the tweaks, so a switch thrown on one host only shows as a divergence.
Open
Ranked by how much of the engine each needs:
- Split stat scale
--enemy-stat-scale’s per-stat andregular:/boss:forms, over the patcher’s monster classes. - Seru trading without a patched discAn engine-built offer configuration in place of the one parsed from the executable.
- Enemy HP barsA battle-HUD draw over each living monster, on both hosts.
- Super Arts on the move list, oscillating APBattle-menu row sources.
- Enemy ally (charm)A monster acting on the party’s side through the round scheduler, with the victory fixup already in place.
See also
- Randomizer and patcher - every patcher flag.
- Engine reimplementation - the fidelity-versus-enhancement model and every toggle’s default.
- Playing: launcher options - where the rows sit.