Lists: header word 0x98 is
the offset of the stage-wide effect list; it
points straight at an EF00 chunk
(Esper-RE st00.h): magic, u16
count, u16 byte size (= count × 92), then
92-byte entries. The OE00/OE01 object chains
carry more EF00 lists attached to props
(positions relative to the prop); those are not
played yet.
Entry (92 B): u8 type, u8
group, u8 0xFF, u8 0; position f32×3, rotation
f32×3 (radians), scale f32×3 (game units); 4
parameter bytes at +40; 12 floats from +44. The
executable spawns an entry through a constructor
table indexed by the type byte (rotation ×
32768/2π to its 16-bit angles); the object keeps
pointers to the parameter bytes and to the
floats from +52.
Types seen: 0x12/0x13 (one
class: water drips, Palace), 0x03, 0x09,
0x0A/0x0D, 0x0B/0x0C, 0x10/0x11, 0x14 (computes
a global direction × 0.001 at start, probably
the wind of the highway st02). Only 0x12/0x13 is
decoded and played.
Drips (0x12/0x13): a line
from the position along the rotated −Z axis,
scale.z long. Parameter bytes: b0 floor mode (0
= absolute height, 2 = fall distance below the
start, 1 = ray cast down, then +5), b1 longest
wait in ticks, b2 drops on the line. Floats: +52
gravity (0.05), +56 floor (50 or 110: the
Palace’s two floor levels, matching the 0x0C
entries at 50.8/110). st03 and st13 have 21
stage-wide lines (108 drops), st23 none; six
more 0x12 entries sit in OE lists.
Drop update (per 30 Hz
tick): state starts at “place anew”
(timer −1).
timer > 0: count down, nothing
drawn.
timer −1: place at lerp(start, end,
rand15/32767), timer = rand15 × b1 >> 15,
speed 0, then fall in the same tick.
falling: while the floor is below the drop,
speed += gravity and height −= speed². Otherwise
snap to the floor, timer −1, spawn a
splash.
The update is skipped while both line ends
project off-screen.
Drop draw: a quad, corners
(−0.75, h), (0.75, h), (0.75, 0), (−0.75, 0)
with UVs (0,0), (1,0), (0,1), (1,1), h = speed ×
5 × 0.7, white vertex colour. It is turned to
the camera’s heading and collapsed while timer
> 0. Render state: alpha test on, blend word
0x1101 (one/one, additive), depth test without
depth write, no culling. The texture comes from
a stage-type texture slot (id 0x2B for stage %
10 = 3); how that id maps to the stage ALR’s
textures is not followed.
stagefx.py picks the stage ALR
texture whose name says drop (INFERRED,
PLACEHOLDERS).
Splash: a generic particle
spawn with a random colour between two decoded
ARGB constants. Not followed further, not
drawn.
ALR texture names: chunk
0x15, u32 count, then 28-byte entries with the
name at +20 in Esper-RE’s six-characters-per-u32
text. Map/st00.alr is a shared
library of stage-effect textures.
SP00: sprite sets (quad
−5..5, UV cells) and a table of 50 texture slots
of 20 bytes; full layout in “Stage sprite sets
(SP00)” (hurt).
Type → class (the spawner
indexes a pointer table by the type byte; RTTI
names of the objects the entries build):
0x02/0x03 smoke (pdvkEbSmoke,
sub-type 0; 0x08 is sub-type 1), 0x05 glow, 0x07
jump point, 0x09 crash debris
(pdvkEbCrash), 0x0A/0x0D a model
(pdvkEbModel), 0x10/0x11 screen
shake (pdvkEbScrShk), 0x12/0x13
drips, 0x14 stage parameters
(pdvkEbStgParam); 0x0B/0x0C the
sound emitter (pdvkEbSE, “Stage
sounds”); 0x04, 0x06, 0x0E/0x0F, 0x15–0x18 not
named here. So the highways’ per-object
0x03/0x09/0x0A/0x10 are prop smoke, crash
debris, models and shakes, not
the blowing sand.
Stage parameters (0x14):
the wind = the entry’s rotated −Z axis × scale.z
(same Euler order as the drip lines); its length
is the strength. st02: (0.707, 0, −0.707).
stagefx.py writes it as
wind.
Highway sand storm
(pdvkSStorm): not an EF00
entry. The stage setup creates it for every
stage % 10 == 2 (st02/st12/st22), next to the
thunder. It owns three children: far papers
(pdvkSPaper, 6), near papers
(pdvkSPaperNear, 10) and a sphere
(pdvkSSphere).
Intensity: set only by the
vkSAND shader’s constant upload,
from the engine frame counter t (+1 per tick):
A = min(1, ((2 sin 0.01t + 1.5 sin 0.04t) / 3.5 + 1) · 0.375 + 0.25),
B = clamp(2 sin(0.001t − 4096), 0, 1),
intensity = A·B. Only st02 has a
vkSAND material, so on st12/st22
the intensity stays 0 and nothing spawns.
(skyglow 11-13) t counts 30 Hz ticks
since the game started (zeroed
at device setup only), so the storm is a 209 s
wave on the time since boot, 105 s on and 105 s
off: “The sand storm is on a clock that runs
from boot”.
Each tick the storm copies the stage wind,
then rescales it to (strength × intensity +
0.01).
Far papers, per tick: their clock += 1/30;
centre = eye + view forward × 300. An inactive
paper spawns when intensity ≥ 0.15 and this
tick’s spawns ≤ int(intensity × 6): life 5 + 10r
(r = rand15/32767, unused by the draw), phase =
the clock, position = centre − 300·u, velocity =
u’·(2 + r), turn = u’’·(0.01 + 0.02r), variant =
rand bit, age 0, where u, u’, u’’ are the wind
direction tilted by a random angle around itself
(0..360°) and by ±45°, ±15°, 50..90°
respectively (the engine’s angles: 32768 per
turn). The init gives each paper a first wait of
10r s, counted down at 1/30 per tick once
spawned. Update (not waiting): gone when farther
than 375 from the centre; else age += 1, phase
+= 1, velocity = normalize(v + turn) × |v|, v.y
clamped to ≥ −0.1, position += v · (1 + 0.5 sin
phase°), y += 0.4 sin(4·phase°).
Draw: a camera-facing sprite of sprite set
45 at scale 0.8 (quad ±5), frame = variant ×
(frames/2) + age mod (frames/2), colour = a
global light colour with alpha 1. Sprite id 45
is stage slot 42 (cut-out sheet, 8 × 8): “Stage
sprite sets (SP00)” (hurt).
Near papers and the sphere: same section.
The vkSAND surface shader is not
decoded.
Lightning (thunder object, class
pdvkEleThunder by its RTTI
name): not an EF00 entry. The stage
setup creates it for stage % 10 == 2 with stage
/ 10 == 1 (st12) and for stage
% 10 == 6 with stage / 10 == 0
(st06); no other stage. It
installs a per-tick weather hook that runs a
step machine over a table of 4 patterns × 10
steps of {i32 mode, f32 from, f32 to, i32
ticks}; it starts on pattern 0, step 0.
Loading a step: mode 1 plays a random
thunder sound (one of three, rand15 × 3 >>
15, +3 on stage type 2); modes 2 and 3 set the
step’s length to ticks × from (the exe also
draws a random number but scales it by zero).
Then, in the same tick and on every later one:
length −1, progress = length / the table’s
ticks; while the length is > 0 the step
holds, else the next step loads in the same tick
(after mode 3: step 0 of pattern rand15 × 4
>> 15).
Patterns: (0) wait 90; (1) flash 1 → 0 over
20, nothing, wait 105; (2) flash 0.8 → 0.5 over
8, flash 1 → 0 over 22, nothing, wait 105; (3)
flash 0.8 → 0.5 over 8, 1 → 0 over 10, 1 → 0
over 27, nothing, wait 180.
Flash (only stage type 2, so st06 only
thunders): amount = to + (from − to) ×
min(progress, 1) (0 when progress < 0). For
each of the four light sets (weights 1, 1, 1, 1)
the colours move toward ARGB 0xFFDCDCFF with the
exe’s integer lerp (k = int(t × 256), per
channel c + ((target − c) · k >> 8)): the
light colour and point light 0’s colour by the
amount, the sky and ground colours by 0.5 × the
amount (set 2: only sky and ground, by the
amount). The original colours are restored on
every tick without a flash (a saved copy of the
sets).
Point light 0 is black in st12’s set 0 but
has a position and a range of 2552.75 units, so
the flash also lights the stage from that point
(see “Point lights” in “Stage shaders”).
Played by PdStageFx (set 0, our
generator for rand15; the sounds are not
played).
Export:stagefx.py stNN.dat stNN.alr <out> --pdconv <pdconv>
writes stagefx.json (drip lines +
drop texture file) and that
tex_NNN.png (no mesh uses it, so
the stage conversion never writes it; without
the texture the streaks draw as plain white
bars). Godot: PdStageFx
(main.gd attaches it after the
props; --no-stagefx turns it
off).