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

Closes the WIT open-format loop with --export-wit-json /
--import-wit-json, mirroring the WOL/WOW/WOMX/WSND/WSPN
JSON pairs. All 6 binary formats added since WOL now have
full JSON round-trip authoring.

Each entry round-trips all 18 scalar fields plus the
variable-length stats array. Three enum-typed fields emit
dual int + name forms so a hand-author can use either:
  • quality       (poor..heirloom)
  • itemClass     (consumable / weapon / armor / quest / ...)
  • inventoryType (head, chest, weapon-1h, ...)

Stats round-trip with both type int + typeName string so
"strength: 5" reads more naturally than "type=4, value=5"
in hand-edit JSON.

Verified byte-identical round-trip on the makeWeapons
preset (5 items spanning common -> legendary, both 1H and
2H slots, full damage / speed / stat coverage). Adds 2
flags (488 documented total now).
This commit is contained in:
Kelsi 2026-05-09 15:13:26 -07:00
parent ff0aa1a3c8
commit 356fe53a9a
3 changed files with 216 additions and 0 deletions

View file

@ -34,6 +34,7 @@ const char* const kArgRequired[] = {
"--export-wspn-json", "--import-wspn-json",
"--gen-items", "--gen-items-weapons", "--gen-items-armor",
"--info-wit", "--validate-wit",
"--export-wit-json", "--import-wit-json",
"--gen-loot", "--gen-loot-bandit", "--gen-loot-boss",
"--info-wlot", "--validate-wlot",
"--gen-weather-temperate", "--gen-weather-arctic",