Battle HUD (Menu/BtMenu<lang>.alr + executable)

Read from the 2017 PC build (PDUWP.exe 1.3.25854.2). Converter: pdconv <alr> <out> --textures for the atlases, converter/hudconv.py <alr> <out> for the sprite table (sprites.json, by index, no names). Godot: godot/scripts/pd_hud.gd.

File. An ALR (version 82) with chunks 0x11, 0x15, 0x16, 0x10 and three DXT textures: 256×512 (panels, ring, capsule icons, status icons, button plates), 512×512 (lock-on reticles, range circles, capsule get/use/erase flash frames), 1024×256 (result and start logos, name plates, clock icon). Chunk 0x10 (10 988 bytes in the English file): +0x08 texture count (3), +0x0C sprite count (180), texture records, then 180 sprite records of 60 bytes filling the chunk’s end: +0x00 i32 texture, +0x04 char[32] name, +0x24 f32 u0 v0 u1 v1, +0x34 i32 width, height (pixels; (u1-u0)·texture width equals the width). The Japanese file has the same layout.

Draw call. 0x1401983e0(ctx, handle, x, y, flags, scale_x*, scale_y*, argb*, …): the battle menu object keeps one handle per sprite at +0x268 → [i·4] (so [rax+0x15c] is sprite 87); handle packs group/sub/sprite in its bytes. flags bit 0 mirrors in x, bit 1 in y; scale pointers stretch width/height (null = 1); argb tints (null = white). The quad’s corners are (x, y) plus the sprite record’s int16 origin, then width/height (0x1402a83c0), so x/y are the top-left corner. Space: the 640×480 design area centred in the port’s fixed 853 : 480 frame (x −106.6 … 746.4 visible), and that frame is fitted into the window with bars when the window is not 853 : 480: see “Screen frame, aspect and the 2-D space” (uifix 11-14; this replaces the earlier text here, which read 0x1402a8aa9 as an ortho set-up and 0x14028a4a9 as the HUD area: the first is the 3-D projection and viewport reset after the 2-D pass, the second a post-process pass’s texture coordinates). The one-view layout uses x < 0 and x > 640 (see below).

Layout tables (.rdata, (x, y) int32 per variant: [0] one view, [1] split left, [2] split right; the variant is [obj+0x2a0] == 0 ? 0 : 1 + view):

Table [0] [1] [2] Drawn by
0x1402f1250 (−59, 57) (−59, 57) (462, 57) status panels 0x140155310
0x1402f14e8 (603, 36) (84, 57) (605, 57) deck box 0x140151840
0x1402f1500 (507, 344) (79, 344) (505, 344) aura ring 0x140151f90
0x1402f11e0 (465, 198) (−39, 210) (446, 210) 0x140155160, 0x140158930 (not followed)
0x1402f12d0 (463, 92) (−39, 92) (446, 92) 0x140158930 (not followed)

Elements (offsets from the table base; sprite numbers are table indices):

Skill card (Menu/WusMn<lang>.alr + executable)

The card the battle HUD shows while a player stands at one of their own capsules (the same card routine draws skills in the menus). Read from the 2017 PC build. Converter: pdconv <alr> <out> --textures and hudconv.py <alr> <out> as for BtMenu (same sprite record layout; the English file has 201 sprites on eight textures); the game reads <data>/wusmenu/. Godot: PdHud._card().

When. Each tick a player’s “standing at” state is rebuilt (0x140251550): another player within 15 units (0x1402516a0, radius 0x1402f7fb0 = 15.0) gives state 2; else the first of the player’s own three capsule slots that is out on the field (slot state 2) and within 15 units gives state 1 with that capsule’s skill id (0x14014f630: the capsule point is lowered by 9 units, 0x1402f7f64, before the distance to the player’s position is taken, so the test is a sphere of 1.5 m around a point 0.9 m below the capsule); else an entry of the list at 0x14058bd30 gives state 3 (not identified), else 0. Other players’ capsules are found by a second scan (0x14014f700, same test) into another field and never give a card. The battle menu (0x140155160) draws the card for states 1, 3 and 4; a held slot button first shows that slot’s card instead. No open/close animation or sound is in this path: the card is drawn on the frames the state is set.

Gates and the held slot (0x140155160, in order; any failing gate draws no card at all):

Where. Layout table 0x1402f11e0, (x, y) per view variant: one view (465, 198), split left (−39, 210), split right (446, 210): the top-left corner in the HUD’s 640×480 space, fixed on screen (it does not follow the player or the capsule).

Layout (card routine 0x140168410, offsets from the corner; sprites are WusMenu table indices; the battle HUD passes no frame flag and style 0, so the window frame and the number strip are skipped. (uifix 11-14 correction: there is no separate “long description”; the description below is the same text in every caller. See “Skill card callers, text lookup and the aura card”.)):

Colours are scaled by the battle menu’s brightness [obj+0x21c] when the flag bits 0x40000, 0x80000 or 0x100000 are set (not played).

Font atlas (System/dbfont.ddx). Layout from the shared notes (“Character table”, “Sources”), checked by decoding our file (wrapped in a DDS header and opened with Pillow): no header, 1,048,576 bytes = a 1024 × 2048 DXT1 surface in plain row-major block order, white glyphs on black, in 16 × 16 pixel cells, 64 per row (123 of the 128 cell rows hold glyphs). Cells 0..255 are a single-byte code page (cell = character code: the space cell is empty, printable ASCII from 0x21); from cell 256 on the two-byte Japanese set follows in its standard row order, 94 cells per row of the set (unused rows skipped). dbfont_ko.ddx is the same shape. Glyphs sit at the left of their cell with different ink widths (a narrow letter covers 2 px, a wide one 11), so the text routine advances by a per-glyph width: the width table, the code-point map and the text routines are in “Bitmap font and text drawing” below (docs 11-10; the card text’s 8×16 setting is the atlas at 1:1 and 7×14 is 7/8 scale).

Not decoded yet: animations (pip/box blending, slot flashes 91–118), other players’ panels in detail, and the per-sprite int16 origin. (Text, the digit strip at y 0x740 and the status icons are decoded: “Bitmap font and text drawing” and “HUD status icons and clock” below, docs 11-10. The card-back quad 0x140151cb0 is (characters − 1 or − 2) · 9 px wide.)