Character aura glow, the cast / aura-card flare, the pickup cue and the jump animations re-checked (System/auradefault.ssb + executable)

Our reading of PDUWP.exe 1.3.25854.2 and of the aura script (disassembled with ssbdump.py). This replaces the leads of “The straight fire shot …” section 5.

1. Who owns the glow

The battle class pdBattlePsp (object pointer at 0x14052ad00 and 0x1404bbd50; init 0x14019aa30, per-match reset 0x14019ac40 called from the battle setup 0x1401bd990, tick 0x14019b520, draw 0x14019b920) keeps four per-player records of 0x120 bytes from object + 0xC0 and runs two functions of the script auradefault.ssb on them: the init function once per player at the reset, the move function once per player per tick. The script only sets record fields through group-2 built-ins 0x2021–0x203B (table 0x1403eede0; each works on the record of the player index at object + 0x44).

Record (offsets from object + 0xC0 + 0x120 × player; H for the fields the script or the character code writes, M for their use in the draw):

off type reset value what written by
0x00 u32 0x23 flags: bits 0–1 = draw mode (bit 0 the body glow, bit 1 the two particle pools), bit 4 = visible this tick, bit 5 = enabled 0x2021 (bit 5), 0x2022 (mode), tick (bit 4)
0x04 f32 3.0 size (blur width) 0x2024, value × 0.01
0x08 u32 0 glow colour (ARGB) 0x202E
0x0C s32 — school index 0–5 of the player (status record + 0x20) battle setup, 0x14012b22b, 0x1402504be; read by 0x2028
0x38, 0x3C, 0x40 f32, u32, f32 1.0, 0xFF000000, 0.15 pool particle scale, colour, second scale 0x202F (values × 0.01)
0x48, 0x4C s32 0, 0 pool values 0x2031
0x98 s32 180 strength 0–255 0x2023
0x9C s32 0 event (0, 1, 8, 10) character code (below), 0x203B; read by 0x203A
0xA0 s32 1 aura level character tick 0x14024f23b; read by 0x2027
0xA8 s32 0 ticks since the event (+1 per tick after the script ran; an event write sets 0) read by 0x202A
0x110 s32 0xFF alpha of the whole glow (0 hides it) character fade code 0x14024f3cc–0x14024f499

Object + 0x540: five colours set by the init function with 0x2035 (0xFF080880, 0xFF800808, 0xFF088008, 0xFF800880, 0xFF808008); only 0x2036 reads them and the script never calls it.

What the character code feeds (H):

2. The script’s rules (all values decoded from the script, H)

Every tick, per player:

  1. Glow colour = table B[school]: 0 → 0xFF787878, 1 → 0xFFA05050, 2 → 0xFF787850, 3 → 0xFF507850, 4 → 0xFF5050A0, 5 → 0xFF805078 (grey, then the five schools as red, yellow, green, blue, purple: ARGB, M for the byte order, from the school order).
  2. t = ticks since the event. If t < 30: event 10 → the cast flare, event 8 → the aura-card flare, event 0 → the level rule, any other event (1) → nothing is set for these 30 ticks. If t ≥ 30: the level rule.

Level rule. bucket = min((level + 3) / 4, 5) (integer division):

bucket levels mode strength size also
0 0 0 (nothing drawn) 230 while t < 150, then 100 unchanged
1 1–4 3 50 3.0
2 5–8 3 80 4.0 0x202F(0.8, table A[school], 0.15)
3 9–12 3 100 5.0 0x2031(0, 910)
4 13–16 3 120 6.0 0x2031(0, 910)
5 17 and up 3 120 7.0 0x2031(0, 910)

Table A: 0xFF404040, 0xFF8B0C08, 0xFF4C4008, 0xFF1D7008, 0xFF080880, 0xFF300840.

Flares (v = 30 − t, so they start high and fall back over 30 ticks = 1 s; mode 3 in both, whatever the level, so a level-0 character glows for that second):

