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

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

Two top-level arrays mirror the binary layout:
  • nodes[] — nodeId / mapId / name / iconPath / position[3] /
    factionAlliance + factionHorde restrictions
  • paths[] — pathId / fromNodeId / toNodeId / moneyCostCopper /
    waypoints[] each with position[3] + delaySec

Vec3 fields become 3-element JSON arrays for natural
hand-edit. The intra-format graph (paths reference nodeIds)
round-trips exactly so the catalog's connectivity is
preserved.

Verified byte-identical round-trip on the continent preset
(6 nodes + 8 paths covering hub-and-spoke + 3 perimeter
shortcuts, 16 total waypoints).

Adds 2 flags (573 documented total now).
This commit is contained in:
Kelsi 2026-05-09 16:35:01 -07:00
parent 99baf2d0c4
commit cc4b9a6fad
3 changed files with 157 additions and 0 deletions

View file

@ -1047,6 +1047,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WTAX nodes (id / map / position / name) + paths (id / from->to / cost / waypoint count)\n");
std::printf(" --validate-wtax <wtax-base> [--json]\n");
std::printf(" Static checks: ids>0+unique, finite positions, paths reference real nodes, no self-loop, non-negative delays\n");
std::printf(" --export-wtax-json <wtax-base> [out.json]\n");
std::printf(" Export binary .wtax to a human-editable JSON sidecar (defaults to <base>.wtax.json)\n");
std::printf(" --import-wtax-json <json-path> [out-base]\n");
std::printf(" Import a .wtax.json sidecar back into binary .wtax (round-trip with --export-wtax-json)\n");
std::printf(" --gen-talents <wtal-base> [name]\n");
std::printf(" Emit .wtal starter: 1 small tree (3 talents in chain) for class warrior\n");
std::printf(" --gen-talents-warrior <wtal-base> [name]\n");