Stage layout sections (stNN.dat header)

The whole header, from the shared notes (“Character table”, “Sources”) and checked with a struct reader on all 21 stage files of our dump: the sizes, tags and counts below hold in every file (file_size equals the file length, the OB00 tag sits 4 bytes before the definitions, every placement’s object index is below the name count). The stage loader (0x140203720) and what the object classes do with a definition are in “Stage objects” below.

Header (0x13C), u32 words; 0xFFFFFFFF = absent.

off content
0x000 magic ST00
0x004 11 placement list offsets (PS00 entries above); lists 0, 2 and 3 are used (st24 only has list 3); the list is picked by a per-battle variant byte, “Stage objects” below
0x030 11 placement counts (−1 = absent)
0x05C / 0x060 NM00 object names: offset, count (one name per object definition)
0x064..0x084 nine sections OC00..02 (collision lists), OE00..02 (effect lists), OA00..02 (animation chunk streams); reached through the object definitions’ offsets, not through these words
0x090 OB00 object definitions, 56 bytes each, name count of them
0x094 the stage’s own collision list (“Stage collision”)
0x098 EF00 the stage’s effect list (“Stage ambient effects”)
0x09C SP00 sprite animations (frame lists of quad extent + texture rectangle, and a table naming the textures)
0x0A0 MD00 model data: pairs (model, blob index) that hand a model its entry of the blob list at 0x0F4; (stagefx 11-15) they are the stage half of the system model table, entry 24 + pair index (“Storm sphere, vkSAND, …”)
0x0A4..0x0BC CP00 start-point groups, up to six (“Start positions”)
0x0D0 / 0x0D4 / 0x0D8 the light script (“Stage light script”): a complete script container of the same kind as the .ssb files. One word per file: 0xD0 in st01–st09, 0xD4 in st12–st15, 0xD8 in st22–st25; st16 and st26 use 0xD0
0x0F4 blob list: u32 count, then count × {u32 length, bytes}
0x0F8 object sound table: 16 bytes (s16[8]) per object definition, a sound id per event (top bit set = none)
0x0FC (+ 4 × variant) an animation chunk stream played when the stage starts
0x138 file size

Words 0x088, 0x08C, 0x0C0..0x0CC, 0x0DC..0x0F0 and 0x100..0x134 are absent in every file. The four-character tags sit immediately before the data their offset points at.

Object definition (OB00, 56 B): s32[3] models (model resource per object state: intact, pieces, wreck; see “Stage objects” below; −1 = none), s32[3] animation stream offsets (OA), s32[3] collision list offsets (OC), s32[3] effect list offsets (OE), u32[2] 0. In our files no definition has an animation stream; most have a collision list (st03: all 27) and many an effect list (st03: 17). So a prop’s own collision (what a shot or a body hits, and what breaks) is its definition’s OC list, in the stage collision list’s chunk format, and its hit / break effects are its OE list (92-byte records as in EF00; the record’s kind byte says when it plays: 0 while the variant shows, 1 on a hit, 2 on a break, 3 other; kinds from the shared notes, not re-read).

The class behaviour (hits, breaking, pieces) is decoded in “Stage objects: classes, hits and breaking” below.