event set by strength size
10 a cast starts 50 + 3 v (140 → 53) (700 + 3 v) / 100 (7.9 → 7.03)
8 an aura card is used 60 + 5 v (210 → 65) (500 + 5 v) / 100 (6.5 → 5.05)

After the 30 ticks the level rule’s values return in one step (no fade).

Where the events come from (H in code; the aura-card path checked against the skill data):

3. Sounds (ids only)

4. How it is drawn (M unless marked)

Draw 0x14019b920 runs once per view when the object is on and render flag bit 0x100000 of 0x14052fff4 is set. Per player whose record has bit 4 or 5 and a non-zero alpha:

  1. 0x14019c3d0 sets up the player’s 128 × 128 tile in the 512 × 512 filter target (texture slot 1): player p at x = 256 + 128 × (p & 1), y = 256 + 128 × (p >> 1) (tile corners from the quad table 0x14048ed10).
  2. Mode bit 0: the character’s own model is drawn into the tile as a silhouette in the record’s glow colour (colour constant set through the shader interface at 0x140413ef0; the model’s material flags are switched for this draw and restored).
  3. Mode bit 1: the two particle pools are drawn (0x14019b180, 0x14019c0a0). Their only spawners are the built-ins 0x2034 / 0x2039 (0x14019ad70 / 0x14019af00), and the shipped script never calls them, so both pools stay empty: the aura shell meshes (saura, vertex format 0x0B), PDEFTAURA01 and the sprite pool are not part of the glow in this build (M: read from the one script; other scripts were not searched for 0x2034 / 0x2039).
  4. After the players: 0x14019c620 runs the filter chain on the tiles: the AuraBox pass (0x140289000; pixel shader = texture × vertex colour clamped to ±1, with an alpha test), the reduce pass (0x140286c60), then GFilter2 (0x140287460), which draws each player’s tile with blend word 0xD101 (source factor = the blend constant’s alpha, destination one, add) and the blend constant alpha = the record’s strength (state 0x4B = strength << 24), and passes with word 0x1101 (one / one). (Corrected by the auraglow build run, 4a below: 0xD101 is source one, destination the constant alpha.)

4a. The blur passes, the tile view and the composite (auraglow build run 11-14, H unless marked)

Blend words (all filter and composite draws): source factor = table 0x1402f77c0 indexed by bits 8–11 of the word, destination factor = the same table by bits 12–15, operation = table 0x1402f7800 by bits 5–7. The table runs zero, one, then the colour / alpha factors in the D3D order, then the blend-constant factors (index 13 = constant alpha). Checked on 0x5401 (source alpha / inverse source alpha, the ordinary alpha blend). So 0x1101 = one / one (add), 0xD101 = source one, destination constant alpha (add), 0x1201 = source colour / one.

Blur quads. GFilter2 (0x140287460) draws from four quad tables (0x14048e990, 0x14048eb50, 0x14048ed10, 0x14048eed0), each 16 vertices of 0x1C bytes: position x, y (float), four texcoord pairs (signed 16-bit normalised, doubled by the vertex shader) and an index byte (2 × player + tap set) that picks the vertex’s weight vector from the eight weights above. The four taps of set A sit at −1.5, −3.5, −5.5, −7.5 texels along the pass axis, set B at +0.5, +2.5, +4.5, +6.5, both with a half-texel offset on the other axis. The exponents cᵢ are exactly −(offset² + 0.25) / 2 for these taps, so the kernel is a sampled Gaussian of the tap distance with variance = size (size 7 gives the bloom filter’s kernel). The blur is symmetric: nothing pulls it upward.

Pass order per player p (tiles in the 512 × 512 target, a = 128 × (p & 1), b = 128 × (p >> 1)):

  1. horizontal, set A, from the silhouette tile (a, 256 + b) into (256 + a, b), blending off (it replaces; the pass setup 0x140286240 selects mode 1 with the blend enable off; r2);
  2. horizontal, set B, the same source, added on top;
  3. vertical, set A, from (256 + a, b) into T = (256 + a, 256 + b) with word 0xD101 and constant alpha = strength: T = blur + (strength / 255) × T, where T is the previous frame’s finished tile (frame feedback, see below; r2);
  4. vertical, set B, added (one / one).

