Collision attributes, groups and casts (executable)

Decoded 11-10 from the collision world’s pair routine (0x1401d5130), the collision control module (0x1401631a0–0x140164e00) and the character code; attribute use checked on all 21 stage files that have a collision set (st01–st09, st12–st17, st22–st26, st32).

The contact record (0x60 bytes, made per touching triangle by the mesh pair routines and tagged by 0x1401d5130):

off field
0x00 u8 contact kind (3 = mesh triangle)
0x01 u8 the querying shape’s attribute (0x22 for a character’s probe)
0x02 u8 the touched shape’s attribute (the stage file’s per-mesh attribute byte)
0x03 u8 the touched shape’s flags byte (with the loader’s query bits)
0x04 u16 the touched object’s group
0x10 owner of the touched object (a stage object, or null for the arena)
0x18 the touched shape
0x20 next contact
0x28 f32[3] contact point
0x38 f32[3] triangle normal
0x48/0x50/0x58 pointers to the three corners

So “contact byte 2” of the character loops is the mesh attribute (H: the tag code copies the shape head’s byte 0, and the pair table is indexed by the head’s byte 1, the shape type). The loader’s query bits (0x10 / 0x20 / 0x40 / 0x70 by attribute) are only carried into contact byte 3; no reader of those bits was found in the collision world or the game code (searched bit tests on shape +2 and contact +3), so they select nothing we can see (M).

Attribute table (who is stopped by a mesh of each attribute):

attribute characters (wall, edge, floor passes) shot / skill casts sight casts ground probes notes
1–15, 21–30, 32 solid solid block floor the surface kinds; the number picks the ground sound (below)
16 solid pass pass skipped touching it in the floor loop notifies a battle object (0x14022ba20, effect not followed, L)
17 (0x11) solid; a body standing on it is sent back (pit) solid block floor in no stage file of this build (all 21 checked, arena and object lists)
18 solid pass block skipped character-only walls and lids (in almost every arena)
19 solid solid block floor only named by the loader’s query bits; in no stage file
20 solid, except in reaction state 5 or 7 (skipped then) pass block skipped st01 only (arena and one object kind)
31 never (skipped) pass block skipped st01, st03, st07, st09 and their variants

Ground attribute (character +0x12EC0 = mover +0x10): set to 1 at the start of each floor routine, then to the attribute of the contact the floor pick takes as the ground (0x1402558cb). The fall check reads it (0x11 → sent back; “Stage bounds”), and the surface sound routine 0x1402549e0 (one use site, 0x14025a1ba in the reaction/landing code; what triggers it was not followed) plays a positional sound by it:

ground attribute sound number
2, 3, 5 61
4, 6 62
7, 8, 9 63
12 64
10 66
15, 32 67
13, 14 68
11 69
21 … 30 141 … 150, in order
1, 16–20, 31 none

The other “ground probes” (0x140163b50 sphere, 0x140163cb0 drop; used by the movement code 0x140254c80, a reaction routine, one skill, and the drop 0x140164770) are separate queries with the 16/18/20/31 skip; they do not write +0x12EC0.

Groups and hit masks. A world object’s word +0x28 is group (bits 0–14) | hits << 15 (sign bit = disabled); two objects are paired when either’s hits meets the other’s group.

object made at shape group hits
arena meshes 0x1401d4070 meshes 0x1000 0x4
structures (stage objects with state lists) 0x1401fbbc0 meshes 0x100 (0x800 some), from the object +0x138 0x44
other stage object classes 0x1401f3560 / 0x1401f3640 / 0x1401f7060 per class from the object (+0x108/+0x110), 0x100, 0x400 per class / 0
stage object 0x1401e2cb0 0x2000 0x100
stage object bookkeeping 0x1401d5d60 0x20 0
character body probe 0x140254500 sphere 0x1 0x1900
capsule (battle object 0x14021d610) sphere 0x40 0xF00
battle objects 0x140224430, 0x140230270 segment / other 0 0x1100
story event object 0x1401b8db0 0x100 0x1
shared probes of the collision control (0x1401631e0)
probe A (0x1404bec80): drops, place-on-ground sphere 0x1 0x1900
probe B (0x1404bec68): cast 0x1401633b0 segment 0x4 0x1900
probe C (0x1404beca8): casts 0x140163680, 0x140164330, long-move guard segment 0x1 0x1900
probe D (0x1404bec58): sight cast 0x1401641b0 segment 0x1 0x1900
probe E (0x1404becb8): ground probe 0x140163b50 sphere 0x4 0x1900
probe F (0x1404bec70): cast 0x140164020 segment 0x1 0x1100
probe G (0x1404bec88): 0x1401644b0 sphere 0x1 0x1100
probe H (0x1404becb0): character code 0x140250d15, a boss sphere 0x1 0x400

Group meanings read from this: 0x1 body/probe, 0x4 probe, 0x40 capsule, 0x100 and 0x800 stage objects, 0x400 a stage object class only probe H meets, 0x1000 arena, 0x2000 one stage object class. Hits 0x1900 = arena + both stage object groups; 0x1100 = arena + group 0x100.

Shots do not own world objects. A skill object tests the stage by calling the shared casts with its own start and end point each tick (callers in the skill code 0x140266000–0x140271000: 0x140163680 from 7 sites, 0x1401633b0 from 3, 0x140164330 from 5, 0x1401641b0 from 8, the drop 0x140163cb0 from 1). So every shot kind that uses these casts meets the same set: arena + stage objects of groups 0x100 / 0x800, minus attributes 16, 18, 20, 31. Which cast each skill kind’s handler calls was not tabulated (L, the use sites are listed above for a later run).

The main shot cast 0x140163680 (out point, out normal, from, to, an owner tag, a player bit mask): (1) world query with probe C, nearest valid triangle (0x140163e80); (2) for each player whose bit is in the mask and whose barrier object (player status +0x61A0, active flag +0x28, owner index +0x14) is active, that object’s own segment test (its virtual method +0x60); a nearer hit replaces the stage hit. Each barrier is tested once per cast. (The barrier object is the defense-wall side of the skill system; its shape was not read.) 0x1401633b0 is the same with probe B (group 0x4, so the arena’s and structures’ own “hits” also pair with it). With the collision switched off (global 0x1404c01d8 = 0x7777, set outside a match) every cast falls back to a plane at height 0 (0x140164610) or reports nothing.

Callback entry points of the collision control (L; the developer names group them as player shot, object attack, object jump, moving object, structure; they are thin virtual methods that forward to the stage object’s own handler at +0x10, stage-object internals not followed here): 0x140164960, 0x1401649a0, 0x140164a50, 0x140164ad0, 0x140164b20, 0x140164b90, 0x140164c10, 0x140164c60, 0x140164cd0, 0x140164d50, 0x140164da0 (called from 0x140165700–0x140165f80).

Implementation notes for the rebuild