Skip to content

Fix systematically misaligned enchant/gem/consumable ID databases - #11

Merged
alexandermayes merged 1 commit into
mainfrom
growth/fix-game-data-ids
Sep 4, 2026
Merged

alexandermayes merged 1 commit into
mainfrom
growth/fix-game-data-ids

Conversation

@alexandermayes

Copy link
Copy Markdown
Owner

Context

A TBC Fresh user reported that enchant detection "seems to be wrong" and some consumables are "wrongly identified... maybe the ids are not of the right version of the game." They were right — and it was worse than it looked.

Root cause

The hand-maintained ID→name databases in lib/cla-constants.ts were systematically misaligned — whole sections shifted/rotated by one row, in every era section (Classic through MoP). Verified against actual game client data (wago.tools dumps of SpellItemEnchantment / SpellEffect / SpellName / ItemSparse / GemProperties), era-matched to the clients WCL logs come from:

Era sections Client build used
Classic + TBC 2.5.6.69546 (TBC Anniversary — the exact TBC Fresh client)
WotLK 3.4.5.63697
Cata 4.4.2.60895
MoP 5.5.4.69585

Findings

  • 88 of 106 verifiable enchant IDs mapped to the wrong name. e.g. glove enchant 684 displayed as "Major Agility (+15 Agi)" but is +15 Strength; every TBC head glyph, shoulder inscription, leg armor and spellthread was rotated (Glyph of Ferocity is 3003 not 2999, Nethercobra Leg Armor is 3012 not 2747, …). Same pattern in WotLK/Cata/MoP sections.
  • Gem databases equally broken. "Bold Living Ruby" keyed to Bold Crimson Spinel's item ID; several "gem" IDs were actually cloaks, profession formulas, or Monster - Dagger placeholder items. GEM_STAT_DB (drives "bad gem for your role" flags) had the same shifted IDs → false flags on correct gems.
  • Consumables:
    • 28093 ("Lightning Speed") / 28095 are Mongoose/enchant proc buffs, listed as weapon oils — on TBC Fresh anyone with the Mongoose enchant was credited a phantom "weapon enhancement".
    • Scroll buff IDs shifted (33077 is Agility, not Intellect); rank-V scrolls were flagged "suboptimal — use rank VIII" though VIII doesn't exist in TBC.
    • 57362/58067 counted as food buffs but are mage Refreshment.
    • Cata elixirs rotated (79474 is Naga, 79477 is Cobra, 79480 is Deep Earth — a guardian elixir, not battle).
    • 28519 is Flask of Mighty Restoration ("Versatility" doesn't exist); 53752 is Lesser Flask of Toughness, not Elixir of Mighty Defense; 54452 is a dead spell ID (removed).

Fix

  • Regenerated ENCHANT_NAME_DB, GEM_NAME_DB, GEM_STAT_DB mechanically from the client data above. Enchant names come from the applying spell (e.g. Enchant Gloves - Major Strength) plus the enchantment's actual stat text; gem stat types are derived from each gem's real enchantment text (kept as a trailing comment per entry for reviewability).
  • Surgical consumable fixes in CONSUMABLE_DB + the ID sets in lib/constants.ts (proc buffs removed from WEAPON_ENHANCEMENT_IDS, Refreshment removed from FOOD_BUFF_IDS, 53752 moved to FLASK_BUFF_IDS).
  • New regression suite lib/cla-constants.test.ts (10 tests) locking in known-good pairings.

Verification

  • npx tsc --noEmit
  • npm run lint ✓ (no new findings)
  • npm test — 34/34 ✓ (10 new)

Notes / residual limitations

  • WotLK/Cata per-food friendly names (all generically named "Well Fed" in game data) can't be cross-checked by name; IDs left as-is. They only affect display labels, not detection.
  • A few engineering tinker enchant IDs (e.g. Nitro Boosts 3606) aren't representable in the dumped tables and kept their original names.
  • Deploy is manual (vercel deploy --prod) after merge — this PR does not self-deploy.

🤖 Generated with Claude Code

A TBC Fresh user reported wrong enchant and consumable identification.
Verification against actual game client data (wago.tools dumps of
SpellItemEnchantment/SpellEffect/SpellName/ItemSparse/GemProperties)
showed the hand-maintained ID->name maps in cla-constants.ts were
systematically shifted in every era section:

- 88 of 106 verifiable enchant IDs had the wrong name (e.g. glove
  enchant 684 shown as "Major Agility" but is +15 Strength; all TBC
  head glyphs / shoulder inscriptions / leg armors rotated by one)
- Gem maps pointed at wrong items (some "gems" were cloaks, formulas,
  or Monster placeholder items); GEM_STAT_DB's shifted IDs produced
  false "bad gem for your role" flags on correct gems
- 28093/28095 (Mongoose/enchant proc buffs) were listed as weapon
  oils, crediting enchant users with a phantom weapon enhancement
- Scroll buff IDs shifted; rank-V scrolls flagged "use VIII instead"
  though VIII doesn't exist in TBC; two "food" IDs were mage
  Refreshment; Cata elixirs rotated; a few flask names wrong

Fix: regenerated ENCHANT_NAME_DB, GEM_NAME_DB and GEM_STAT_DB from
era-matched client data (Classic/TBC = 2.5.6.69546 TBC Anniversary,
WotLK = 3.4.5.63697, Cata = 4.4.2.60895, MoP = 5.5.4.69585), applied
surgical consumable fixes, and added a regression test suite locking
in known-good pairings.

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
parseforge Ready Ready Preview Sep 4, 2026 5:44pm UTC

@alexandermayes
alexandermayes merged commit 2888ca7 into main Sep 4, 2026
5 checks passed
@alexandermayes
alexandermayes deleted the growth/fix-game-data-ids branch September 4, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant