Closes the editing loop on the spell-reagent catalog: dump a
.wspr to JSON, hand-edit reagentKind / spellId / per-slot
itemId+count pairs (e.g. swap a Mage Portal's reagent from Rune
of Portals to a server-custom item, change a Warlock summon to
need 2 Soul Shards instead of 1, add Tier-3 Catalyst entries
for upgraded spell variants), re-import to a byte-identical
binary.
Reagent slot arrays (8 itemIds, 8 counts) are exported as JSON
arrays — easier to read and edit than 16 individual numbered
fields. Importer pads arrays shorter than 8 with zeros and
silently truncates longer arrays, so hand-edited sidecars don't
need to spell out every empty slot.
The exporter emits both reagentKind (int 0..4) and the human-
readable reagentKindName ("standard" / "soul-shard" /
"focused-item" / "catalyst" / "tradeable"); the importer accepts
either form.
Verified byte-identical round-trip on all three presets
(mage / warlock / rez). CLI flag count 979 -> 981.
Open replacement for the per-spell reagent fields in Spell.dbc
(Reagent[8] + ReagentCount[8]). Defines the item reagents that a
spell consumes from the caster's inventory each time it's cast —
Mage Portal needs a Rune of Portals, Resurrection needs a Holy
Candle (focused, not consumed), Warlock summons consume Soul
Shards.
One entry per reagent-using spell — most spells have no reagents
and are absent from this catalog. Each entry can list up to 8
(itemId, count) pairs which all must be present for the spell
to cast. Five reagentKind values capture the variety of reagent
semantics:
- Standard — ordinary consumed reagent
- SoulShard — warlock-specific shard tracking
- FocusedItem — required to cast but NOT consumed
(Symbol of Divinity for Resurrection)
- Catalyst — enables a stronger version of the spell
- Tradeable — crafting reagent for trade-skill recipes
Cross-references back to WSPL (every entry references a spellId)
and WIT (every reagent itemId references an item entry).
findBySpell(spellId) is the primary engine lookup.
Three preset emitters: --gen-spr (4 mage portal/teleport
reagents using Rune of Teleportation 17031), --gen-spr-warlock
(4 demon summons each consuming 1 Soul Shard 6265),
--gen-spr-rez (3 resurrection variants demonstrating each
ReagentKind including a no-reagent Druid Rebirth and a
focused-item Priest Resurrection).
Validation enforces id+name+spellId presence, reagentKind 0..4,
no duplicate ids; warns on:
- slot itemId/count mismatch (id without count or vice versa)
- SoulShard kind with non-canonical reagent (not item 6265)
- FocusedItem kind with no reagent slots set (focused-item
gating has nothing to gate)
- duplicate spellId across entries (engine honors only first)
This is the 80th open format milestone. Wired through the
cross-format table; WSPR appears automatically in all 14
cross-format utilities. Format count 79 -> 80; CLI flag count
974 -> 979.