mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 11:03:51 +00:00
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:
parent
ff0aa1a3c8
commit
356fe53a9a
3 changed files with 216 additions and 0 deletions
|
|
@ -877,6 +877,10 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Print WIT item entries (id / ilvl / quality / class / slot / buy price / name)\n");
|
||||
std::printf(" --validate-wit <wit-base> [--json]\n");
|
||||
std::printf(" Static checks: itemId>0 + unique, weapon damage>0 + min<=max, equippable durability>0, sell<buy\n");
|
||||
std::printf(" --export-wit-json <wit-base> [out.json]\n");
|
||||
std::printf(" Export binary .wit to a human-editable JSON sidecar (defaults to <base>.wit.json)\n");
|
||||
std::printf(" --import-wit-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wit.json sidecar back into binary .wit (accepts quality/class/slot int OR name string)\n");
|
||||
std::printf(" --gen-loot <wlot-base> [name]\n");
|
||||
std::printf(" Emit .wlot starter loot catalog: 1 creature with 1 drop slot, 1 item @ 50%%, 0..50 copper\n");
|
||||
std::printf(" --gen-loot-bandit <wlot-base> [name]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue