graphics.dat: name creature animation commands #467

Closed
opened 2026-10-31 22:40:22 +01:00 by jqueuniet · 2 comments
Owner

sequences(0x0f, type) gives each animation's commands as numbers (type 2: 1/2 3/4 6/7 9 17 19 39/40/65535). A browser can only label them by number; names (walk, attack, hurt, …) from the engine's command dispatch would let it show e.g. "Attack" instead of 17.

`sequences(0x0f, type)` gives each animation's `commands` as numbers (type 2: `1/2 3/4 6/7 9 17 19 39/40/65535`). A browser can only label them by number; names (walk, attack, hurt, …) from the engine's command dispatch would let it show e.g. "Attack" instead of `17`.
Author
Owner

Source: the engine's creature commands (ccm enum, [SKPROJECT] SKWINSPX/src/v0/dme.h; debug names in v4/skcore.cpp getCreatureCommandName). A reimplementation: about half its names are marked ?.

Note: commands are decimal in the JSON. Type 2's 17 is 0x11 spawn, 39/40 are 0x27/0x28 cast spell.

Usage across the 76 DOS EN creature types:

Command Name Types Confidence
0x00 stand 43 clear
0x05 jump 2 clear
0x08 melee attack 30 clear
0x0a steal 6 clear
0x0e/0x0f throw 7 clear
0x11 spawn 62 clear
0x13 death 46 clear
0x17/0x18 place / take merchandise 4 / 6 clear
0x26 push back 5 clear
0x27/0x28 cast spell 13 clear
0x3b transform 7 clear
0x01–0x04, 0x06, 0x07, 0x09 walk / turn variants 39–44 guessed
0x0b, 0x10 other attacks 30 / 28 guessed
0x1b–0x20 merchant states 3–6 (types 34, 67, 68) guessed
0x23–0x25 sleep / wake 2 guessed
0x29–0x2e take / put 5–6 guessed
0x2f–0x31 wall switch 3–6 guessed
0x35–0x3a up / down 10 guessed
0x3d explode 4 guessed
0x0c, 0x0d, 0x15, 0x16, 0x42, 0x52, 0x55 — 1–15 unnamed

The commands that group the same creatures back the clear names: cast spell and 0x35–0x3a share the caster types, merchandise and the merchant states only appear on 34, 67 and 68.

PR #469 adds names next to commands in sequences(), set for the clear rows only, null otherwise. Left open for the walk / turn family, the one a browser most needs: naming it needs tracing DM2_PROCEED_CCM and the movement code, then an in-game check.

https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7

Source: the engine's creature commands (`ccm` enum, `[SKPROJECT] SKWINSPX/src/v0/dme.h`; debug names in `v4/skcore.cpp` `getCreatureCommandName`). A reimplementation: about half its names are marked `?`. Note: commands are decimal in the JSON. Type 2's `17` is `0x11` spawn, `39/40` are `0x27`/`0x28` cast spell. Usage across the 76 DOS EN creature types: | Command | Name | Types | Confidence | | --- | --- | --- | --- | | `0x00` | stand | 43 | clear | | `0x05` | jump | 2 | clear | | `0x08` | melee attack | 30 | clear | | `0x0a` | steal | 6 | clear | | `0x0e`/`0x0f` | throw | 7 | clear | | `0x11` | spawn | 62 | clear | | `0x13` | death | 46 | clear | | `0x17`/`0x18` | place / take merchandise | 4 / 6 | clear | | `0x26` | push back | 5 | clear | | `0x27`/`0x28` | cast spell | 13 | clear | | `0x3b` | transform | 7 | clear | | `0x01`–`0x04`, `0x06`, `0x07`, `0x09` | walk / turn variants | 39–44 | guessed | | `0x0b`, `0x10` | other attacks | 30 / 28 | guessed | | `0x1b`–`0x20` | merchant states | 3–6 (types 34, 67, 68) | guessed | | `0x23`–`0x25` | sleep / wake | 2 | guessed | | `0x29`–`0x2e` | take / put | 5–6 | guessed | | `0x2f`–`0x31` | wall switch | 3–6 | guessed | | `0x35`–`0x3a` | up / down | 10 | guessed | | `0x3d` | explode | 4 | guessed | | `0x0c`, `0x0d`, `0x15`, `0x16`, `0x42`, `0x52`, `0x55` | — | 1–15 | unnamed | The commands that group the same creatures back the clear names: cast spell and `0x35`–`0x3a` share the caster types, merchandise and the merchant states only appear on 34, 67 and 68. PR #469 adds `names` next to `commands` in `sequences()`, set for the clear rows only, `null` otherwise. Left open for the walk / turn family, the one a browser most needs: naming it needs tracing `DM2_PROCEED_CCM` and the movement code, then an in-game check. https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
Author
Owner

Resolved in v0.8.0: creature_command_name names every command whose engine use is clear (stand, jump, melee_attack, steal, throw, spawn, death, …) and is surfaced as names in the sequences JSON. The full command table, with the walk/turn family documented as guesses, is in docs/formats/graphics-dat.md § "Animation". Closing.

Resolved in v0.8.0: `creature_command_name` names every command whose engine use is clear (stand, jump, melee_attack, steal, throw, spawn, death, …) and is surfaced as `names` in the sequences JSON. The full command table, with the walk/turn family documented as guesses, is in docs/formats/graphics-dat.md § "Animation". Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools#467
No description provided.