feat(pipeline): WIRC item random-property pool catalog (137th open format)

Novel replacement for the random-suffix enchant pool that
vanilla WoW carried in ItemRandomProperties.dbc +
ItemRandomSuffix.dbc (TBC+) + the per-item RandomProperty
rolls baked into the LootMgr. Each WIRC entry binds one
random-property pool to a name suffix ("of the Bear", "of the
Eagle"), a weighted enchant table (variable-length array of
{enchantId, weight}), and the equipment slots + class
restrictions where the suffix can roll.

At loot time, each green+ item rolls one pool based on its
slot, then picks one enchant from that pool weighted by
enchant.weight / totalWeight. The denormalized totalWeight
field is precomputed for the loot generator's hot-path roll.

Three presets covering the canonical vanilla suffix archetypes:
  --gen-irc-bear   STA-focused for plate slots (Helm/Chest/
                   Leg/Boot) with 4 weighted +Sta enchants
                   (3/5/7/10 — middle tier most common at
                   weight 50/100). Warrior+Paladin+DK class
                   mask
  --gen-irc-eagle  INT+STA caster pool for cloth slots with
                   5 weighted +Int+Sta enchants (3/5/7/10/12).
                   Mage+Priest+Warlock class mask
  --gen-irc-tiger  STR+AGI hybrid for leather slots with 5
                   weighted enchants. Rogue+Hunter+Druid class
                   mask

Validator catches: id+name required, allowedSlotsMask != 0
(else pool is unreachable — no slot would ever roll it),
non-empty enchant array, no zero-id enchants, no duplicate
enchantIds within same pool (should be merged with summed
weight). CRITICAL: totalWeight MUST equal sum of enchant
weights (else the loot generator's denormalized roll
mis-picks the distribution — players would see wrong rates of
each enchant tier). Warns on enchant weight=0 (never picked,
dead entry to remove or assign weight).

Format count 136 -> 137. CLI flag count 1427 -> 1434.
This commit is contained in:
Kelsi 2026-05-10 05:01:16 -07:00
parent af59866f3d
commit b6a88ff964
10 changed files with 725 additions and 0 deletions

View file

@ -161,6 +161,7 @@ constexpr FormatRow kFormats[] = {
{"WLOC", ".wloc", "world", "AreaPOI + GO spawns + AreaTrigger.dbc","World locations catalog (POI/RareSpawn/HerbNode/MineralVein/FishingSpot/Trigger/PortalLand)"},
{"WBND", ".wbnd", "loot", "ItemTemplate.bondingType + LootMgr", "Soulbind rules catalog (BoP/BoE/BoU/BoA + raid-trade window)"},
{"WBHV", ".wbhv", "ai", "creature_template.AIName + ScriptMgr","Creature behavior catalog (combat AI archetypes + special abilities)"},
{"WIRC", ".wirc", "loot", "ItemRandomProperties.dbc + LootMgr", "Item random-property pool catalog (weighted suffix enchants)"},
// Additional pipeline catalogs without the alternating
// gen/info/validate CLI surface (loaded by the engine