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

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

Each tree round-trips:
  • treeId, name, iconPath, requiredClassMask
  • talents[] with talentId / row / col / maxRank /
    prereqTalentId+Rank / rankSpellIds[5] (always emitted
    as a 5-element array, zero-padded for unused ranks)

The fixed-size rankSpellIds array round-trips exactly
even when most slots are zero — preserves binary layout
parity for downstream consumers expecting fixed-stride
talent records.

Verified byte-identical round-trip on the warrior preset
(3 trees, 11 talents with prereq chains and capstone WSPL
spell references intact).

Adds 2 flags (580 documented total now).
This commit is contained in:
Kelsi 2026-05-09 16:41:37 -07:00
parent 82a8c3559e
commit 019104536f
3 changed files with 147 additions and 0 deletions

View file

@ -1061,6 +1061,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WTAL trees + per-talent grid position / max rank / prereq chain / rank-1 spellId\n");
std::printf(" --validate-wtal <wtal-base> [--json]\n");
std::printf(" Static checks: tree+talent ids>0+unique, maxRank 1..5, prereq references resolve, no self-prereq\n");
std::printf(" --export-wtal-json <wtal-base> [out.json]\n");
std::printf(" Export binary .wtal to a human-editable JSON sidecar (defaults to <base>.wtal.json)\n");
std::printf(" --import-wtal-json <json-path> [out-base]\n");
std::printf(" Import a .wtal.json sidecar back into binary .wtal (round-trip with --export-wtal-json)\n");
std::printf(" --gen-maps <wms-base> [name]\n");
std::printf(" Emit .wms starter: 1 map (Eastern Kingdoms) + 3 areas (Stormwind / Elwynn / Goldshire) with parent chain\n");
std::printf(" --gen-maps-classic <wms-base> [name]\n");