feat(editor): add WPCN JSON round-trip (export/import sidecar)

Closes the JSON round-trip gap on the player condition catalog
format shipped this batch. --export-wpcn-json emits all 11
scalar fields plus dual int + name forms for conditionKind /
comparisonOp / chainOp so hand-edits can use either
representation. --import-wpcn-json accepts either form,
falling back to the int when both are present. Verified
byte-identical round-trip on all three preset emitters
(starter / quest-gates / composite — including chained
conditions referencing other entries by chainNextId). 747
documented CLI flags.
This commit is contained in:
Kelsi 2026-05-09 19:38:06 -07:00
parent b983ef6d48
commit 6b05136ef1
3 changed files with 186 additions and 0 deletions

View file

@ -1407,6 +1407,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WPCN entries (id / kind / op / target IDs / int values / chainOp / chainNextId / name)\n");
std::printf(" --validate-wpcn <wpcn-base> [--json]\n");
std::printf(" Static checks: id>0+unique, name not empty, kind 0..15, op 0..7, chainOp 0..3, chain self-loop, dangling chainNextId warning\n");
std::printf(" --export-wpcn-json <wpcn-base> [out.json]\n");
std::printf(" Export binary .wpcn to a human-editable JSON sidecar (defaults to <base>.wpcn.json)\n");
std::printf(" --import-wpcn-json <json-path> [out-base]\n");
std::printf(" Import a .wpcn.json sidecar back into binary .wpcn (accepts conditionKind/comparisonOp/chainOp int OR name 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");