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

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

Each guild round-trips header scalars (12 fields) plus the
4 sub-arrays:
  • ranks[]    — rank ladder with permissions + money cap
  • members[]  — character roster with rank + notes
  • bankTabs[] — per-tab name + 3 permission masks
  • perks[]    — purchased buffs with WSPL spell refs

factionId emits dual int + name forms (alliance / horde).

Verified byte-identical round-trip on the full preset
(1 guild with 6 ranks + 8 members + 4 bank tabs + 3
perks; all permission masks and per-rank money caps
preserved through the JSON layer).

Adds 2 flags (658 documented total now).
This commit is contained in:
Kelsi 2026-05-09 18:20:43 -07:00
parent f290a0d4a9
commit 650651ee2b
3 changed files with 220 additions and 0 deletions

View file

@ -1217,6 +1217,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WGLD entries (id / faction / level / leader + motd / rank+member+tab+perk counts)\n");
std::printf(" --validate-wgld <wgld-base> [--json]\n");
std::printf(" Static checks: id>0+unique, name+leader not empty, faction 0..1, members reference valid ranks, unique tab indices\n");
std::printf(" --export-wgld-json <wgld-base> [out.json]\n");
std::printf(" Export binary .wgld to a human-editable JSON sidecar (defaults to <base>.wgld.json)\n");
std::printf(" --import-wgld-json <json-path> [out-base]\n");
std::printf(" Import a .wgld.json sidecar back into binary .wgld (accepts faction int OR name string)\n");
std::printf(" --gen-conditions <wpcd-base> [name]\n");
std::printf(" Emit .wpcd starter: 4 conditions covering quest-done / has-item / min-level / class kinds\n");
std::printf(" --gen-conditions-gated <wpcd-base> [name]\n");