The filter pixel shader sums its four taps times the vertex weight, clamps, discards when the luminance (0.3, 0.6, 0.1) is at or below a shader constant (L: value not read) and writes the luminance as alpha. The alpha test (reference 0x205’s state) is on only for the add passes 2 and 4, off for pass 3 (M, r2; the threshold value is L).

Frame feedback (r2, H). The per-frame clear (0x140288ee0) clears filter target slot 0 (where the silhouettes are drawn), not slot 1, the target the reduce pass writes and GFilter2 reads and writes. Slot 1 is cleared only at the per-match reset (0x14019ac40, colour 0, depth 1.0). The reduce pass (0x140286c60) draws the silhouette’s uv (0, 0)–(0.5, 0.5) into the 128 tile (0..128, 256..384) for player 0. The frame bloom chain (0x1402885d0) writes slot 1 only in (0..192, 0..64), so nothing else touches T between frames. Pass 3 therefore keeps strength / 255 of the last frame’s T: for a body that does not move, T settles at blur / (1 − k) with k = strength / 255 (× 1.24 at strength 50, × 1.65 at 100, × 1.89 at 120, × 5.6 during the card flare’s 210). The strength term is a trail and gain, not a scale on a sharp copy. Whether the PC build runs the chain once per drawn frame or per 30 Hz tick is L (the rebuild runs it per drawn frame).

Which players’ tiles the chain runs on (auraglow3, H). The per-frame glow draw (0x14019b920) loops over the four players: a player’s silhouette is drawn into its tile only while its record draws (record mode bits 0x30 set and a non-zero alpha). After the loop the reduce and GFilter2 run once (0x14019c620) for the players 0 .. n − 1, where n is the highest index of a player whose silhouette was drawn, plus one (n = 1 when none is drawn); GFilter2 draws 4 n vertices from its quad tables, one quad per player. The strengths and blur weights are written every tick for every player, whatever its mode (0x14019b7c4, 0x1402864e0). So a player whose glow is off keeps its T, and nothing clears it when the glow comes back: if its index is below n, the chain still runs on its (empty, cleared per frame) silhouette tile and T decays by strength / 255 per frame; at or above n, T is not touched (frozen) and the old tile comes back on the first frame drawn, decaying from there. The composite (AuraBox, per player) is skipped while the record does not draw. The AuraBox pixel shader multiplies the tile by the clamped vertex colour and discards texels whose alpha (the luminance GFilter2 wrote) is at or below a constant; with blend word 0x1201 the result is the squared glow (confirmed, no other gain in the composite).

Tile view (0x14019c3d0): each player’s silhouette is drawn into a 256 × 256 viewport at (0, 0), (256, 0), (0, 256), (256, 256) (table 0x1402f3770) with the battle camera’s projection (75° at 853 : 480, as the main view) whose x and y columns are scaled by k × w, k = 0.02112 (0x1402f7c8c), w = the vertex’s own clip w. The character’s feet are moved to y = −0.625 (0x1402f7d4c) of the tile. The result is a fixed-size, distance-independent view of the body: about ±3.6 m wide and ±2.0 m high around a point 1.28 m above the feet. The reduce pass (0x140286c60) halves the 256 viewport into the 128 tile (H, r2: its uv rect and target rect read as above).

