Stage objects: other families

Continues “Stage objects: classes, hits and breaking” above (breakables, pieces and their flight are there and are not repeated). Read from the executable (the object base vtable at rva 0x48c6c0, 70 slots, and each class’s overrides with the adjustor thunks resolved) and counted over every stage file with the struct reader of converter/stageobj (StageHeader, Placement, ObjectDef, SoundRow, EffectEntry, joint_t). Confidence per block: H = read in the code and checked against the stage data, M = read in the code only, L = skimmed or inferred. Nothing here was checked against footage.

Class tables and components

The class table array is at 0x1402dc4f0: table 1 → 0x1403ee620, 2 → 0x1403ee870, 3 → 0x1403ee720, 4 → 0x1403eeae0. A class is a small object assembled from behaviour components (mixins named A… in the type information) over one virtual base (pdStageObjStructBase). The components a class has decide everything it does:

Component What it adds Conf.
AHit takes hits and counts them (the breakable path of the section above) H
AHitif AHit with an extra condition on the hit (condition not read) L
ACrm “crumble” break: pieces state, then gone or wreck H
ARoll “roll” break: the object itself becomes a flying 8-point box H
AVer + AOn support link: this object stands on / carries others (below) M
AVerU + APl support link, the other vertical direction (which is up was not separated) M
ATch + ATchR support link by touching, both ways M
AWall wall-mounted variant of the link test (not read) L
ACol “collapse” family (own support-lost handler 0x1401e7aa0; the rest not read) L
ACrmF crumble variant (0x1401e9440, 0x1401eb380, 0x1401eafe0; not read) L
ACrmUtil timed fall (class FallCrm, below) M
AFltif floats: bobs up and down, never breaks (below) M
AHri on Rep17 only (not read) L

Base vtable slots that the families override (slot = offset / 8): 3 tick (0x1401fdd20: pre-update slot 65, then by net state at +0x108: 2 → 0x1401fd070, 3 → 0x1401fd1e0, else the hit handler slot 9; then slots 16, 10, 28 and the class update slot 68); 4 draw; 11 / 12 link / unlink; 14 / 15 the two link tests; 17 sound; 18 grab; 19 can be thrown; 22 take the definition’s flags; 23 release effects; 25 release dependants; 26 break; 27 support lost; 29 init; 30 make pieces; 40 take the placement’s phase / argument; 57 matrix; 63 link pass; 64 collapse by flag mask.

Classes placed on the versus stages (st02–st08, their +10 / +20 variants have the same lists, and st24; list 0 / list 2 counts where they differ). H for the counts.

Table / class Components Behaviour Placed on
1 / 4 AHit, AHitif breakable that is drawn only while its visibility test passes (0x1401f3c00) st04 ×11, st24 ×1
1 / 15 (own: 0x1401eb800, 0x1401e77b0, not read) one special object st02 ×1
2 / 1, 2 / 2 AVer, AOn, ARoll, AHit roll breakable that can carry others st02 116 + 40/27, st03 23 + 1, st04 98/85, st05 11, st06 166, st24 53
2 / 3 AVer, AOn, ACrm, AHit crumble breakable that can carry others; the only class with throwables st02 50, st03 67, st04 33/13, st05 20, st06 98, st08 16
2 / 4 as 2 / 1 + AHitif st03 list 2 ×6
2 / 6 AVer, AOn, ACol collapse st06 ×1
2 / 8 AVer, AWall, ACrm crumble on a wall st03 ×30
2 / 17 ARoll, ATch, ATchR, AHri roll, linked by touch st03 ×3
2 / 18 ACrm, ATch, ATchR crumble, linked by touch st03 47/17
2 / 23 ACrm, ACrmF crumble variant st03 ×4, st04 ×7 (list 0 only)
2 / 26 ACol collapse st02 ×9 (list 0 only)
2 / 28 AVerU, APl, ACrm crumble, linked the other way st03 ×4, st04 ×4 (list 0 only)
2 / 48 ACrm, AHit plain crumble st04 ×5, st05 ×14, st24 ×5
2 / 53 ACrm (no AHit) crumble that shots cannot hit and that has no link test either (corrected 11-12: it is never linked; what breaks it is open) st05 ×5
2 / 54 AFltif floating prop st05 ×7
2 / 58 ACrmUtil timed falling platform st08 ×29
4 / 16 (jump) jump pad st05 ×5 (list 0 only), st06 ×1/×4, st07 ×4, st08 ×4

Not on any versus stage: table 2 classes 65–74 (st01 only, not selectable), table 3 (chairs, units, door triggers) and table 4’s readables (1–12, 15, 20, 21) and doors (22–24): all on the town stage st09 only. They are out of scope for versus and were not read.

At stage setup every object runs its link pass (slot 63, 0x1401fc940) over the object table (0x1405322c8, count 0x1405322bc): when this.slot14(X) or X.slot15(this) is true the two are linked: X records this as one of at most 4 supporters (+0x140), this records X as one of at most 16 dependants (+0x160), and X is marked as resting on something (+0x100 = 1, +0x108 = 0). A link test is a flag predicate of the component followed by a geometric test. (Corrected 11-12: the geometric test is a ray from the mesh’s bounding sphere centre along the object’s own Y axis against the other’s triangles, or a sphere touch test; the predicates, directions and the resulting links per stage are in “Stage destruction: support chains and the collapse family” below.)

