feat(editor): add WTRG JSON round-trip authoring workflow

Closes the WTRG open-format loop with --export-wtrg-json /
--import-wtrg-json, mirroring the JSON pairs added for
every other novel binary format. All 23 binary formats
added since WOL now have full JSON round-trip authoring.

Each trigger round-trips:
  • triggerId / mapId / areaId / name / minLevel
  • center / boxDims / dest as 3-element JSON arrays
  • shape (dual int + name) / kind (dual int + name)
  • radius / actionTarget / destOrientation
  • requiredQuestId / requiredItemId

Verified byte-identical round-trip on the dungeon preset
(3 triggers including the box-shaped Deadmines portal with
WIT key gate (itemId=5200) and full destination + facing
preserved through the JSON layer).

Adds 2 flags (603 documented total now).
This commit is contained in:
Kelsi 2026-05-09 17:03:27 -07:00
parent 8c78f8aeb2
commit 1f808ca78b
3 changed files with 160 additions and 0 deletions

View file

@ -1117,6 +1117,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WTRG triggers (id / map / area / kind / shape + dims / dest + facing / quest+key gates)\n");
std::printf(" --validate-wtrg <wtrg-base> [--json]\n");
std::printf(" Static checks: id>0+unique, finite center, sphere needs radius>0, box needs >=1 nonzero half-extent, quest-explore needs target\n");
std::printf(" --export-wtrg-json <wtrg-base> [out.json]\n");
std::printf(" Export binary .wtrg to a human-editable JSON sidecar (defaults to <base>.wtrg.json)\n");
std::printf(" --import-wtrg-json <json-path> [out-base]\n");
std::printf(" Import a .wtrg.json sidecar back into binary .wtrg (accepts shape/kind int OR name forms)\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");