feat(editor): add WIQR JSON round-trip (--export/--import-wiqr-json)

Closes the editing loop on the item-quality catalog: dump a
.wiqr to JSON, hand-edit color hex / vendor multiplier / level
gates / disenchant flag / border texture path (e.g. retune Epic
purple from #a335ee to #c33fff for a brighter look, raise
Heirloom unlock from lvl 80 to 85, mark Legendary as
disenchantable, swap a server-custom tier's border texture),
re-import to a byte-identical binary.

The colors export as raw RGBA uint32 — direct pasting of
0xAARRGGBB hex values without conversion. canBeDisenchanted
round-trips as a JSON bool but accepts int as well so machine-
generated sidecars work too.

Verified byte-identical round-trip on all three presets
(std / srv / raid). CLI flag count 1008 -> 1010.
This commit is contained in:
Kelsi 2026-05-09 23:00:32 -07:00
parent efb88be366
commit a7057393eb
3 changed files with 127 additions and 0 deletions

View file

@ -1933,6 +1933,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WIQR entries (id / name / nameColor RGBA / vendor multiplier / minLevel / maxLevel / disenchant flag / border texture)\n");
std::printf(" --validate-wiqr <wiqr-base> [--json]\n");
std::printf(" Static checks: name required, no duplicate ids, vendor>=0, min<=max; warns on lvl>80 (unreachable), vendor>100x (sanity), alpha=0 nameColor (invisible)\n");
std::printf(" --export-wiqr-json <wiqr-base> [out.json]\n");
std::printf(" Export binary .wiqr to a human-editable JSON sidecar (defaults to <base>.wiqr.json). Colors as RGBA uint32, easy to paste hex values\n");
std::printf(" --import-wiqr-json <json-path> [out-base]\n");
std::printf(" Import a .wiqr.json sidecar back into binary .wiqr (canBeDisenchanted accepts bool OR int)\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");