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.
Support links and chain collapse (M)
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)
Which objects. “Can be thrown” (slot 19, vtable +0x98; roll 0x1401db4b0, crumble 0x1401daee0) is: bit 1 of the object’s byte +0x54 is set and the taken byte +0x4F is 0. The base class answers with the bit alone; classes without ARoll / ACrm never set it.
Where the bit comes from. Slot 22 (roll 0x1401db420, crumble 0x1401dae90) copies the definition’s joint parameters: joint float 1 non-zero → throwable (bit 1 of +0x54). This is the “float 1” flag the section above left open. The same routine: float 0 flag → +0x100 = 2 and +0x108 = 1 unless object flag 0x80; float 3 → object flag 0x2000000.
The grab (slot 18, vtable +0x90; roll 0x1401ec680, crumble 0x1401e87e0, same code; argument 1). It fills the caster’s record: the state 0 model resource (+0), the object’s matrix (+0x10) and a damage byte (+0x50) = the integer part of float 1 of joint 0 of the model’s skeleton chunk. So float 1 is both the flag and the value the cast adds to the card’s power (2 or 3 in the data). The first grab then removes the object from the stage: taken = 1, its state 0 model instance is cleared (no longer drawn), it leaves the collision sphere list (0x1405302f0, when flags & 0x1000005), its collision bodies are removed (0x1401d50b0), its effects are released and its dependants are released (what stood on it collapses). It returns 0; the base class returns −1 (cannot be grabbed).
Afterwards. The kinesis skill’s own update (0x1402694e0–0x140269a50) calls no stage object code: the thrown thing is the skill’s own projectile drawn with the object’s model, and the stage object stays taken for the rest of the battle. No pieces state, no wreck, no break sound from the object.
Data. Only class 2 / 3 definitions carry float 1:
Stage Throwables (list 0 / list 2) Damage byte st03 29 2 ×19, 3 ×10 st04 33 / 13 3 ×31 / ×11, 2 ×2 st05 13 2 st06 51 2 ×29, 3 ×22 st02, st07, st08, st24 none Kinesis therefore has nothing to pick up on four of the stages; what the cast does then is in “Kinesis (11), cast side”. The game control routine 0x140177f60 also asks “can be thrown” (probably the CPU’s skill choice; not followed).
Jump pad (table 4, class 16) (H code, values H, units M)
The object (constructor 0x1401dc1c0): flags |= 0x1000 | 0x2000 and the hit counter is preset to 0xFF, so it never breaks. Its collision carries a callback object of type 6 (the “object jump” callback, vtable rva 0x487f10); slot 40 (0x1401dc2f0) stores the placement’s phase byte as a float in that callback (+0x10). That value is the pad’s strength; the placement’s argument field is not used.
The trigger is in the character’s movement collision (0x140255020, at 0x14025577b): the floor triangle under the character belongs to a body whose callback type is 6 and the character is less than 7.5 units above the triangle’s plane (and above a lower bound derived from the body size). The collision result then carries “on pad” = 1 and the pad value.
The launch is in the movement step (0x140254590, at 0x14025471c), only when: the reaction state is 0, 1 or 8 (standing, moving, landing: not while hit, down or casting), the character is active and controlled (+0x20 and +0x24 non-zero) and the match phase is 6 (battle). It calls the ordinary jump routine 0x140257b90 with apex height = pad value × 0.1 m, jump kind 4 and gravity 0.12 units/tick². No button and no cost; standing on the pad is enough, every tick the conditions hold. With the jump routine’s rule (v = √(2·g·h), h in units) the take-off speeds are:
Pad value Apex Take-off speed Stages 100 10 m 4.90 units/tick st07 120 12 m 5.37 st05 200 20 m 6.93 st08 250 25 m 7.75 st06, st08 Flight. Kind 4 goes through the same airborne code as a normal jump (air control, landing and fall states as in “Player movement”); what kind 4 changes against the character’s own jump kind was not compared (L).
Feedback. The launch plays character effect 0x208 (0x14018d2f0) and the common sound bank’s cue 0x26 at the character (volume and pitch 0x1000).
The marker. The pad’s look is effect record type 0x07 (
EF00entry in the pad’s own object definition on st05–st08, and once more in the stage list on st07 and st08). Its class (update 0x140220070) spawns up to 10 sprites through 0x14022d570 with two layers ({100.0, 11, 15} and {1024.0, 8, 6}, 0x14022d390). Visual only; field meanings not read (L).
Timed falling platforms (table 2, class 58; st08) (M code, H data)
- Start time (slot 40, 0x1401df340): word 4 of the definition’s sound row × 30 ticks when that word is ≥ 0, else the placement phase × 90 ticks. At 30 ticks per second the word is whole seconds. All 29 placements carry the word: 20, 40, 60, … 300 s in steps of 20 (two orders interleaved, one value 190) and four at 900 s, which is past any time limit: those never fall. The phase values (0, 10 … 75) are therefore unused in this build. Skipped entirely when bit 0 of 0x140531c43 is set (setting not traced).
- The class update (slot 68, 0x1401f3710) starts the fall when the stage clock (0x140530cb4, below) passes the start time, so every peer starts it on the same tick.
- The fall (slot 28, 0x1401f3780) has three steps: 0 = spawn the definition’s kind 3 effects (the warning); 1 = sink by a fixed step per tick for a tick count, then spawn the kind 2 effects and play the break sound; 2 = free fall (speed += acceleration, y −= speed) until y < −100 units, then the object is deleted.
- Not read: where the per-object sink step, tick count and acceleration come from, and whether the collision follows the platform down (a character standing on it).
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)
- Crash, Collapse, Collapse2 and the end-of-world effect are per-battle singletons built together by 0x140224430 behind the “battle effects ready” flag 0x140532f44 (set at 0x14022c970; a readiness flag, not a trigger). The collapse object (0x14021c070) scans the four character slots in match phase 6. What starts each of them was not pinned down.
- Destroy: one per stage (0x1401d9040 from 0x140204e60, pointer 0x1405332f0): a destruction sphere, body targets 0xF00, that is given a contact’s position and direction (0x14021d6b0, placed by 0x14021d740) and armed (+0xA8 = 1) by the hit reaction routine 0x14021d3f0. (landmark 11-13: this is the surface mark routine, decoded in “Surface marks: craters, debris and the hard landing”.) That routine switches on the surface material (2..32; stages whose number ends in 8 have their own table) and is called from the object hit paths (0x1401eaa20, 0x1401eac80) and the message 6 code. This is the “effect’s destruction sphere” that the section above lists as one of the two things that hit an object.
- Effect record type 0x09 (class update 0x14021e8a0) is the common break effect: it sits in the object definitions’ effect lists, almost always as kind 2 (st03: 68 object entries and 13 in the stage list; st05 36; st06 41; st08 3). Its fields were not read.
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
- Jump pad: a floor-contact check in the
movement step (pad body under the feet, within
7.5 units), gated on reaction state 0 / 1 / 8
and the battle phase, calling the existing jump
with apex = phase byte × 0.1 m and gravity 0.12.
The converter has to carry the placement’s phase
byte and the class (4 / 16) into
layout.json; the pad never breaks and takes no hits. st07 becomes complete with this alone. - Throwables:
throwable = joint float 1 ≠ 0anddamage = int(float 1 of joint 0)on class 2 / 3 state 0 models; a grab removes the object for the rest of the battle (no pieces, no wreck, no sound), frees its collision and releases its dependants. For netplay this needs an event of its own kind in our protocol (the original sends the kinesis cast, and each peer’s cast grabs the same object index). - Support links: build the supporter /
dependant lists once at stage load from the link
tests, then on break or grab run “support lost”
down the chain in the same tick. The links are
now derived offline (
objects.jsonsupport_links, 11-12; see “Stage destruction: support chains and the collapse family”). - Timed fall (st08): start = sound-row word 4 seconds on the shared battle clock; sink, break effects, free fall, delete below −100 units. Deterministic, needs no net event, only the common clock (paused ticks excluded).
- Net: keep breaks as timed events with “earliest stamp wins”; our net version already sends a stage object event, so only the tie rule and the hit reaction at a point (message 6) are new.
- Not ready to build: the collapse family (st02, st06), the crumble variant (2 / 23), the wall link, the special object 1 / 15, the floating period and the crash / collapse effect triggers. Addresses are above.