Effect packs and the Xbox / PC effect comparison
Question tested: “the PC port is missing
particle effects the Xbox has, perhaps a whole
subtle layer on every effect”. Answer:
no missing files, elements, element
kinds or shaders; one proven PC-port
loss (the point-sprite layer
mseftbb01s of nine shot effects is
drawn far too small on the PC), and one finding
about our own pipeline (we convert the wrong
effect files). Confidence H unless marked.
Effect
packs (Effect/e.i,
Effect/a0.e ..
a7.e)
Read by converter/effectpack.py
(list, extract;
synthetic test in
tests/test_effectpack.py).
| File | Layout |
|---|---|
e.i |
u16 pack count (8), u16 entry count (496),
then 12-byte entries sorted by effect id: u16
effect id, u16 pack number N, u32 offset in
aN.e, u32 size |
aN.e |
the entries back to back. One entry = the
effect’s ALR (same layout as a loose effect
.alr), zero padding, and the
412-byte slot file (the .eft)
starting 0x800 bytes before the end of the
entry |
Ids in the index: 1–321, 512, 518–521, 600–606, 700, 701, 1001–1024, 71 ids in 2001+, 16 in 3001+, 31 in 4001+, 19 in 5001+.
Load path (PC). Load by id 0x14018cd10 → pack opener 0x14018d0b0 → binary search over the index 0x14018c4e0 (index object pointer at 0x1405bb2e8; entry count u16 at +0x8A, table at +0x8C) → the pack name is built from the pack number, offset and size go to the effect record’s +0x58 / +0x5C, and the slot-file pointer is buffer + size − 0x800. A missing id is not checked. The per-effect file-name templates in the executable are only default names copied into the 0x88-byte effect records (init 0x14018c940, reset 0x14018cfe0); no code path opening a loose effect file was found. The Xbox executable has the same strings and the same pack loader, and the disc has no loose effect files at all.
The loose eftNNNN.alr /
.eft files of the PC build are an
older revision that the game never
opens. Compared per id with the pack
entry (parsed materials, joints, elements, mesh
data): 121 same-numbered effects match, 415
differ, in both directions (effect 4, model 0:
103 elements in the pack, 39 loose). Element
kinds over all effects:
| Kind | Packs (played) | Loose (not played) |
|---|---|---|
| mesh | 22558 | 14719 |
| particle01 / particle02 | 1182 / 406 | 1620 / 342 |
| msparticle00 / msparticle01 | 286 / 977 | 291 / 626 |
| light01 / light02 | 0 / 660 | 8 / 511 |
| flair01 | 102 | 100 |
| tale01 / tale02 | 90 / 1 | 100 / 0 |
| thunder01 | 53 | 0 |
| blade01 / blade02 | 4 / 12 | 6 / 14 |
| msbillbeam00 / ykfade00 | 6 / 2 | 3 / 2 |
Only in the packs: ids 302–321 and all of
3001+ / 4001+. Only loose: 0, 501, 502, 505–511,
513–517, 522–550. Every count of effect elements
elsewhere in this file and in PLACEHOLDERS.md
that was taken with
effectconv.py --stats over the
loose files describes the older revision.
Xbox packs against PC packs
e.iis byte-identical. All 496 entries parse to the same materials, joints, elements and mesh data on both platforms.- The only byte differences are textures: 3,556,057 bytes in 252 entries, plus 314 one-byte header changes. The PC build stores every uncompressed texture row by row instead of in the Xbox’s interleaved (swizzled) order — the texel values are a permutation of the Xbox ones — and marks it by setting bit 0x80 of the texture format byte. Formats in the packs (Xbox codes): 0x0C (DXT1) 2964, 0x28 (signed two-channel bump) 233, 0x0E 120, 0x0F 110, 0x06 37, 0x00 23, 0x05 17, 0x02 4. Compressed textures are untouched.
- This corrects the note under “Xbox capsule
shading”: the
.edifferences are the texture re-ordering, not re-laid-out blocks.
Effect code, Xbox against PC
- Element functions: the Xbox table at 0x2bb1ac (12-byte entries: name, object, 0) lists 21 functions (aura, two blades, filter, flair, two lights, particle01/02, two trails, thunder, a billboard beam, three “ms” particles, a fade, two “yk” particles, sound, trash). The PC build has all 21 as classes, plus a few of its own helpers. Nothing dropped.
- Shaders: every effect
shader of the Xbox table exists as a PC
.cso, except two (PDEFTRRF,PDEFTRRFT) that have PC classes but no shader file; no material of any effect on either platform uses them. Not a loss. - Billboard shader
pdeftbb01: Xbox = two combiner stages, texture × vertex colour for colour and alpha, colour pre-multiplied by alpha in the vertex program. Same as the PC shader documented under “Effect drawing”. - Heat haze (
pdeftopt05,05c,05n: 325 effects, 1719 meshes): the Xbox samples a signed two-channel texture (format 0x28) and offsets a frame-copy lookup with it. The PC texture loader (format switch at 0x1400bcb27) turns format 0x28 into a four-channel texture: each 16-bit texel has both sign bits flipped (signed → biased) and is written to both halves, and the PC pixel shader undoes the bias (2v − 1). Same picture. Not a loss. Open (L): 510 haze meshes use a first texture that is not format 0x28 (DXT1 468, others 59); how the Xbox hardware reads those as signed was not checked. - Point sprites. The Xbox
draws points whose size in pixels is written by
the vertex program. Every Xbox point program
multiplies its size by 1/w (w = view depth)
itself. The PC shaders replace the point by a
quad: the size is passed on without the
1/w and the four corners are pushed by size ×
(1/853, 1/480) × corner before
the perspective divide, which gives the same
1/w. Checked for the particle01 program, the
capsule sprite programs and the four other
sprite programs: equal on screen. One
program was translated wrongly:
mseftbb01s, next section.
Point-sprite
meshes: shader mseftbb01s — proven
PC-port loss
A “mesh” element whose material shader is
mseftbb01s is not drawn as a mesh.
Its vertex data is a dummy quad (4 vertices, 6
indices); the element is one point
sprite, batched with all others of the
frame.
Where: 1407 elements in nine effects, the effects of skill records 42, 45, 50, 51, 53, 54, 55, 56 and 58 (all straight / multishot / ricochet shots of one school): 240 elements each in 42, 50, 58; 150 in 51; 134 in 45; 126 in 55; 125 in 56; 76 each in 53, 54. Blend pairs: dst color / one 870, src alpha / one 251, one / one 152, src color / one 134. No other effect uses the shader; the loose revision of these nine has it too.
Draw (identical on both platforms). PC class vtable 0x14047a4c0: begin 0x140115c20 (point-sprite states on), append 0x140115ca0, end / flush 0x140115c40 (one point-list draw, 20-byte vertices, batch object at 0x1405bb218: buffer +0x48, capacity +0x50, count +0x54). Xbox: begin 0x7fc40, append 0x7fd00, end 0x7fda0, batch object 0x3ec5f4. Per element one vertex:
Field Value position (3 floats) the element’s world position: its matrix × ( raw_f[4..6]× linear time) + the matrix translation (M)size (signed 16-bit, normalised) min(32767, 65534 × L²), L = length of the first column of the element’s matrix (its joint-chain X scale); the shader sees s = min(1, 2 L²) colour start + (end − start) × weight per channel, curve raw_f[10]; the blink colours on odd frames whenraw_m[14]≠ 0;raw_m[15]> 0 = fade-in / fade-out envelope as for light02 (6 elements) (M)Shader constant 32 = (10000, 10000, 10000, 10000) on both platforms; texture in stage 3, texture × vertex colour.
Xbox size: point size = 10000 × s / (2 w) = 5000 × s / w pixels at 640 × 480 (w in game units, 10 per metre). The console limits a point to 64 pixels (M: hardware limit from general knowledge, not read from the game).
PC size: the PC vertex shader kept the division (this one program divided by w + w instead of using the ready-made 1/w, so the translation rule missed it) and then pushes the corners before the perspective divide like all the others. Result: height on a 480-line screen = 5000 × s / w², i.e. the Xbox size divided once more by the depth.
Effect: joint X scales in these effects are 0.25–1.0 (median 0.47 → s = 0.44):
Depth w Xbox (480 lines) PC (480 lines) 30 (3 m) 64 px (limit) 2.4 px 60 (6 m) 37 px 0.6 px 120 (12 m) 18 px 0.15 px On the PC the sprites are below one pixel at play distances: this glow / spark layer is in effect missing. That fits the report of a “missing subtle layer”, but only for these nine effects.
Footage
No recording in the reference library shows any of the nine skills on either platform (the library has one fire shot only), so the on-screen result was not compared. Capture request, to locate only: skill records 42 and 53 (one multishot, one straight shot), Palace, cast at a dummy 5–10 m away with the camera behind the caster, 10 s each, once in xemu and once in the PC build; then one cast seen from the side at about 3 m. Expected: soft additive dots along the shot in xemu, none (or single-pixel dots) on the PC.
Not compared in this run
The draws of msparticle00 / 01 (1263 elements), thunder01, tale02, flair01, the blades and the full-screen filter; point-size limits and the other render states the PC’s layer over the Xbox draw calls may map differently; the per-frame behaviour of the frame copy used by the haze. The element data and the update code names are equal; a difference could only be in a draw translation like the one above.
Implementation notes for the rebuild
- Convert effects from the
packs (built effects1:
effectconv.py --pack <Effect dir> all <out root> [--pdconv <bin>]writeseftNNNN/effect.json+ textures per pack id, reading the slot file through structs).effectpack.py extract <Effect dir> <id> <out>gives the.alr/.eftpaireffectconv.pyandpdconv --texturesalready read; the PC packs hold row-ordered textures (format byte bit 0x80), so no un-swizzle is needed when the PC copy is the source. Convert all 496 ids; stop using the loose files. Expect new element kinds in the output (thunder01, tale02) and different element counts in most effects; re-runeffectconv.py --statson extracted packs before trusting any count. - Draw
mseftbb01selements as point sprites, not as meshes: one camera-facing square per element at the element’s world position, textured with the material’s texture × the element colour, the material’s blend; no mesh, no rotation. - Size (Xbox look, the target): height in pixels on a 480-line screen = 5000 × s / w, s = min(1, 2 L²), L = the element matrix’s X-axis length, w = view depth in game units; scale by screen height / 480. That is a world-space square of side 5000 × s / 480 × 2 tan(vertical fov / 2) game units at any depth — a constant world size, so a plain billboard quad of that side does it. Limit to 64 px × (screen height / 480) for the console look.
- PC look (if ever wanted for comparison): divide the size once more by w.
- Fixes the statements in “Skill effects” (the
loader does not open loose files) and “Xbox
capsule shading” (what differs in the
.efiles).