When an object breaks, or is taken by kinesis, it releases its dependants (slot 25, 0x1401fc9c0 → 0x1401fdbb0): each dependant’s “support lost” handler runs (slot 27; crumble 0x1401e83c0, roll 0x1401ebf90, collapse 0x1401e7aa0). That handler marks the dependant taken, spawns its state’s kind 2 (break) effects unless bit 0 of 0x140530ccc is set, plays the break sound, releases its own dependants in turn (so a stack falls as a chain, in one tick) and makes pieces as a normal break does. The hit counter plays no part.

A stage set up with byte 0x14052ad0f = 1 sets 0x140530ccc |= 3 and collapses every object whose flags have 0x30000 silently (slot 64) before the battle. Who sets that byte and those flags was not found (L: a pre-destroyed stage state).

Kinesis throwables, object side (H code and data; M that the object never returns)

Jump pad (table 4, class 16) (H code, values H, units M)

Timed falling platforms (table 2, class 58; st08) (M code, H data)

Floating props (table 2, class 54; st05) (M / L)

Never break (no hit component). The class update (0x1401f3c40) offsets the object vertically by a sine of the global tick × 1.5 units, with a per-object phase hashed from its position (0x1401df810). The period was not pinned down. Whether the collision moves with it was not read.

Stage events on the net and the stage clock (H layouts, M protocol)

This replaces the field layouts given for messages 6 and 7 in the network section (the record sizes and routines there were right).

Message 7, stage object event: queue at 0x14059ba30 (at most 128, count 0x140530cc0), 32-byte records (netmsg: this is the queue record; on the wire the sender 0x14027c200 puts the stamp first and shifts the rest by 4, see “Versus network messages”):

Offset Type Field
0x00 u8 code: 0x45, 0x46 hit; 0x47 break at a time; 0x48; 0x49
0x02 u16 object index in the stage’s object table
0x04 s16[3] contact position (whole units)
0x0A s16[3] direction × 10
0x10 u8 1
0x11, 0x12 u8, u8 (not read)
0x1C u32 time stamp (stage clock, below)

Writers: 0x1401fca10 (0x45), 0x1401fcb70 (0x46), 0x1401fccd0 (0x47; also sets the local object’s net state +0x108 = 3 and +0x104 = the stamp), 0x1401fce70 (0x48). Receiver 0x1401fd330 (the index must match the object): 0x47 keeps the earliest stamp when two peers broke the same object, and breaks it at once when the stamp has passed (through the break wrapper 0x1401fdc60, net state 4), else stores the message and waits (state 3); 0x48 in state 2 → 0x1401fcfd0, state 1; 0x49 → 0x1401fd070. So a break is an event with a time, applied by every peer at that time; the pieces are each peer’s own.

Message 6, hit reaction at a point: 28-byte records at 0x14059ca30 (count 0x140530cc4; writers 0x140202224, 0x140202570; receiver 0x1402020f0): s16[3] position at +4, s16[3] direction at +0xA, material byte at +0x11 (0x21 is added when the byte at +0x12 is 1). The receiver plays the material-indexed hit reaction routine (0x14021d3f0) there: the impact effect of a shot on stage geometry, shown on the other peers.

The stage clock (pdStageNetExec: reset 0x1401d9f80, tick 0x1401d9f90, 0x1401d9ea0): 0x140530cb4 = battle ticks since the start minus the paused ticks. In game modes 4 and 5 (network) an event’s stamp is elapsed × [0x1404bc9b4] + the local player index, which gives unique, ordered stamps across peers. Nothing else is synchronised: there is no object state snapshot, only these events, the clock and the per-battle placement list variant (host’s draw, “Versus options, stage list”).

Destruction effect services (L, triggers mostly open)

Stage hazards per arena (H counts; effort is our estimate)

Objects in list 0 / list 2. “Linked” = classes with a support link component.

Stage (and +10, +20) Objects Throwables Jump pads Other families Left to build beyond plain breakables
st07 4 – 4 (100) – pads only: smallest
st24 (list 3 only) 59 – – 1 visibility-gated nothing new
st05 62 / 57 13 5 / 0 (120) 7 floating, 5 support-only crumble pads, floating, links
st08 49 – 4 (200, 250) 29 timed falling platforms pads, timed fall (stage clock)
st03 179 / 147 29 – 30 wall, 50 / 20 touch-linked, 4 + 4 variants (list 0) links, throwables
st04 158 / 114 33 / 13 – 11 visibility-gated, 7 + 4 variants (list 0) links, throwables
st02 216 / 194 – – 9 collapse (list 0), 1 special collapse family (not read)
st06 266 / 269 51 1 / 4 (250) 1 collapse pads, links, throwables; most objects

Implementation notes for the rebuild