feat(editor): add WACR JSON round-trip (--export/--import-wacr-json)

Closes the editing loop on the achievement-criteria catalog: dump
a .wacr to JSON, hand-edit criteriaType / targetId / requiredCount
/ timeLimitMs / progressOrder (e.g. retune a kill-count from 50
boars to 25, swap a quest progression target, add a time limit to
turn a normal achievement into a speedrun, reorder progressOrder
so the easiest sub-objective shows first in the UI), re-import to
a byte-identical binary.

The exporter emits both criteriaType (int 0..12) and the human-
readable criteriaTypeName ("kill-creature" / "reach-level" /
"complete-quest" / "earn-gold" / "gain-honor" / "earn-reputation"
/ "explore-zone" / "loot-item" / "use-item" / "cast-spell" /
"pvp-kill" / "dungeon-run" / "misc"); the importer accepts either
form. The 13-way enum is the largest single-field dual-encoding
implemented so far in any catalog round-trip.

Verified byte-identical round-trip on all three presets
(kill / quest / mixed). CLI flag count 986 -> 988.
This commit is contained in:
Kelsi 2026-05-09 22:45:02 -07:00
parent 94e145541a
commit 6b2bfb0f5a
3 changed files with 169 additions and 0 deletions

View file

@ -249,6 +249,7 @@ const char* const kArgRequired[] = {
"--export-wspr-json", "--import-wspr-json",
"--gen-acr", "--gen-acr-quest", "--gen-acr-mixed",
"--info-wacr", "--validate-wacr",
"--export-wacr-json", "--import-wacr-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",