Capsules (skill / aura pickups)
Decoded from the Store build 1.3.25854.2
executable (addresses are its virtual addresses,
image base 0x140000000) and
Assets/Data/Map/st00.alr, the
“system” stage that no arena uses directly. Read
with Esper-RE’s ALR layout (models, materials,
elements) plus our vertex-format notes below.
converter/capsuleconv.py exports
them (below).
Meshes. st00 models 4–12 are
the capsules: each a sphere of radius 4.5 units
(0.45 m) plus one or two shells (thin bands just
at the sphere’s silhouette, r ≈ 4.4–4.8, the
bright rim). Model 1 is a 20×20-unit quad with
shader vkcolanim (the glow quad).
The capsule shader names (vkCAP*,
encoded as in every material) occur only in
st00.
Orientation and size (branch
effectfix). Each mesh hangs on a joint of the
model’s skeleton chunk (0x3; joint = 0x40 bytes:
pos, Euler rot, scale, then u16 flags at +0x24,
u16 track at +0x26, s16 parent at +0x2A). The
skeleton handler (0x140296190, chunk type 3 of
the model draw table 0x140410608) builds each
joint’s matrix from the parent’s and, for
flag 0x200, replaces its
rotation with the camera’s (the transposed view
rotation at 0x1405a5ca0, unscaled): a billboard.
In st00 the rims/shells of every capsule and the
cores of models 4, 11 and 12 carry 0x200 (flags
0x204); the cores of models 5–10 and the sphere
shell of model 9 carry only 0x4, so they are
not camera-facing. Their world
matrix is the capsule object’s +0x90 matrix:
identity at the reset (0x14021b3d0), then turned
about Y (0x1402906e0, angle units 0x8000 per
turn) by slot × 90°; the draw (0x14021b840) only
writes its translation (the slot position).
There is no scale on the way:
the reset matrix has none, every capsule joint’s
bind transform is identity (pos 0, rot 0, scale
1), and st00 holds no animation chunks (0x5), so
nothing animates the joints (the draw also
samples its animation at time 0). The capsule is
drawn at its mesh size: core radius 4.5 units.
capsuleconv writes the flag per layer as
"billboard".
Near-camera fade
(0x140196c40, called by the draw with the
object’s +0x78 and the slot position). Per
viewing player an alpha byte at +0x78 + viewer·4
(reset 255) and a threshold at +0x80 = 100.0,
compared with the squared
distance from the camera position (0x14058bdf0,
written by the camera code at 0x14012c144) to
the capsule: within 10 units the alpha drops by
16 per call, otherwise it rises by 16, clamped
to 0..255. Camera state 0x1404bc950 == 0 forces
255. At 0 the capsule is not drawn; at 255 it is
drawn plainly; in between the draw sets the item
flags 0xed000021 | alpha << 8
(blend bit 0 and stipple bit 5 both set, so the
blend-colour override of the bind is
skipped).
Stipple (the vkCAP* and
stage pixel shaders’ StippleBuffer,
32 u32). The pixel shader discards pixel (x, y)
unless bit (x & 31) of u32 (y & 31) is
set. The bind (0x1402a5f60) enables it (render
state 0x53) for items with flags & 0x21 ==
0x21 and uploads 32 u32 from the table at
0x14057f420: level = (flags >> 11) &
31 = alpha >> 3, u32 index level·96 + a
row offset. The table is built once at device
setup (0x140292780): three blocks of 32 rows per
level; for each block, levels 31 down to 0,
start with all 1024 bits set, then while more
than level² bits are set, clear the n-th set bit
(in bit order), n = (rand() · bits left)
>> 15. Each frame (0x140292d10) the row
offset becomes (offset + 20 + (rand() · 31
>> 15)) & 63. rand() is the shared C
runtime generator (see Deck), so the exact bit
positions depend on its state at boot; the
counts (level² of 1024 pixels) are fixed.
Which model. The capsule object (vtable 0x14048cae8, draw method 0x14021b840) picks an entry of the system model table at 0x140530390 (16-byte entries {model, animation}; the loader 0x1401d9510 clears 24 + 120 of them; INFERRED that it is filled from st00 in file order, the counts match, the fill loop at 0x1401d9254 wasn’t traced):
- capsule owner == the viewing player (0x140530060): model 4 + type, the skill record’s type word +0x0E (0 aura, 1 attack, 2 defense, 3 erase, 4 status, 5 special, 6 environment), so 7 own looks, one per type;
- anyone else’s capsule: model 11 for an aura capsule, model 12 for any skill (one look, whatever the type).
A child object at +0xd0 (vtable 0x14048cb20, draw 0x14021ba60) draws model 1 while the capsule is up (states 1/2) and model 0 while it waits, in the type color from the u32 table at 0x1402dca00 (one per type, RGB only, the high byte replaced by the owner == viewer flag). The HUD’s capsule icons (0x140151bfa) map the type through a second table at 0x1402f1278.
Slots. Per player 3 capsule slots of 0x48 bytes at 0x140584f80 + 0xd08 + (player·3 + k)·0x48: +0 player, +4 slot, +8 position f32[3], +0x14 state, +0x18 timer, +0x1c refill time (420 ticks), +0x20 skill id, +0x40 render object. Create 0x14021b270, reset 0x14021b3d0 (initial spin = slot × 90°), events 0x14021b4f0.
Placement (the rebuild:
player.gd _orb_spot,
points from layout.json
spawn_sets[].players[].points). At
battle start (0x14014ee70 / 0x14014f0f3, also
0x140148cb3) capsule k of a player sits at the
player’s start record (CP00, 0x50 bytes) +0x14 +
k·0xC, i.e. the three extra points of “Start
positions”: ahead of the start along its facing,
~50 units apart, at start height. The start
record index is (player + a per-match offset)
mod the set’s count. The slot keeps that point
unchanged (0x14014f0f3 copies the start record’s
point to slot +8; no floor test), and the refill
dust and the capsule are drawn at it. On st03
the points sit 9.5..12.9 units above the floor
under them (converted collision); the dust’s
rings are centred on their joints (all at the
origin) and reach about 10 units down at full
scale, so the forming sphere rests on the floor.
(The rebuild drew the dust at the floor-snapped
spot, which buried its lower half; it now uses
the point as is.)
Deck, draw and slot states
(branch capspawn; the rebuild:
arsenal.gd,
pd_rand.gd). Deck block at
0x140584f80: per player p a 100-int deck at
+p·0x190 (only the first 30 are used), a second
100-int array at +(p+4)·0x190 set to −1 at
battle start, the draw pointer at +0xC80 + p·4,
a flag at +0xCC0 + p·4 (1 = this player’s deck
is dealt locally), three preset cards at +0xCD0
+ p·12 (filled from network messages when the
flag is 0).
- Build and shuffle (0x14014ee70): for each card c of the arsenal, c is appended as many times as its copy count; then 0x14014f910 shuffles: 50 passes; in each, every position i = 0..29 in order swaps with position j = ((rand() & 0x7FFF) · 30) >> 15 (j may be i). 1500 rand() calls per deck, players in slot order.
- rand(): the C runtime’s, import
randofapi-ms-win-crt-utility-l1-1-0.dll, IAT slot 0x1402d3938 (the DLL’s IAT starts at 0x1402d3930: srand, rand, qsort). The DLL is the system UCRT, not in the package, so the generator itself is the UCRT’s documented LCG (state · 214013 + 2531011, result bits 16–30); INFERRED from the import, not from bytes. srand is called twice, both at start-up, both from the clock: 0x14028af0a with GetSystemTimeAsFileTime / 10⁷ (seconds, low 16 bits) and 0x140291fab with GetTickCount64 (sysinfo IAT 0x1402d35d0: GetSystemTime, GetSystemTimeAsFileTime, GetTickCount64). No per-match seed: one global generator also used by effects (467 call sites), so the original keeps peers in step by messages, not seeds. - Battle start (0x14014f0f3…): slot k of p gets deck[pointer] (pointer += 1, up to 30): state 2 (up) with the card, or state 3 (empty) when the card is −1; refill field = 420. A player whose deck isn’t dealt here takes its three cards from the presets instead.
- Slot tick (0x14014ed10, called from 0x14014f330 for every slot not in state 3): state 0 counts its timer down, then state 1 with timer 15 (and a sound), state 1 counts down, then state 2.
- Take (0x14014fd10(p, k, mode)): only when the deck pointer < 30 and slot +0x30 is 0: plays the take effect (mode 0) or the move effect (mode 1); the slot’s next card is drawn now (deck[pointer++]), state 0, timer = 420 + the owner’s status 0x22 value (0x14024d4d0); then a network message (0x14014fb30). When the deck is used up, a slot that is up goes to state 3 for good (with the effect). The two “take into a button” paths (0x140134460, 0x140139de0) pass the taking character’s own player index (+0x44), so only the owner takes its capsules; the other callers (0x140251c43, 0x14026324b) are skill effects, not traced.
- Move (stage condition): when the global at 0x1403e0304 ends in 1 (value % 10 == 1; written with 0x1404c01d8 during stage set-up, one writer picks it as 2 + rand()·6 >> 15, so INFERRED the stage number) and the flag 0x140530287 is 0, a take moves the slot to 0x14012a650(p, k) (the CP00 point k of start record (p mod 4) mod count), and every tick a slot that is up and below the level at 0x1405315f4 is taken in move mode (a rising hazard). This replaces the earlier reading “every 10th refill”.
- Swap a capsule’s card (0x14014fa20(p, k, card), from a skill effect at 0x14027002c): card −1 = swap the slot’s card with a random undrawn one (pointer + below(30 − pointer)). 0x14014f9a0 picks a random slot that is up (used at 0x140270344).
- Network (0x14014fb30 send / 0x14014fbe0 receive, game modes 4–5): {player, slot, card (u16, 0xFFFF = none), timer (u16, 0 = up now), move flag}; the receiver sets the slot (state 0 with the timer, 2, or 3) or, before its deck is dealt, the preset card.
- Height: the draw method (0x14021b840) puts the model at the slot position as is (no offset or bob in code); the model entry’s animation (+8 of the system model table) plays on it. Whether that animation lifts or bobs the capsule is not decoded.
- Reach origin: the card test (0x14014f630) walks the player’s three slots (stride 0x48) and measures from the slot’s +8 point (the start-record point) lowered 9 units, for slots in state 2 only. The two take paths (0x140134460, 0x140139de0) are reached from script-command handlers that pass the slot index in; they check the state but measure no distance, so the take’s reach lives in the calling script (not traced).
Refill: the capsule forming out of
dust (branch capsuleform; the rebuild:
converter/capsuleformconv.py,
godot/scripts/combat/capsule_form.gd,
arsenal.gd). Not an
.eft effect: a system model with a
joint animation, drawn by the slot’s child
object.
- System model table (0x140530390,
16-byte {model, animation}): the loader
(0x1401d9210) fills entries in order from
Map\st00— models fromst00.alr, animations fromst00.dat— under the build names birth, birth2, death, break (entries 0–3), then the capsule looks.st00.dat: “ST00”, u32 at +4 = offset of the record list (+0x28 in the file); after one u32, records of [i32 size][a run of 0x5 chunks]; animation k = record k. - Slot states (0x14014ed10, 30 Hz): state 0 counts the timer (420 + the owner’s capsule delay) down; at 0 it becomes state 1 with timer 15 and plays system sound bank 0, cue 0x55 at the slot (0x140276330 → 0x140240a00); state 1 counts down to state 2. The capsule body (0x14021b840) is drawn in states 1 and 2; the “take into a button” paths (0x140134460, 0x140139de0) take only a slot in state 2. So a taken capsule is back (drawn) 420 ticks later and takeable 435 ticks later. A take plays entry 2 (or entry 3 and cue 0x5c for the move mode) as a one-shot instance at the slot with a random turn (0x14021b4f0 events 3/4, 0x14022e7d0); not reproduced yet.
- The child object (update
0x14021ba20, draw 0x14021ba60): in state 0 it
draws entry 0 in white at animation frame
(refill field − timer) × 420 / refill field
(refill field +0x1C, 420), held at the animation
length − 0.001; in states 1–2 entry 1 (the
vkcolanimglow quad, 59-frame scale animation) in the type colour at a frame counter reset on entering state 1. Its matrix is turned by slot × 90° like the capsule. - Entry 0 (st00 model 0): six
point-list elements (vertex format 0x18:
position, UV) with shader
vkpsprite: three rings of 78 points (joints scaled ≈ 4.5–6 × 1.4–1.9 and spun about Y, shrinking over the last ~70 frames) and three sets of 15–18 loose points 15–25 units out (shrinking from frame 160). The 429-frame animation (record 0) has scale keys (f32 frame + xyz, 16 B) and rotation keys of 8 bytes: u16 frame + 3 × s16 in 1/32768 turns (a key size the character animations don’t use); both absolute. - Point sprite draw (the vkPSPRITE
shader class, vtable 0x14048dd80): an element is
drawn once the frame reaches
raw_f[2](70, 100, 130, 350, 355, 360); VS constant c32.x = size =raw_f[0]× 10 × a render scale × (in game mode 6, split screen) the viewport width / 640; c33.x = age = (frame −raw_f[2]) / (raw_f[1]−raw_f[2]). The vertex shader pushes each corner out by size × (1/853, 1/480) in clip space before the divide (the sprite shrinks with distance); the pixel shader multiplies texture 0 at (UV + (age, 0)) — a colour ramp per row, black → orange → white — by texture 3 at the corner UV (a round dot) and the model colour, added one/one (material blend word 0x1100). - Point size scale (branch dustfix):
the render scale (float 0x14057f418) is set once
at start-up from the int at +8 of the display
record the global 0x1405b1840 points to; that
pointer has one writer, which points it at the
first record of a constant table in .rdata (640
× 480, scale 1), and an earlier init also stores
1.0. So the scale is 1. The
mode-6 factor’s int (0x14057f39c) is the screen
width 640 (its only writer, 0x14054c9fc = 640 /
0x14054ca00 = 480), halved per view when the
split flag is set: 1 or 0.5; versus is not mode
6. On a 853 × 480 screen a dot is therefore
raw_f[0]× 10 / (2 w) pixels each side, w = the point’s depth in game units (1000 / (2 × 50) = 10 px at 50 units for the capsule dust’s size 100). An engine working in metres divides by a w ten times smaller, so the push must be scaled by 0.1 for the same size (the dust was ten times too big).
Shaders
(vkCAP*_ps.cso, disassembled like
the stage shaders; t = texture slot, vc = vertex
color):
vkCAP02: t0 lit by the directional + hemisphere light, bumped by two scrolling normal maps t1, t2, plus a (N·H)^8 highlight; uses vc.a. All three at TEXCOORD0 (its vertex shader has no TEXCOORD1 input).vkCAP02M2: the same, but its vertex shader feeds t1 and t2 from TEXCOORD1 (input v6, the format 0x1D vertex’s UV at byte 32); t0 stays at TEXCOORD0.vkCAPM2AM2/vkCAPM2MM2likewise sample t1 at TEXCOORD1.vkCAP01: t0·vc, then t1 and t2 blended over by their alpha·vc.a, plus t3·vc.vkCAP04M4: t0·t1·(1 − t2.a) + t2·t2.a + t3, all × vc.vkCAPM2A,vkCAPM2AM2: (t0 + t1)·vc·vc.a, alpha 1: additive.vkCAPM2MM2: t0·t1 + vc, alpha 1. Its blend comes from the material (below): the own aura’s shell (model 4) uses inv_src_color/one (adds c·(1 − c)), models 11/12 zero/src_color (a true multiply).
Draw state (material bind
0x1402a6010; material record of the
.alr material chunk): flags u32 at
+0x0C: bit 4 = blend on, bit 9 = depth write,
bit 7 = no cull (else cull back, 0x901), bit 2 =
specular on; blend word u16 at +0x14 (high byte
= src, low = dst factor, D3D numbering); texture
indices u16 at +0x18/+0x1A/+0x1C and
+0x1E = t3; specular bytes
+0x34..+0x37 (B, G, R, power-ish w). Capsule
cores: flags 0x0D (opaque, no depth write,
culled, specular). Shells: flags 0x10011,
one/one. Alpha-kill (PS cb0[23], texture-stage
state 11 in setter 0x140020c40) is only set by
HUD code (0x14011f…), so off for capsules.
Address mode wrap (states 0/1 = 1); the vkCAP
binds set linear filters (states 3/4 = 2).
Textures are sampled raw (no sRGB
conversion).
Depth and draw lists (capsuledepth). When a draw item is queued (0x140295616..0x1402957c7), bit 3 of its material flags picks the list: set (capsule cores, 0x0D) -> the per-shader bucket lists (256 buckets in shader registration order, items in queue order, flushed by 0x140298a90), drawn right after the frame sets depth test + write with LEQUAL (0x1401c7cd4 -> 0x14028e390); clear (the glow and the shells, 0x10011; the vkCAP04M4 core, 0x10001) -> a list kept sorted by a per-item key and drawn after the buckets. The material bind changes the depth state only for blended materials (flags bit 4; then bit 9 set: test + write, else test on, write off via 0x1402066a0), so the cores write depth like the stage and the glow and shells are depth-tested without writing. The material bind of the vkCAP04M4 core (0x10001, bit 4 clear) does not change the depth state; its own per-item draw function is untraced (UNTRACED: it may set depth itself). Each keyed-tree flush (0x140298e40, 0x140298f70, 0x1402990a0) sets depth test + write (mode 3, cached at 0x14054c9f8) once before its walk; the walk loop itself sets no depth state per item (the per-item draw functions it calls are untraced). If they don’t either, vkCAP04M4 writes depth only while no blended item has been drawn earlier in the same tree that frame; after one (a shell or glow, mode 2) it is test-only. Godot draws it test-only always (INFERRED: the usual case, since the key order is not decoded). Result: a near core hides the far capsule’s core, shells and glow; a capsule’s own glow only shows around its silhouette (as in Xbox footage). INFERRED: the queue reads the flag byte through a pointer whose record is not traced, and the sort key is taken as camera distance, far to near.
Core math
(vkCAP02 / vkCAP02M2;
PS c0 = (0, 0, 1/124, 0.5) at 0x1402f8790):
n = 2(t1 − .5) + 2(t2 − .5),
n += (1 − n·n)·n·0.5;
k = S'·n + 0.5 (cS1_COLp.w);
hemi = sat(sat(k)·sky + (1 − k)·ground);
lit = sat(sat(L'·n)·cDL_COL)·va + hemi·va;
spec = sat(va·cSPECULAR·sat(n·H')^8);
out = lit·t0 + spec, alpha c0.z.
The vertex shader builds the tangent-space
light, hemisphere axis and half vector
h = normalize(normalize(eye − p) − L)
as (v·T, v·B, −v·N), packed ×0.5 + 0.5; T, B, N
from the vertex (formats 0x03 / 0x1D: normal
@12, tangent @24, binormal @28, signed
11:11:10). Lights (0x1402a7880, slots filled by
0x1402a7a00 from the globals 0x14057f3d0..e8,
default 0x1405ad9d0): light[1] → c3 cDL_COL;
light[0] → c6/c7 sky / ground (w 0.5); light[2]
→ c5; c2 cSPECULAR = bytes (+0x36, +0x35, +0x34)
× light rgb × 2/255 (0x1402f7c68), w = byte
+0x37 (via 0x1402a75e0). Model 4’s core is a
billboard with its pole toward the camera.
(capsuleview) The eye (VS c15, named
cEYEPOS in the shader’s reflection data) is
written together with c14 by 0x1402a58a0, which
every model draw calls with the joint matrix it
also uses for c20 (e.g. 0x14029c11b): it
multiplies that matrix by the view matrix
(0x1405a5ca0) into P and stores c15 =
(−(t·P_row0), −(t·P_row1), −(t·P_row2), 1) with
t = P’s translation row, i.e. the camera
position in the joint’s own frame (the inverse
of a rigid matrix; exact for the capsules, whose
matrix has no scale), and c14 = P’s third column
with w = the draw’s float argument + a constant
(not used by the vkCAP shaders). For a billboard
joint the matrix is the billboarded one, so the
eye, like the light, is fixed in that frame. The
Godot shader’s eye, the camera origin through
the inverse model-view, is the same point. The
light values are stage light set 0 (see “Stage
light script”, light records), with the vectors
in the game’s order.
Normal maps of the cores (capsulelook-fix2). The two bump textures (t1, t2) are texture format 0x0C, which the exe’s format switch (0x1400bcb27) creates as BC1 (DXT1, DXGI format 71) and uploads as stored: no channel swap, no conversion. pdconv’s DXT1 decode matches the raw blocks texel for texel. The pixel shader reads them as plain RGB, maps each channel with ×2 − 1, adds the two maps and renormalises the sum with one Newton step using c0.w = 0.5 (0x1402f8790, read). It does not rebuild z from x and y, and the sum is not clamped. The maps are not the usual pale-blue ones: in the 64² and 128² maps the texels lie close to the line red + green ≈ 1 and blue is near 0 (a few texels reach about 0.5), so one map decodes to about (s, −s, −1) and the sum’s z is near −2.
Why the cores shade the way they do (capsulelook-fix, corrected in capsulelook-fix2). The vertex shader packs the light as (−L·T, −L·B, L·N), with L the record’s vector (the direction the light travels) and T, B, N the raw model-space vertex vectors. So with the bump n = (a, b, c) the directional term is sat(−L · (a·T + b·B − c·N)): tangent-space z points into the surface, and a map texel with blue ≈ 0 (c ≈ −1) is an outward normal. The unclamped sum has n·n ≥ 4. Wherever n·n > 3 the renormalising factor 1 + (1 − n·n)/2 is negative, so the step turns the normal inward. Over random pairs of texels from the two maps that is about two thirds of the pairs, and the mean directional term for a light straight onto the surface is about 0.14 instead of about 0.55 when the sum is held in [−1, 1]. The hemisphere term k = n·S + 0.5 flips the same way. That gives the dark, patchy cores and their hard lit/unlit patches, with the lit patches often on the side away from the light. The PC shaders do this as decoded. It is not a converter error, and the PC build is drawn this way. The light record’s vectors are uploaded unchanged (0x1402a7490; the record’s +0x20 is a start-up copy of the script’s vector), and the vertex data is in model space (c20 = matrix-stack top × view-projection, 0x1402a57c0), so the light works in the object’s own frame. Two things make the shading move as the camera turns, and neither is a separate fresnel or rim layer. (1) The specular term (n·H)⁸ uses the half vector between the light and the direction to the eye, per vertex: on the cores that are not billboards (models 5–10) it is the only view-dependent part. It is bright where the bumped normal faces between eye and light and falls off towards the silhouette, where the surface turns away from the eye, so the rims look darker and the bright patches slide as the camera moves (red: specular bytes R 159, G 52 on model 5). (2) The billboard cores (models 4, 11, 12) turn with the camera, but the light turns with them (object frame), so their diffuse and hemisphere patches stay put on screen; only the specular term and the scrolling maps move. The vertex alpha multiplies the whole lit colour; on model 4 it falls to about 0.1–0.25 at both poles, so the centre of the camera-facing disc is darker (the dark swirl centre).
UV scroll: c90/c91 = frame counter (0x14057f398, +1.0 per call at 0x1401c77fc in 0x1401c7630, wraps at 4e6) × element floats, + offsets. vkCAP02/02M2 (0x14023c440): raw_f[4..9], c91.zw = 0, no offset. vkCAP04M4 (0x14023d210): raw_f[4..11]. vkCAP01 (0x14023bf80): 8 speeds + offsets. vkCAPM2A and M2MM2/M2AM2 (0x14023cc80): 4 speeds + offsets. Offsets: the floats at element body +0x30..+0x4C, then raw_m[0..3]. The M2A draw (0x14023c760) re-billboards its matrix. INFERRED: the counter steps 30 times a second.
Glow
(vkcolanim, model 1): PS
sat(t0(uv)·t1(u, uv2.y)·c0.rgb),
alpha c0.w = 1/255. Draw 0x140235820: when
raw_f[2] == 1 the colour is [0x140533488]+0x48
and the time [0x14057f41c]; a colour with high
byte 0 (not own) draws white with blend 0x3001
(zero/inv_src_color, darkening).
u = max(0, time − raw_f[1]) / (raw_f[0] − raw_f[1])
(st00: raw_f = 60, 0, 1). The caller
0x14021ba60: states 1/2 → model 1, colour = type
colour | own << 24, time = object +0x90
(reset at state 1, 0x14021ba54, +1 per update,
0x14021ba48); state 0 (refilling) → model 0 with
time (refill − timer)·420/refill. tex_003’s top
row is a flash (0 → 1 by u ≈ 0.15, fading to ~0
at 1). INFERRED: u clamped (t1’s address mode
not confirmed: neither the draw nor the material
bind sets sampler states 0/1), VS c0.x = 0.
(capsulelook-fix) After the material
bind the draw sets the sampler filters itself
(0x1402358e1..0x140235942): stage 0 linear
(states 3/4 = 2, mip state 5 = 1), stage 1 (the
flash texture) point (states 3/4/5 = 1). Culling
is the material bind’s (glow material flags
0x10011, bit 7 clear: back faces culled).
The near-camera fade does not reach the
glow: the capsule draw sets the child’s
draw flag (+0x98 = 1) before its fade test, and
only its own model draw runs with the stipple
item flags, which it clears again at
0x14021b9be; the child draws in its own pass
(0x14021ba60) with no stipple. So the glow stays
when the capsule fades out.
Vertex formats (element format byte; offsets in bytes):
| Format | Size | Layout |
|---|---|---|
| 0x03 | 32 | pos, packed normal@12, uv@16, color@20, tangent@24, binormal@28 |
| 0x1D | 36 | as 0x03 + uv2@32 |
| 0x15 | 24 | pos, uv@12, color@16, uv2@20 |
| 0x17 | 32 | pos, uv@12, color@16, more uvs @20/24/28 |
| 0x09 | 20 | pos, uv@12, color@16 |
Material entries carry the texture at +0x18,
a normal map at +0x1A and a second one at +0x1C
(effectconv exports them as normal,
normal2).
Converter.
capsuleconv.py <st00.alr> <out>/capsule [--exe PDUWP.exe] [--pdconv PATH]
(run on the data machine) writes
capsule.json (format
pd-capsule, version 1:
own type → model,
enemy {aura, skill},
glow, type_colors read
from the executable, and per model its layers:
shader, scroll, mesh arrays, extra UV sets,
texture names) plus the PNGs those layers use
(via pdconv --textures).
godot/scripts/combat/capsule_look.gd
builds the look from it; orb.gd
falls back to its built-in bubble without the
directory.
Before this, the capsule was looked for in
Assets/Data/System/aura.alr (one
32×32 texture, no model),
Assets/Data/Effect/
(eft0600–0609 are the
aura wisps around a character, not the capsule)
and the effect shaders; none of them is the
capsule.