Composite (0x14019c980, after the chain): blend word 0x1201 (source colour, destination one), then per player a stencil test “not equal” with mask 0xE0 and the reference from byte table 0x1402db22c (64, 96, 192, 224 for players 0–3). AuraBox (0x140289140) draws T over the screen with a vertex colour whose grey level is alpha² / 256 (the record’s alpha); texture coordinates 0.5 + 0.25 × (p & 1), 0.5 + 0.25 × (p >> 1), size 0.25. With source colour as the factor the frame gains (alpha × T)²: the glow is squared, so faint edges vanish and the bright core stays. Character models with draw flag 0x40 write the same per-player stencil values (near 0x1402a6091), so the glow is not drawn over the player’s own body, only around it. (L: the box’s position and size on the screen; the depth test of the composite; whether the frame bloom sees the glow.)

Camera turns (auraglow4, H). The tile view above is built from the battle camera of the frame being drawn, and T stays in tile coordinates (the body sits at a fixed place in its tile), so turning the camera changes neither T nor the feedback: the game has no reprojection or reset on a turn, and the glow follows the body in every frame. The rebuild matches this by placing the silhouette view, the composite and the own-body mask with the same camera and body transforms the frame is drawn with (Godot’s interpolated ones). Before auraglow4 it used the 30 Hz tick transforms, so in a turn the glow sat up to a tick’s turn away from the drawn body.

Silhouette colour upload (auraglow4, H). The glow draw (0x14019b920) hands the record’s colour dword to the character-draw interface at [0x140413ef0] (vtable 0x14048f798). Its entry +0x28 (0x14029e090) stores the dword; entry +0x30 (0x14029df00) binds the textures, sets pixel constant 0 from the table 0x140490c00 and then replaces it with the colour bytes (R, G, B, A from bytes 2, 1, 0, 3) times 1/255 (0x1402f7c58), through the pixel constant writer 0x14001ed70. So the colour reaches the shader as byte / 255, with no “0x80 = 1.0” doubling on this path. The interface’s shaders are SBOS_vs / SBOS_ps (constructor 0x14029e0a0, key table 0x1403d7610), whose pixel shader uses constant 0 only in its alpha term; which output of that draw lands in the silhouette tile (lead: the material flag 0x800 set or cleared by the loop at 0x14019bb20, and the second colour output that every character pixel shader writes from its “blend colour” constant) is L, so the glow’s brightness scale is not decoded yet.

School (L): the record’s school is written by 0x140250480 (character + 0x60 and record + 0xC), called from 0x14012d780 with a value read through a pointer that was not followed.

“Out” (H): the level is fed as 0 while the character’s active or alive word (character + 0x20 / + 0x24) is 0.

Pickup cue gate (M): the slot-fill routine (0x140261bb4) plays cue 0x56 positional at the character, only for a character whose + 0x10 word is 0 and when its caller asks for it.

5. Jump and fall animations, re-checked

The playtester sees raised arms on every jump that the game shows only in a long fall. The slot choice and timing of “Movement animations” were read again and stand (H):

Implementation notes for the rebuild

  1. Aura record per player (in the combat core, not Phantom Dust specific code): school, level (0 while status slot 8 is set or the player is out), event, ticks since the event, and the derived mode / strength / size / colour by the rules of section 2. Step it once per tick; the counter goes up after the rule ran.
  2. Events: raise 10 when a cast state starts, 8 when an aura card (card id 0) is used (aura cards keep no cast state and no animation), 0 at a character reset. Send them to the other peers with the cast / card messages the rebuild already has.
  3. Draw: per player a low-resolution (128 × 128 in the game) silhouette of the character in the glow colour, blurred with the eight normalised weights exp(cᵢ / size), added to the frame scaled by strength / 255. Nothing at level 0 outside a flare. No shells, no sprites. List the blur offsets and the composite as INFERRED until the GFilter2 passes are decoded; compare with the PC footage at levels 2, 6, 10 and during a cast.
  4. Sounds: cue 0x56 at a capsule pickup (this machine’s player), cue 0x59 when the aura card raises the level.
  5. Jump: change nothing in the slot choice or rates. The arm pose needs the joint composition decode first (section 5); do not add a fall-height rule.
  6. Levitate animation: slots 43 / 44 by stick while status slot 11 is set, when the levitate skill is built.