Stage attack bodies and landings
What hurts a character without a skill being
cast: the category 0x400 bodies of flying pieces
and of the break sphere, and landings. Read in
PDUWP.exe; the two skill records and the action
rows are checked in gsdata_en.dat.
Confidence per block.
The consumer of category 0x400 (M code, H records)
Step 2 of the movement step is the consumer: character virtual slot 0x80, 0x140250cd0. (It is not a touch list; the “48 records” it writes are the character’s own skill objects.)
- Runs every tick while the match phase global 0x1404bc950 ≠ 0, only for a locally simulated character (C + 0x34 ≠ 0), and not while the global 0x1404c01d8 holds 0x7777.
- Test: a sphere at the body point C + 0xe0
with the body radius C + 0x130, through shared
probe H of the collision control (0x1404becb0:
group 0x1, hits category 0x400), query
0x1401d5860. Only sphere contacts whose callback
is a
pdStageColPtr_StObjAtckcount. - The callback object (vtable 0x14048bd20):
| Offset | Meaning |
|---|---|
| +0x08 | kind byte 5 |
| +0x10 | owner object (the piece; null for the break sphere) |
| +0x18 | attack value, a byte (joint float 0, truncated) |
| +0x1c | vec3 velocity of the body this tick (zero for the break sphere) |
- Per contact, by the attack value:
| Value | Direction test | Skill record used | Body after a hit |
|---|---|---|---|
| 1, 2 | needs (body point − body centre) · velocity ≥ 0: the piece must be moving towards the character | 0x2e4 | the owner gets flag 0x80000: the piece is removed |
| ≥ 3 | none | 0x2e5 | stays |
- The hit is a normal skill hit. The character takes a free one of its own 48 skill objects (C + 0x4e0, 0x1f0 bytes each, free when +0x10 == 0) and 0x140263ce0 fills it:
| Skill object field | Value |
|---|---|
| +0x14 | the skill record id above |
| +0x10 | 2 (live) |
| +0x24 | target mask 0x8e1f |
| +0x48 | owner = the hit character’s own state |
| +0x60 | carried damage = the attack value |
| +0x68 / +0x140 | the attack body’s centre |
| +0x100 / +0x1b0 | previous point = centre − velocity |
| +0x190 / +0x194 | the character’s body radius, and × 0.2 |
| +0x80 | matrix facing along the velocity (identity when its length² < 0.01) |
then runs the ordinary hit test 0x14026c1c0 once and ends the object (0x14026cd70). The function returns 1 when the hit path consumed the object, which is what removes the piece.
- So, from the ordinary hit path: an active defense skill gets its check (0x14026dcb0), the guard check runs (0x14026ecc0), the hit goes through 0x14026f870 with the invulnerability timer and statuses as for any shot; the swept test is previous point → centre with radius (body radius + the victim’s hit radius) and a line-of-sight cast from the victim to the centre must be clear.
- Owner credit: none. The hit is filed under the victim. Whoever broke the object is hit like anyone else; only locally simulated characters test, each on its own machine.
- The two records (index = id in
gsdata_en.dat): type 1, damage word 0 (the damage is the carried value), no hit effect, no sounds, reaction rows 46 / 2 / 3 for light / medium / heavy, behaviour 18; the second also has shield piercing (0x68 = 2). With the running-sum rule (< 3 light, < 5 medium, else heavy) on a fresh target: value 2 → 2 health and a flinch; 3 or 4 → that much health and a stagger. The joint values present are 2, 3 and 4. - Other callers of 0x140263ce0 are story bosses.
Repeats and the knockdown (playfix 11-14, H code and data)
Why a falling Palace piece knocks a standing character down although one hit of value 3 or 4 picks the stagger:
- No per-target memory. Every live tick builds a fresh skill object per contact (0x140263ce0) and the hit path 0x14026f870 keeps nothing about earlier hits from the same body. A staying piece (value ≥ 3) therefore hits again on every tick it overlaps the character while it moves faster than 1 unit per tick.
- Who can be hit. 0x14026f870 asks 0x14026f500 for the record’s hit-state flags (word +0x78; 0 reads as 1 = standing targets only). A character in reaction states 0xf, 0x11 or 0x12 (thrown / lying; checked at state + 0x12f04) needs flag 4 (on the ground) or 2 (in the air); a character with +0x63f4 set needs flag 8. Both stage records have +0x78 = 0, so once thrown the character is not hit again.
- The running sum. Each hit
adds the carried value to the sum (+0x63ec) and
sets its timer (+0x63f0) to 90 ticks. The
reaction pick (0x14024fd90) reads the sum after
the add: < 3 → row +0x6e, < 5 → row +0x70,
else row +0x72; a character not on the ground
(state
- 0x12e74 = 0) takes row +0x76 instead, 0x1b when that row is 0 (both stage records).
- So on the ground: tick 1, value 4 → sum 4 → row 2 (stagger); tick 2, still overlapping → sum 8 → row 3 (type 5, thrown); later ticks miss (thrown). 8 health in all. A character in the air is thrown by the first hit (row 0x1b).
The piece’s body (M)
Piece class pdStageObjRollBase
(vtable 0x14048c640): callback at +0xe0 (owner
+0xf0 = the piece, value +0xf8, velocity +0xfc =
position − last position, written each tick),
sphere body at +0xc8 with radius +0xd8 = 0.3 ×
the mean of the 28 pairwise distances between
its 8 box points. Each tick the body is placed
and entered into the collision world
only while the value ≠ 0 and speed² >
1.0 (units per tick); at speed² ≤ 1 the
piece’s rest routine 0x1401f7140 runs instead. A
slow or landed piece does not hurt.
The break sphere’s life (M)
0x1401e7300 builds an 0x88-byte
pdStageColSet (vtable 0x14048bce8):
callback at +0x60 (owner null, velocity zero),
radius 0.7 × the box diagonal. Its tick
0x1401d5cd0 counts to 1 and then flags it for
removal: it exists for one tick. Value 3 (the
only one in the data) → no direction test,
record 0x2e5: 3 health, stagger, pierces
shields, to every local character whose body
sphere overlaps it with a clear line of
sight.
Landings (0x140254c80) (M code, H action rows)
Drop d = highest point of the flight (state + 0x12e7c) − landing height. Thresholds 40 and 80.
| Landing from | d < 40 | 40 ≤ d ≤ 80 | d > 80 |
|---|---|---|---|
| jump / fall (air state 5) | action row 34 | row 35 | row 36 + ground probe (radius 10, value 1) |
| thrown (state 0x11) | severity 0, ground probe radius 10 | severity 1, radius 15 | severity 2, radius 20 |
- Rows 34 / 35 / 36 only differ in rumble strength (6 / 10 / 15). A jump or fall never costs health, whatever the height, and has no extra reaction.
- Thrown landing (local character only): sound 0x52 at the position; landing rows 37 / 38 / 39 (rumble) through 0x140259990(severity); and while the match phase is 6 the health routine 0x14024d7a0 is called with −severity: 0, 1 or 2 health. That routine only acts when the battle-mode global 0x1404bc9d4 ≠ 0. No further reaction; the thrown action’s own get-up follows. The “caught” path (0x14025c385) lands with severity 0.
- Ground probe 0x140163b50(position, radius, value): shared probe E (0x1404becb8: group 0x4, hits 0x1900) with the shared shot callback carrying the value. For a stage object this is a category 0x04 contact, the same as a shot touching it: every breakable object inside the sphere takes a hit / breaks by its class’s normal handler. So a fall of more than 80 and every thrown landing damage the props around the landing point; standing or landing softly on an object does nothing.
- Surface mark (corrected, landmark 11-13): the probe’s own follow-up 0x140245350 (collect arena triangles within 20 of the point) hangs off a singleton, 0x140533a40, that nothing in this build writes: dead code. The crater is made elsewhere, from the arena’s side of this same probe: “Surface marks: craters, debris and the hard landing”.
Implementation notes for the rebuild
- Piece attack: give a flying piece with value ≠ 0 a sphere (radius above) that is live only while its speed² > 1 per tick. Each locally simulated character tests its body sphere against it every tick; on overlap (and, for values 1–2, the piece moving towards the character) run the normal skill hit path with the record above, damage = the value, owner = the victim, swept from centre − velocity to centre. If the hit path consumed it (not blocked by the mask), delete the piece for values 1–2.
- Break sphere: same test against a one-tick sphere at the object, value 3.
- Net: nothing new. The victim’s machine decides, as for all hits on a local character.
- Landing: play rows 34 / 35 / 36 by drop height; no health change. Thrown landing: −0 / 1 / 2 health by the same thresholds (versus mode only), rumble rows 37–39.
- Landing breaks props: on a fall > 80 (radius 10) and on every thrown landing (radius 10 / 15 / 20) send one shot-type contact to each stage object in the sphere.
- The same probe leaves the crater and debris: next section (landmark).