Commit graph

2 commits

Author SHA1 Message Date
Kelsi
a7057393eb 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.
2026-05-09 23:00:32 -07:00
Kelsi
efb88be366 feat(editor): add WIQR (Item Quality) open catalog format
Open replacement for the hardcoded item quality tiers in the
WoW client (Poor / Common / Uncommon / Rare / Epic / Legendary
/ Artifact / Heirloom). Defines each tier's tooltip text color,
inventory slot border color, vendor price multiplier, drop-level
gating, and disenchant eligibility.

The hardcoded client uses a fixed color table (gray/white/green/
blue/purple/orange/red/gold). This catalog lets server admins:
  - retune the colors (rename "Epic" to "Tier 1" with custom hex)
  - add server-custom tiers above Heirloom
  - change vendor markup per tier (legendary 50x base price)
  - gate quality drops by character level (Heirlooms unlock 80)

The standard preset reproduces the canonical 8-tier scale with
exact hex values from the live client (#9d9d9d through #00ccff)
and standard disenchant rules (Common+ disenchantable, Legendary
and Artifact aren't). The server-custom preset shows 4 tiers
above the standard range with non-standard pricing (Junk 0.1x,
QuestLocked 0.0x unsellable). The raid preset gates 4
progression tiers behind minLevelToDrop=60 with escalating
vendor multipliers up to 50x for Legendary.

Cross-references back to WIT — item entries reference qualityId
here for tooltip color and sort order. canDropAtLevel(id, lvl)
is the engine helper used by loot generation.

Validation enforces name presence, no duplicate ids,
vendorPriceMultiplier >= 0, minLevelToDrop <= maxLevelToDrop;
warns on:
  - minLevelToDrop > 80 (unreachable at WotLK cap)
  - vendorPriceMultiplier > 100x (sanity check the economy)
  - nameColorRGBA with alpha=0 (text would be invisible in
    tooltips — common bug when copy-pasting RGB hex without
    alpha byte)

Wired through the cross-format table; WIQR appears automatically
in all 15 cross-format utilities. Format count 83 -> 84; CLI
flag count 1003 -> 1008.
2026-05-09 22:59:27 -07:00