re: decode the stage table set — phases, routes, sub-objectives, AI parameters

Following the real stage record (not the _Test template dumped earlier) reaches
the whole mission-parameter layer, all of it in the same self-describing IDXD
container as the squadron roster.

The big one: a stage is divided into Phase_N blocks -- three for Stage 02, each
with its own map path, map mesh, asteroid definition and background -- and
Route_S<NN>.tbl holds the arrival paths, with records named

    Route_<squadron>_p<phase><kind>

tying a UnitGroup squadron id to a phase and to a time-stamped keyframed path of
(time, quat x4, pos x3). Route_ADN101_p1F is 3 frames at t = 0, 20, 30. The
identity len(fields) == FrameCount * 8 + 1 holds for 1449 of 1449 route records
across the 28 stages that have one, and 16/16 for FormationSet_S02.

Also decoded: SUBObjectiveSettings (per-objective bonus points by difficulty,
unlock item id, HUD strings) and AIParams (34 profiles, firing/guard/muster/
counter ranges plus 14 manoeuvre weights for Squad-type AI). The AIParams
numbers are exact original values from static RE and are portable as they are.

Adds tools/re-capture/stagetbl.py, which resolves a stage record by content and
can --follow every table it names, and commits two dumps as evidence.

Refuted and kept: the eight-value keyframe is the common case, not universal.
Formation_Fleet_01 has FrameCount=1 with 136 positional fields and
Formation_Fleet_02 has FrameCount=8 with 32, so a parser must not assume the
stride.

Corrects stage-definition-table.md, which was written from the _Test template
and is missing EnumerateSubobjective, EnumerateAIParams, BackGroundID and the
WingmanIconID fields the real record carries.

Not settled: what advances a phase -- the stage declares Phase_1..3 and routes
are phase-tagged, but nothing static says what ends one. That is a question for
the oracle, not for more static reading. Also open: the route-name kind letters
F/S/A/M/B, what activates a sub-objective, and StageMessageSet_S<NN>.tbl, which
does not resolve in GP_MAIN_GAME_E.pak.
This commit is contained in:
Sylpheed RE agent
2026-08-24 11:15:34 +00:00
parent ecf6887b76
commit 4441ca79ec
6 changed files with 2761 additions and 1 deletions

View File

@@ -296,7 +296,28 @@ search cannot find a *schedule*.
hash, and an earlier "109/111" reading of the squadron-id string base was an
artefact of the uniform 7-byte id stride (it shifted every name by three).
**First step (next):** find where the arrival *interval values* live.
***The rest of the mission-parameter layer is decoded** (2026-08-24) —
[`structures/stage-mission-tables.md`](structures/stage-mission-tables.md),
tool `tools/re-capture/stagetbl.py --follow S02`. The *real* stage record (the
one dumped earlier was the `_Test` template) splits a stage into **`Phase_1..3`**
blocks and names `Route_S<NN>.tbl`, `SUBObjectiveSettings_S<NN>.tbl`,
`AIParams_S<NN>.tbl`, `FormationSet_S<NN>.tbl`, `nameplate_S<NN>.tbl` and more.
**`Route_S<NN>.tbl` is the arrival schedule**: records named
`Route_<squadron>_p<phase><kind>` holding time-stamped keyframes
`(time, quat x4, pos x3)`, tying a `UnitGroup` squadron to a phase and a path —
self-checked `FrameCount*8+1` on **1449/1449** route records across 28 stages.
`AIParams` carries directly portable combat tuning (firing/guard/muster ranges
and 14 manoeuvre weights per profile). 🔴 Refuted: the 8-value frame is *not*
universal — `Formation_Fleet_01/02` use 136 and 4 values per frame.
**First step (next):** find what *advances a phase* — the stage declares
`Phase_1..3` and routes are phase-tagged, but nothing static found so far says
what ends a phase. This is the point where the oracle should be measured rather
than reasoned about: fly Stage 02 and watch for the phase transition. Also open:
the route-name kind letters `F/S/A/M/B`, what activates a sub-objective, and
`StageMessageSet_S<NN>.tbl` which does not resolve in `GP_MAIN_GAME_E.pak`.
**Superseded first step:** find where the arrival *interval values* live.
`DisableInterval` is only a per-squadron flag (`Yes` for 31 of 1160); the
durations, spawn triggers and arrival positions are not in `UnitGroup`. The
stage record names two untouched candidates: `Formation_*.tbl` (formation