Decode battle experience rewards

This commit is contained in:
gamer147
2026-07-24 10:13:43 -04:00
parent bf9639cafc
commit 6c24ac5e5b
9 changed files with 267 additions and 40 deletions

View File

@@ -73,8 +73,9 @@
- [x] **2.3p — Name the selected movement-route grid.** `G[0xc6077]` is a reserved 1000-by-27 work grid carrying the one-cell-wide route copied from MVSEEK's remaining-step scores. SETROUTE proves the cardinal backtrace, FIELD proves route rendering and execution, SELACT proves move-before-action use, and RTN_M002..018 prove candidate-endpoint testing. The shared map target coordinates and INIT2 cardinal vectors are curated with it.
- [x] **2.3q — Name the triggered passive-skill matrix.** `G[0x15261f]` is a two-side-by-300 SKINIT-indexed activation matrix rebuilt for each CALCDMG exchange. CALCDMG gates owned category-4 passives by actor/target role, proc chance, species/boss/movement/action conditions, and pairwise exclusions; BTL uses the surviving flags for passive icons, reaction animations, and passive combat behavior. The adjacent actor HP-recovery output is curated with it.
- [x] **2.3r — Name persistent unit stat-growth fractions.** `G[0x6f70]` is the 100-by-14 fractional-hundredths table paired with `unit_current_stats`. ADDEXP, TRAIN, and UNITECH add definition, action, and catch-up growth, carry each quotient divided by 100 into the matching current stat, preserve the modulo-100 remainder, and clamp against the shared stat caps. GAMESTART serializes it, while GAMECLEAR and EVOLVE copy complete rows with the persistent unit record.
- [x] **2.3s — Decode battle experience rewards.** BTL awards after each completed exchange using the opponent definition's EBINIT base reward and enemy-minus-player runtime-level brackets: nonlethal 40/30/20/10 percent and defeat 250/200/150/100/75/40/20 percent, truncated to an integer. ADDEXP applies normally cleared suppression/multiplier bits and advances persistent 0..99 progress through capped level-ups. Append unit 900's unwritten reward is proven effective zero; stage 200's level-70+ unit-901 body (50) and unit-905 splits (20) explain the ordinary 610 per-exchange King Pterodactyl awards.
- [x] **2.4 — Partial global-var map BUILT + wired into the disassembler.** `tools/global_map.py``build/global-var-map.{json,md}` (16,354/49,435 globals labelled: string tables, `*INIT` field arrays, 122 record tables w/ strides, current-entity index pointers). `sys4load` renders the labels inline (`=rec[s30]`, `=current-entity-index?`). See `docs/name-resolution.md`.
- [ ] **2.5 — Grow the global-var map (future, incremental).** Static first: RTINIT is closed at 1,043/1,043 movement steps; the RECOVER/ILINIT condition ABI, ALINIT recipes, AFINIT affinity/progression tables, CTINIT name palette, CVINIT character-voice registry, LAINIT terrain definitions, MPINIT stage-terrain atlas, SPINIT H-scene gallery, TRINIT training actions, CDINIT/CDINIT2 card selection/effects, BTANINIT/BTANINIT2 battle animations, STINIT2's complete stage surface, the 309-script ADV layer surface-slot registry, the selected movement-route grid, the battle triggered-passive matrix, and persistent unit stat-growth fractions are closed; ITMES/SKMES/VIMES/EIMES/CIMES/MAMES are joined to their definitions; and the non-table INFOMES/MES ABIs are classified. Next, investigate stride-10 `G[0x3ebe]`, the highest-use remaining auto-shaped row table. Full detail: `docs/name-resolution.md` → "Future step — growing the map". Packed `call-script` ids, SCJUMP decision-to-scene dispatch, the shipped RTINIT movement-provider join, and the six completed message joins are resolved.
- [ ] **2.5 — Grow the global-var map (future, incremental).** Static first: RTINIT is closed at 1,043/1,043 movement steps; the RECOVER/ILINIT condition ABI, ALINIT recipes, AFINIT affinity/progression tables, CTINIT name palette, CVINIT character-voice registry, LAINIT terrain definitions, MPINIT stage-terrain atlas, SPINIT H-scene gallery, TRINIT training actions, CDINIT/CDINIT2 card selection/effects, BTANINIT/BTANINIT2 battle animations, STINIT2's complete stage surface, the 309-script ADV layer surface-slot registry, the selected movement-route grid, the battle triggered-passive matrix, persistent unit stat-growth fractions, and battle experience pipeline are closed; ITMES/SKMES/VIMES/EIMES/CIMES/MAMES are joined to their definitions; and the non-table INFOMES/MES ABIs are classified. Next, investigate stride-10 `G[0x3ebe]`, the highest-use remaining auto-shaped row table. Full detail: `docs/name-resolution.md` → "Future step — growing the map". Packed `call-script` ids, SCJUMP decision-to-scene dispatch, the shipped RTINIT movement-provider join, and the six completed message joins are resolved.
## Phase 3 — Name the unnamed opcodes *(top ~20 BEFORE Phase 4; the rest on demand)*