saves: decode and edit champion experience (skill matrix) #331

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

Decode and edit champion experience, so tools can show and change skill levels.

Scope

  • Accessors / setters on Champion for the skill[5][4] matrix (0x5F–0xAE, 22 encoded bits per value per the mask notes in hero.rs).
  • A helper deriving the level the engine displays from those values. Formula to ground-truth against [SKPROJECT] before landing; document it in docs/formats/saves.md.
  • Matching ChampionJson fields, re-applied on deserialize; setters reject values the mask cannot encode.
  • sbonus stays read-only (literal, not persisted).

Acceptance

  • Round-trip byte-exact on all save fixtures.
  • Derived levels match in-game displayed levels for at least one DOS and one Mac fixture.
  • Setting a value outside the 22-bit encodable range is an error, not a silent truncation.

Needed by the web editor's experience/levels form.

Decode and edit champion experience, so tools can show and change skill levels. ## Scope - Accessors / setters on `Champion` for the `skill[5][4]` matrix (0x5F–0xAE, 22 encoded bits per value per the mask notes in `hero.rs`). - A helper deriving the level the engine displays from those values. Formula to ground-truth against `[SKPROJECT]` before landing; document it in `docs/formats/saves.md`. - Matching `ChampionJson` fields, re-applied on deserialize; setters reject values the mask cannot encode. - `sbonus` stays read-only (literal, not persisted). ## Acceptance - Round-trip byte-exact on all save fixtures. - Derived levels match in-game displayed levels for at least one DOS and one Mac fixture. - Setting a value outside the 22-bit encodable range is an error, not a silent truncation. Needed by the web editor's experience/levels 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#331
No description provided.