feat(editor): add WSDR JSON round-trip (--export/--import-wsdr-json)

Closes the editing loop on the spell-duration bucket catalog: dump
a .wsdr to JSON, hand-edit baseDurationMs / perLevelMs / clamp /
durationKind (e.g. retune Renew from 9s to 10s base across every
spell that references the HoT5Tick bucket), re-import to a
byte-identical binary. The exporter emits both durationKind (int
0..4) and the human-readable durationKindName ("instant", "timed",
"tick", "until-cancelled", "until-death"); the importer accepts
either, so JSON sidecars stay readable without losing the
canonical binary encoding.

Verified byte-identical round-trip on all three presets
(starter / buffs / dot). CLI flag count 904 -> 906.
This commit is contained in:
Kelsi 2026-05-09 21:43:16 -07:00
parent 98f899cf7c
commit b8dc28d704
3 changed files with 148 additions and 0 deletions

View file

@ -214,6 +214,7 @@ const char* const kArgRequired[] = {
"--export-wsct-json", "--import-wsct-json",
"--gen-sdr", "--gen-sdr-buffs", "--gen-sdr-dot",
"--info-wsdr", "--validate-wsdr",
"--export-wsdr-json", "--import-wsdr-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",