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

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

Each template round-trips all 11 scalar fields plus the
variable-length attachments array. categoryId emits dual
int + name forms (quest / auction / gm / achievement /
event / raffle / script / returned).

Verified byte-identical round-trip on the holiday preset
(4 templates with full WIT itemId attachments matching
WTKN seasonal token IDs preserved through the JSON layer).

Adds 2 flags (644 documented total now).
This commit is contained in:
Kelsi 2026-05-09 18:04:03 -07:00
parent a50d83f6c9
commit 37a30ec256
3 changed files with 149 additions and 0 deletions

View file

@ -1189,6 +1189,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WMAL templates (id / category / sender / subject + body / money + items / cod / expiry)\n");
std::printf(" --validate-wmal <wmal-base> [--json]\n");
std::printf(" Static checks: id>0+unique, subject not empty, sender set, attachments valid, no money+no items info-only\n");
std::printf(" --export-wmal-json <wmal-base> [out.json]\n");
std::printf(" Export binary .wmal to a human-editable JSON sidecar (defaults to <base>.wmal.json)\n");
std::printf(" --import-wmal-json <json-path> [out-base]\n");
std::printf(" Import a .wmal.json sidecar back into binary .wmal (accepts category int OR name string)\n");
std::printf(" --gen-gems <wgem-base> [name]\n");
std::printf(" Emit .wgem starter: 3 gems (red/yellow/blue) + 2 enchantments (Crusader proc + Greater Stats)\n");
std::printf(" --gen-gems-set <wgem-base> [name]\n");