feat(editor): add WSCS JSON round-trip (--export/--import-wscs-json)

Closes the editing loop on the skill-cost catalog: dump a .wscs
to JSON, hand-edit costKind / skill ranges / requiredLevel /
copperCost (e.g. retune Apprentice profession from 1s to 5s for
a faster server, raise Cold Weather Flying from lvl 77 to 75,
add a custom WeaponSkill tier above Master), re-import to a
byte-identical binary.

The exporter emits both costKind (int 0..4) and the human-
readable costKindName ("profession" / "weapon" / "riding" /
"class-skill" / "misc"); the importer accepts either form.

Verified byte-identical round-trip on all three presets
(prof / weapon / riding). CLI flag count 1015 -> 1017.
This commit is contained in:
Kelsi 2026-05-09 23:05:23 -07:00
parent b10bc2be5d
commit 7d7e1d73dc
3 changed files with 152 additions and 0 deletions

View file

@ -1947,6 +1947,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WSCS entries (id / rank / kind / minSkill / maxSkill / required level / gold cost / name)\n");
std::printf(" --validate-wscs <wscs-base> [--json]\n");
std::printf(" Static checks: id+name required, costKind 0..4, no duplicate ids, min<max; warns on lvl>80, RidingSkill below lvl 20, Profession with cost=0\n");
std::printf(" --export-wscs-json <wscs-base> [out.json]\n");
std::printf(" Export binary .wscs to a human-editable JSON sidecar (defaults to <base>.wscs.json)\n");
std::printf(" --import-wscs-json <json-path> [out-base]\n");
std::printf(" Import a .wscs.json sidecar back into binary .wscs (accepts costKind int OR costKindName string)\n");
std::printf(" --gen-weather-temperate <wow-base> [zoneName]\n");
std::printf(" Emit .wow weather schedule: clear-dominant + occasional rain + fog (forest / grassland)\n");
std::printf(" --gen-weather-arctic <wow-base> [zoneName]\n");