saves: champion accessors use the retail layout on DOS Beta saves #340
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools#340
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Champion field accessors pick offsets from byte order only, so DOS Beta v0.9 champions (little-endian) are read and written with the DOS retail layout. From
BETA_CHAMPION_MASKand the Beta fixtures, the Beta record is retail minus thepoisonu16, with a different ability shape:ability[7][2]at 0x4A +eability[7]at 0x58[7][3]triples at 0x48 (third byte 0x1E = 30 on every fixture)herotypeench_auraEffects:
ability_cur/max,enhanced_ability,herotype,ench_auraread the wrong bytes on Beta, and so do the matchingsave_to_jsonfields (#330).dm2 save champion --set <ability>.cur=…edits a neighbouring field on Beta.set_herotypewrites 0x101, which the Beta mask (0x00) drops: the edit is silently lost.Scope
Championaware of the Beta layout (variant, not just byte order) and route the accessors through it.Blocks #331 (skill matrix accessors share the offset logic).