The straight fire shot, the rebuild against the game, difference by difference (eft0061 + executable)
Input: a side-by-side recording of the same cast (data record 130, effect eft0061) in the 2017 PC build and in the rebuild, plus an Xbox recording of the same skill. Footage is used only to locate and to check; values come from the executable (1.3.25854.2), the effect pack and the animation data. Confidence: H read in code or data and seen in footage, M read in code or data only, L footage only.
1. The stage is lit by effect lights (corrects “the stage gets no effect light”) — H
- Light-set select 0x140199970(set): returns when the set is the current one (0x140527c94). Otherwise base = set × 8 + 0x40 in the light pool (0x70-byte records at 0x1405a6a40) and the light slots are pointed at: hemisphere 0x14057f3d0 = base, directional 0x14057f3d8 (and 0x14057f408) = base + 1, point light 0 (cP0) 0x14057f3e0 = base + 2, point light 1 (cP1) 0x14057f3e8 = base + 3, 0x14057f3f0 = base + 4.
- Exception for set 0: when the global 0x140527cc8 is not −1 and pool record 0x80 + that index is live (kind at +0x68 ≠ 0), cP0 points at that effect record instead of base + 2.
- 0x140527cc8 is written by the light02 element update (0x14010c990, write at 0x14010cd10) with the index of the record it has just allocated (first free of the 32 effect records, 0x80..0x9F, scanned from 0). It is reset to −1 at light init (0x140199a30) and at the battle scene setup (0x14019a020). Nothing else writes it.
- So everything drawn under set 0 (stage, stage objects, capsules, lit effect meshes) takes the most recently allocated effect light as point light 0 while that record is live. When the record is freed, the set’s own point light returns (record 0x42, black on every stage but the ones whose light script drives it). There is no re-pick of an older light that is still live. Record 0x42 is the “fixed record 0x1405a8720” the older note could not name: the set 0 point light.
- The term is the same one as on characters: colour × range × max(dot(P − p, n) / |P − p|³, 0).
- The character binder 0x140199e70 (set 1, then cP0 = the player’s channel output) is called from the player draw, the character-select screen, boss classes and one story object only. The stage never goes through it.
- For this skill: the cast slot’s light02 (right hand, frames 0–30, black → orange) lights floor and walls around the caster from the first cast tick; at the release the flight slot’s light02 allocates a new record and takes over, so the lit patch travels with the shot; after the hit the record lives int(end + 1) ticks and fades 15 ticks × 0.625 (as decoded before).
- Footage check (PC build, mean RGB of fixed patches at four times around the release): far left wall (38,38,35) → (70,43,35) → (50,40,35) → (39,39,35); mid left wall (35,38,36) → (52,40,36) → (68,42,36) → (36,38,36); right wall unchanged (26,31,32); floor at the caster (42,49,51) → (59,55,51). The Xbox recording shows the same warm patch. Same on both builds.
- The rebuild: the stage shader has the term
(
p0_col,p0_pos,p0_c5,p0_rangeinpd_data.gd), fed only by the stage light script (pd_stagefx.gd_apply_light). Effect lights reach characters only (pd_effect.gd_make_light). - Built in bof4:
PdEffect.latest_lightholds the id of the record written first most recently (the 0x140527cc8 index),PdData.apply_stage_point_lightwrites that live record (colour × range, colour, range, position) into the stage materials’p0_*and otherwise the stage’s own set 0 point light from the light script. Capsules are not fed (their shader has no point light term).
2. Cast animation and the feet
- Game (H, data + footage): ground profile 61 → animation slot 70, 40 key frames at one frame per tick (1.333 s), release at tick 20. The root joint does not move (no root motion). Both feet stay planted for the whole clip in a wide stance (one foot forward and out, the other about half a metre back); only the upper body moves: the right hand is held beside the head for frames 6–18, pushed forward at frames 20–24 and held to 30; the left arm swings out and up at frames 22–32; back to rest over frames 34–40. Air profile 312 → slot 68, release tick 20.
- Game, facing (M, decoded before in “Vertical aim of a cast”): the cast yaw is fixed at the cast start (target bearing, or the camera yaw with no target); the body turns onto it by the character’s turn step per tick and then holds. The camera does not turn the body during the cast.
- The rebuild plays the same slot at the same
rate with a 0.1 s blend
(
data_skill.gdsetup_record,pd_character.gdplay_action) and keeps the body rooted for the full animation (player.gd). In the recording the camera orbits during the cast and the body yaw changes by about a quarter turn with it, so planted feet slide over the floor and read as stepping. Cause inferred from frames and code (player.gd_facefollows the camera yaw while a target is locked;_face_castsnaps at once), not proven by a run. Not checked: whether the recorded cast was the air one (slot 68). - Built in bof4: the body holds the yaw it has
at the cast press for the whole cast state
(
player.gddoes not turn it while the cast recovery runs); the camera still follows the lock. The turn step into the cast yaw is not built (the yaw is taken as it is).
3. The flash at charge and release (“the missing effect”)
What the game shows is a yellow-white fill of the orb in the last third of the charge and a 1.2–1.5 m cloud at the chest for about half a second from the release. Both are particle01 emitters of the pack (H: data + both builds’ footage):
| slot | element | joint | frames | size | texture | blend | colour → end | emit |
|---|---|---|---|---|---|---|---|---|
| 0 cast | 2 | right hand | 0–22 | 3000 | 5 | 0x1200 | (1, 0.3, 0, 0.5) → 0 | haze from the first tick |
| 0 cast | 3 | right hand | 19–24 | 4000 | 5 | 0x1200 | the release peak | |
| 0 cast | 4 | right hand | 17–22 | 300 → 100 | 4 | (1, 0.5, 0, 1) | streaks | |
| 0 cast | 5 | right hand | 17–24 | 3000 | 7 | |||
| 0 cast | 6, 7 | wrist, forearm | 14–22, 16–22 | 6 | ||||
| 3 release | 1 | body | 0–4 | 3000 | 6 | one/one | (1, 0.25, 0, 1) → 0 | 12 per tick, life 15, speed 0.5 |
The cast slot’s meshes run to frame 23, three ticks past the release; its late mesh set (frames 12–23) is the body-sized ring both builds show at launch.
The rebuild draws the same elements through the decoded particle draw, but they come out as a small dim red smudge (charge) and a red cloud (release) where the game saturates to yellow-white. The element list and timing are right; the open part is how overlapping additive sprites add up. Not decoded in this run (no render probe was made). Leads, in order: (a) the sum is taken in linear light in the rebuild and on stored 8-bit values in the game (a dozen layers of a dark orange stay red in the first and clip to yellow in the second), M; (b) a factor in the particle01 colour path (the vertex colour clamp or the alpha weight of blend 0x1200), L; (c) the glow pass on the summed frame, L.
Decoded in bof4 (H): the
blend column above is not used: every particle
draw sets one / one, add itself (section “Effect
particles”, Blend). The rebuild drew elements 2
and 3 with their material’s source colour / one,
i.e. the sprite colour squared, and the cast
haze textures are dim (their brightest texels
are about half of full scale), so the square
stayed a dim red. Drawn one / one, a dozen haze
layers add up to yellow. Lead (a) is ruled out:
the Godot compatibility renderer used here adds
the stored values (no sRGB step on output: 0.5
reads back 128, 0.5 + 0.25 reads 191). Render
probe (godot/tests/render_flash.gd,
play camera, 1280 × 720), mean of a 120 px box
at the chest: tick 16 (168,117,47) →
(191,140,43), tick 20 (120,53,47) → (170,95,51);
the PC footage at the same moment ≈
(216,192,60). Still open: after the release the
rebuild turns red within about two ticks where
the game stays yellow for about eight (leads:
the release cloud’s joint, the body joint at the
hips, against the game’s chest-high cloud; the
glow pass; the aging rate of the cloud).
4. The red burst
It is the same release instance (slot 3 on
the caster), so the game does play it
(H): element 0 is an
msparticle00 on the body joint at 2 units up
(frames 0–5, texture 8, blend 0x1200), elements
2–4 are three particle01 streak emitters on
joints 0.7, 1.0 and 1.3 m up (size 300 → 100,
the plain red texture 4, 8 per tick, life 25,
frames 0–4). In the PC build these read as small
orange sparks around the flash. In the rebuild
they are large red dots because msparticle00 is
still an inferred quad emitter and the point
sprites take the Xbox size rule
(xbox_sprites in
pd_effect.gd); the PC port draws
them below a pixel. That part is a port
difference: the Xbox recording has visible,
small sparks.
5. The green glow around the character is not part of this effect
Green glow and rising ribbons sit on the
player character through the whole recording in
both builds, stronger with a higher aura level
and absent at level 0 (L,
footage). It is a separate system the rebuild
does not have. Leads in the executable
(M that these are the right
entry points, nothing inside decoded): the
battle class pdBattlePsp (init
0x14019aa30, per tick 0x14019b520) loads and
runs an aura script (init 0x14019ac40, per-tick
run from 0x14019b7a8), loops over the four
players’ positions, draws into the render
targets at 0x14054c260 (set up by 0x1402864e0)
when bit 0x100000 of 0x14052fff4 is set, and the
result goes through the aura-box colour filter
(0x140289172); the aura shell meshes (vertex
format 0x0B) and the aura effect element are the
geometry side. (Corrected 11-14, auraglow:
decoded in “Character aura glow, the cast /
aura-card flare …” at the end of this file. The
shell meshes and the aura effect element are not
used by the shipped aura script; the glow is a
blurred silhouette of the character.)
6. Skill card at a cast press — contradiction, not resolved
- Decoded before (card draw 0x140155160): the card of the held slot (0x140150080: first slot whose button is in the mask at character + 0x1425c) is drawn with no hold time.
- Read in this run: the draw also needs the view’s popup state (+0x3fc + 0x210 × view) to be 0 and the slot’s field +0x3C to be negative; with +0x3C ≥ 0 no card is drawn. That field is an index (−1 normally) that 0x14020f1e0 / 0x14020f220 search for and the slot name code (0x1401526e9) uses as another name source. What sets it is not traced.
- Footage (L): neither build
shows a card when a slot button starts a cast
(PC: the slot’s socket lights for about 8
frames, then the flame); the rebuild shows the
card for about 5 frames at every cast
(
pd_hud.gdheld_slot()→_card()). - So one gate is missing from the decode: either the mask at +0x1425c is not the plain held mask once a press starts a cast (0x14024e378 / 0x14024ecf0 clear the input block 0x1424c–0x14273; 0x140178be8 sets a synthetic bit 0x1000000 in it), or +0x3C is set while a cast runs.
- Also seen, and already decoded (“Skill cast animation”): the aura cost is taken at the release tick (counter drops at the flash in both builds); the rebuild took it at the press. Built in bof4: the press checks the cost, the counter drops at the release tick.
7. Not examined
The wall impact (fire puff, dark smoke, a scorch mark that stays): the pack’s hit slot 2 has only an msparticle00 and one particle01; the mark belongs to “Surface marks”. Not compared.
Implementation notes for the rebuild
Ordered by how visible the change is.
- Flash colour and
brightness. Probe first: render eft0061
slots 0 and 3 alone and compare with the PC
frames; test whether the additive sum is done on
encoded or linear values in the compatibility
renderer (
tests/gpu_blend_probe.gdis the starting point). Fix inpd_effect.gdparticle_materialonly after the probe names the cause. - Stage effect light. Keep
one “latest allocated effect light” index beside
the pool (set on allocation, never re-picked,
cleared at battle setup). Each frame, if that
record is live, write its colour, range and
position to the stage materials’
p0_*uniforms; otherwise the stage light script’s values. Characters keep their own two-channel pick. - Character aura glow. Needs its own decode run (section 5) before any build work.
- No card for a press that starts a cast, and aura paid at the release tick. The first is from footage until the missing gate is decoded; list it as such.
- Body yaw during the cast. Fix the cast yaw at the cast start, turn by the turn step per tick, and let neither camera nor lock-on turn the body for the 40 ticks. Verify with a run that logs the body yaw per tick during a locked cast while the camera orbits.
- Spark size. Follows the msparticle00 decode and the point sprite size choice.