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

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

Each quest round-trips:
  • 13 scalar fields (id, level range, masks, chain links,
    giver/turnin, xp + money reward, flags)
  • 3 string fields (title, objective, description)
  • objectives array with dual int + name kindName
  • rewardItems array with dual int + name pickFlagsList

The flag bitset emits string-array form so a hand-author can
write ["daily", "repeatable", "auto-accept"] instead of
having to remember the bit math. The objective kindName
makes "visit/collect/kill" obvious without needing to know
that kind=3 means VisitArea.

Verified byte-identical round-trip on the 3-quest chain
preset (full feature exercise: prev/next chain links,
mixed objective kinds, AutoComplete bridge quest, player-
choice rewards). Adds 2 flags (509 documented total now).
This commit is contained in:
Kelsi 2026-05-09 15:33:21 -07:00
parent f8d7b6b6bd
commit 62e370545f
3 changed files with 229 additions and 0 deletions

View file

@ -919,6 +919,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WQT entries (questId / level / giver / objectives / rewards / chain links)\n");
std::printf(" --validate-wqt <wqt-base> [--json]\n");
std::printf(" Static checks: questId>0+unique, level>0+min<=max, title not empty, no rewards warning, daily needs repeatable\n");
std::printf(" --export-wqt-json <wqt-base> [out.json]\n");
std::printf(" Export binary .wqt to a human-editable JSON sidecar (defaults to <base>.wqt.json)\n");
std::printf(" --import-wqt-json <json-path> [out-base]\n");
std::printf(" Import a .wqt.json sidecar back into binary .wqt (accepts kind/flag int OR name forms)\n");
std::printf(" --gen-objects <wgot-base> [name]\n");
std::printf(" Emit .wgot starter object catalog: 1 chest + 1 mailbox + 1 sign\n");
std::printf(" --gen-objects-dungeon <wgot-base> [name]\n");