feat(editor): add WBKD JSON round-trip (--export/--import-wbkd-json)

Closes the editing loop on the NPC service catalog: dump a .wbkd
to JSON, hand-edit serviceKind / requiresGold / factionRequiredId
/ gossipTextId (e.g. retag a city-mail NPC from Mailbox kind to
GuildBanker, raise stable master cost from 1s to 5s, gate an
auctioneer behind faction rep), re-import to a byte-identical
binary.

The exporter emits both serviceKind (int 0..11) and the human-
readable serviceKindName ("banker" / "mailbox" / "auctioneer" /
"stable-master" / "flight-master" / "trainer" / "innkeeper" /
"battlemaster" / "guild-banker" / "reagent-vendor" /
"tabard-vendor" / "misc"); the importer accepts either form.

Verified byte-identical round-trip on all three presets
(city / battle / prof). CLI flag count 1030 -> 1032.
This commit is contained in:
Kelsi 2026-05-09 23:16:32 -07:00
parent dac8ba8cbc
commit 14c6a947ee
3 changed files with 157 additions and 0 deletions

View file

@ -1977,6 +1977,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WBKD entries (id / kind / gold cost / faction gate / gossip text id / name)\n");
std::printf(" --validate-wbkd <wbkd-base> [--json]\n");
std::printf(" Static checks: id+name required, serviceKind 0..11, no duplicate ids; warns on Mailbox+gossip (no NPC dialog), Innkeeper+no-gossip (silent bind), Battlemaster+gold (queues are free)\n");
std::printf(" --export-wbkd-json <wbkd-base> [out.json]\n");
std::printf(" Export binary .wbkd to a human-editable JSON sidecar (defaults to <base>.wbkd.json)\n");
std::printf(" --import-wbkd-json <json-path> [out-base]\n");
std::printf(" Import a .wbkd.json sidecar back into binary .wbkd (accepts serviceKind int OR serviceKindName string)\n");
std::printf(" --gen-weather-temperate <wow-base> [zoneName]\n");
std::printf(" Emit .wow weather schedule: clear-dominant + occasional rain + fog (forest / grassland)\n");
std::printf(" --gen-weather-arctic <wow-base> [zoneName]\n");