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

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

Each battleground round-trips all scalar fields plus the
allianceStart and hordeStart vec3 + facing pairs (positions
become 3-element JSON arrays for natural hand-edit). The
objectiveKind enum emits dual int + name forms.

Verified byte-identical round-trip on the classic preset
(3 BGs spanning CTF / control nodes / resource race
objectives with full WMS map + WTKN markTokenId
cross-refs preserved through the JSON layer).

Adds 2 flags (637 documented total now).
This commit is contained in:
Kelsi 2026-05-09 17:53:41 -07:00
parent 492d626c3b
commit 71207b30e9
3 changed files with 160 additions and 0 deletions

View file

@ -1175,6 +1175,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WBGD entries (id / map / objective / player counts / level range / score / token reward)\n");
std::printf(" --validate-wbgd <wbgd-base> [--json]\n");
std::printf(" Static checks: id>0+unique, name not empty, player counts>0+min<=max, level range valid, scoreToWin>0\n");
std::printf(" --export-wbgd-json <wbgd-base> [out.json]\n");
std::printf(" Export binary .wbgd to a human-editable JSON sidecar (defaults to <base>.wbgd.json)\n");
std::printf(" --import-wbgd-json <json-path> [out-base]\n");
std::printf(" Import a .wbgd.json sidecar back into binary .wbgd (accepts objectiveKind int OR name string)\n");
std::printf(" --gen-mail <wmal-base> [name]\n");
std::printf(" Emit .wmal starter: 3 templates (quest overflow / auction won / GM gift) covering main mail categories\n");
std::printf(" --gen-mail-holiday <wmal-base> [name]\n");