saves: expose abilities, hero type and aura in save JSON #330

Open
opened 2026-10-24 09:45:51 +02:00 by jqueuniet · 0 comments
Owner

Expose the champion fields the library already decodes but the save JSON (and so the WASM package) does not.

Scope

  • Add to ChampionJson: the 7 abilities (luck, strength, dexterity, wizardry, vitality, antimagic, antifire) as cur / max / enhanced, herotype, ench_aura.
  • Re-apply them through the existing setters on deserialize, like the HP/stamina/MP fields.
  • Bump schema_version if the shape change requires it.

Out of scope: skills/experience (separate issue), inventory.

Acceptance

  • Unedited dump round-trips byte-exact on every save fixture (DOS, Mac, DOS Beta).
  • Editing one ability via JSON changes only that field after rebuild; checked against dm2 save champion --set.
  • saveToJson from dm2-wasm carries the new fields.

Needed by the web editor's stats form.

Expose the champion fields the library already decodes but the save JSON (and so the WASM package) does not. ## Scope - Add to `ChampionJson`: the 7 abilities (`luck`, `strength`, `dexterity`, `wizardry`, `vitality`, `antimagic`, `antifire`) as cur / max / enhanced, `herotype`, `ench_aura`. - Re-apply them through the existing setters on deserialize, like the HP/stamina/MP fields. - Bump `schema_version` if the shape change requires it. Out of scope: skills/experience (separate issue), inventory. ## Acceptance - Unedited dump round-trips byte-exact on every save fixture (DOS, Mac, DOS Beta). - Editing one ability via JSON changes only that field after rebuild; checked against `dm2 save champion --set`. - `saveToJson` from `dm2-wasm` carries the new fields. Needed by the web editor's stats form.
jqueuniet added this to the dm2-tools project 2026-10-24 09:49:02 +02:00
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#330
No description provided.