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

Closes the JSON round-trip gap on the vehicle catalog format
shipped last batch. --export-wvhc-json emits all 10 scalar
fields plus a nested array of seats per entry, and dual int +
name forms for vehicleKind / movementKind / powerType so
hand-edits can use either representation. --import-wvhc-json
accepts either form, falling back to the int when both are
present, and reconstructs the seat array preserving seat
flags / attachments / control-spell cross-refs. Verified
byte-identical round-trip on all three preset emitters
(starter / siege / flying), including nested seat data. 702
documented CLI flags.
This commit is contained in:
Kelsi 2026-05-09 19:02:17 -07:00
parent 7c00a491a5
commit be96775dc6
3 changed files with 206 additions and 0 deletions

View file

@ -1315,6 +1315,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WVHC entries with seat layout (id / creature / kind / movement / power / seat count / name)\n");
std::printf(" --validate-wvhc <wvhc-base> [--json]\n");
std::printf(" Static checks: id>0+unique, creatureId>0, kind/movement/power in range, exactly 1 driver seat, no duplicate seatIndex\n");
std::printf(" --export-wvhc-json <wvhc-base> [out.json]\n");
std::printf(" Export binary .wvhc to a human-editable JSON sidecar with nested seat arrays (defaults to <base>.wvhc.json)\n");
std::printf(" --import-wvhc-json <json-path> [out-base]\n");
std::printf(" Import a .wvhc.json sidecar back into binary .wvhc (accepts vehicleKind/movementKind/powerType 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");