feat(editor): WQGR JSON round-trip closure

Adds --export-wqgr-json / --import-wqgr-json with the established
readEnumField template factoring int+name dual encoding for both
questType ("normal"/"daily"/"repeatable"/"group"/"raid") and
factionAccess ("both"/"alliance"/"horde"/"neutral"). Variable-
length prereq + followup quest arrays serialize as JSON int
arrays.

All 3 presets (starter/branched/dailies) byte-identical binary
roundtrip OK including the branched preset's converging DAG
(Q200 -> {Q201, Q202} -> Q203 with Q203 carrying [201, 202] in
its prevQuestIds).

Live-tested DFS cycle detection: hand-mutated Northshire chain
head Q100 to depend on Q104 (the chain's last quest), creating
a 5-node loop. Validator correctly errored: "prereq cycle
detected: 100 -> 104 -> 103 -> 102 -> 101 -> 100 — quests would
be unreachable (progression deadlock)" with the full back-edge
path extracted exactly as WMOD does for addon dep cycles.

CLI flag count 1389 -> 1391.
This commit is contained in:
Kelsi 2026-05-10 04:24:49 -07:00
parent 76cda20297
commit a4ac12dbeb
3 changed files with 210 additions and 0 deletions

View file

@ -406,6 +406,7 @@ const char* const kArgRequired[] = {
"--export-wgbk-json", "--import-wgbk-json",
"--gen-qgr-starter", "--gen-qgr-branched", "--gen-qgr-dailies",
"--info-wqgr", "--validate-wqgr",
"--export-wqgr-json", "--import-wqgr-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",