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-window flags
Browser play page
At any time: its Gameplay tweaks and Battle tuning panels
Lands on
WorldToggles, through SessionSwitches::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.

Patcher featureproved on retail Data editbytes in PROT.DAT / SCUS Code hookMIPS the engine never runs (c) Patcher onlya patched disc plays patched in the port (a) Avoided by constructionthe defect lives in a structure the port does not have (b) Engine switchGameplayTweaks → WorldToggles pinned to retail in retail-faithful mode
One hook is the exception to "the engine never reads a hook": Seru trading, whose offer configuration block the engine parses out of a patched 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 featureClassEngine 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) carriedOne WorldToggles field each (below).
(no patcher flag) state-0x51 HP-readout park(b) carriedWorldToggles::hp_readout_guard; the patcher has no fix for this park.
--enemy-stat-scale(b) carried, uniformWorldToggles::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) openEach 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

Switchplay-window flagDefaultRetail mode
Shiny Seru--no-shiny-seruonoff
Run-away EXP--flee-expoffoff
EXP rate--exp-rate MULT (0.1..=5)1x1x
Fortress battles fix--no-fortress-encounter-fixonoff
Tetsu spar order fix--no-tetsu-spar-fixonoff
Boss casts respect jewels--jewel-fixoffoff
Battle freeze guard--no-hp-readout-guardonoff
Bonus equipment drops--equipment-dropsoffoff
Save anywhere--save-anywhereoffoff
Action movement--action-movementoffoff
Enemy strength--enemy-stat-scale MULT (0.1..=5)1x1x
Enemy attack count--enemy-attack-count MULT (0.1..=5)1x1x
Spirit AP--spirit-ap AP (-100..=100)3232
AP from damage--damage-ap AP (-200..=200)100100
Seru catch rate--seru-catch-rate PCTeach Seru’s owneach 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 0x15 as clear in deroa and chitei2, 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 town01 a field script reads flag 0x20C (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_801DD4B0 instead of the bypass FUN_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.

SliderWhat it scales
Enemy strengthHP, MP, ATK, UDF, LDF, INT and SPD of the monster record before the loader’s boost; AGL, EXP, gold and drops untouched
Enemy attack countEach attack entry’s AGL price, held to 1..=min(AGL, 0xFE) so an attacker keeps one strike
Spirit APThe 0x20 a Spirit turn grants; negative subtracts with a floor at zero
AP from damageThe hit charge over * scale / max_hp; 100 calls the retail kernel
Seru catch rateOne 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:

  1. Split stat scale--enemy-stat-scale’s per-stat and regular: / boss: forms, over the patcher’s monster classes.
  2. Seru trading without a patched discAn engine-built offer configuration in place of the one parsed from the executable.
  3. Enemy HP barsA battle-HUD draw over each living monster, on both hosts.
  4. Super Arts on the move list, oscillating APBattle-menu row sources.
  5. Enemy ally (charm)A monster acting on the party’s side through the round scheduler, with the victory fixup already in place.

See also