Capture coverage: which parts of the game the retail corpus has seen
The retail comparison corpus scores the engine at every captured moment, and its headline is only as broad as the moments it holds: a median score over states that all stand in a handful of scenes, fighting a handful of monsters, says nothing about the rest of the game. This report takes its denominator from the disc, the way disc coverage does for code, asks of every scene, monster, attack, cast and screen whether some retail state shows it, and ranks what to capture next.
At a glance
captures/.scripts/ci/capture-coverage.py # build, census, report under captures/capture-coverage/
scripts/ci/capture-coverage.py --no-build # reuse target/release-test/legaia-engine
scripts/ci/capture-coverage.py --census F # report from an existing census JSON
scripts/ci/capture-coverage.py --summary # the headline table only
The census itself is legaia-engine retail-compare --census <json>. Like the corpus driver, the script exits cleanly with a [skip] line when the save library or the extracted disc is missing.
What counts as covered
Two tiers per item. Held: some corpus state made on a retail disc shows it (a state that replays a patched executable never covers anything). Scored: that state also carries an image score in the corpus baseline. A held item that is not scored is a capture the corpus cannot yet seed, or one whose frame is a fade.
| Dimension | Denominator | A state covers an item when |
|---|---|---|
| Scenes | every town, field and world-map block of the scene table | its loaded scene is the block (walked: a field or world-map state stands in it) |
| Monsters | every populated record of the monster archive | the formation holds the id |
| Enemy attacks | each monster's physical attack and every magic id its record carries | that monster is acting with that attack, on screen |
| Player casts | the named summon-band spells of the spell table | a party seat acts with that spell queued |
| Cast modules | the 64 slot-B images | an acting cast pages the module |
| Menu screens | every reachable sub-screen, the title family and the map display | a menu state stands on it |
| Battle screens | the command flow's surfaces and the results window | a battle state stands on it |
- An action counts only while it is on screen: the action state sits in the attack chain, the magic or item flow, the summon flow or the module sequence. A prompt or the clean-up after the hit covers the monsters but no attack.
- A boss's scripted cast names an id its record does not carry, so the census is its only witness: a seen scripted cast joins the denominator as its own item. The record-carried items are fixed by the disc.
- Which module a cast pages follows the two loader paths of the cast module page: the summon band by id, a capture-class record by its own index.
Ranking the worklist
- Monsters and enemy attacks by how many formation rows across all scenes hold the monster, with the scenes it is met in - the places to walk to capture it. A monster no row holds is a scripted fight.
- Enemy magic attacks by how many monster records carry the id.
- Cast modules by how many spells share the module.
- Scenes towns first, then fields, then the overworlds.
The report closes with every held item and the states that hold it.
Filling the worklist
Every new state is made by playing the retail game under PCSX-Redux, pad only where possible, and every poke a probe does make is recorded with the state.
| Probe | What it captures |
|---|---|
autorun_battle_harvest.lua | Walks from a field state until an encounter, plays rounds with Spirit so the monsters act, and saves a state whenever a monster's action is mid-way. LEGAIA_WANT names a formation by its monster ids and lets retail's own encounter roll pick it; knobs keep a low-level party alive, wound the monsters so a heal has a patient, or keep the pre-pick state for the cast-sequence oracle. |
plan_walk_route.py + autorun_walk_route.lua | A planned walk for scenes a random walk never reaches: the planner searches each scene's collision grid with the teleports as edges and writes a route; the probe walks it on the pad, fights what it meets, and saves a state in every scene it enters. ACT and TALK lines work cabinets, counters and the conversations a route must have. |
autorun_door_hop.lua | Crosses a chain of doors by holding the player on each door's walk-on tile; the door's own record runs with its story gates, so a closed door ends the run. |
autorun_screen_walk.lua | A list of waits, presses and saves gated on the game mode or the sub-screen word, for screens behind a conversation or a menu path, such as a shop's lists. |
A harvested state is a candidate until its census row shows the seat, category and id its label claims, its retail frame shows that attacker (and the spell's name banner, for a cast), and it is backed up with its scenario block naming the source state, the probe, the vsync and any poke it inherits. The scores of that scratch run are what it adds to the corpus at the next reviewed baseline update.