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.)

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)
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
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.

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:

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

Implementation notes for the rebuild

  1. 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.
  2. Break sphere: same test against a one-tick sphere at the object, value 3.
  3. Net: nothing new. The victim’s machine decides, as for all hits on a local character.
  4. 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.
  5. 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.
  6. The same probe leaves the crater and debris: next section (landmark).