Skip to content

Feature/dbc extend exploration - #1516

Open
1337LutZ wants to merge 19 commits into
masterfrom
feature/dbc-extend-exploration
Open

Feature/dbc extend exploration#1516
1337LutZ wants to merge 19 commits into
masterfrom
feature/dbc-extend-exploration

Conversation

@1337LutZ

Copy link
Copy Markdown

DBC parsing: item/enchant → effect resolution

Audit of how items and enchants reach their spell effects, plus the fixes it turned up.

Wrong data in the shipped database

  • RPPM modifiers duplicated by SQL fan-out. LEFT JOIN SpellEffect multiplied a
    json_group_array under a bare GROUP BY, duplicating mods on 30,305 spells; 4 legendary
    cloaks shipped every mod twice. Mods are now aggregated in their own subquery.
  • Duplicate enchant EffectId. GROUP BY name collapsed distinct enchantments sharing a
    display name (3289 Riding Crop / Skybreaker Whip). Replaced with two ROW_NUMBER() dedupes,
    which also separates the 5.2/5.4 down-scaled enchant copies from the real enchant.
  • Truncated multi-stat effects. A_MOD_RATING / A_MOD_RESISTANCE stopped after the first
    stat in a mask, and A_MOD_INCREASE_ENERGY turned every power type into mana.
  • ON_EQUIP stats only reached the base scaling state. Now folded per state at that state's
    own item level; 98 items gained their PvP Power on the challenge-mode state.
  • A_MOD_INCREASE_HEALTH_2 ignored scaling coefficients. 50 PvP trinkets understated on-use
    health by 1.9–2.4× (Malevolent Gladiator's Emblem: 21608 → 51364). The pre-MoP items where
    base points already equal the formula are unchanged, which is what confirms the formula.
  • Non-deterministic output. Effect traversal and generated-file ordering now have a total
    order, and generated Go is gofmt-formatted, so regeneration is idempotent.

Relationships that now resolve

  • On-use enchants (engineering tinkers) keep their cooldown, spell category and duration even
    when the buff itself is server-scripted.
  • Damage procs resolve their min/max, so shield spikes and Elemental Force generate.
  • Server-scripted MoP weapon enchants get their buff spell from an explicit override table,
    since no SpellEffect edge exists. River's Song, Phase Fingers and Elemental Force moved from
    hand-written to generated.
  • MoP PvP glove bonuses are real NewItemEffect registrations instead of a per-character call,
    so they are no longer reported as unimplemented.

Reporting

  • Effects excluded by an ignore list are emitted as // Not simulated: comments naming the rule,
    instead of vanishing silently. Kept out of the frontend TypeScript.
  • Marker/despawn auras that resolve to nothing are no longer reported as missing effects.
    MISSING_ITEM_EFFECTS 367 → 250 entries, all real gaps.
  • Dead support check. BuildSpellProcInfo required an empty Outcome, which it sets
    unconditionally, so nothing was ever refused and a callback-less trigger shipped as a live
    registration that silently did nothing. Nazgrim's Burnished Insignia now works.
  • Tooltip values. Item-level scaled effects rendered EffectBasePoints, a stale leftover
    ("grant 1 Intellect" where the proc gives 11761). The provider now resolves them against the
    item's level. Tooltip numbers agree with the stat the sim registers on 120/120 procs
    (was 14) and 91/91 on-use effects (was 28).

Pipeline hygiene

  • One implementation of SpellItemEnchantment → stats for enchants, gems, random suffixes and
    socket bonuses, and one aura → stats mapping shared with item effects.
  • ItemStatEffect renamed to SocketBonus and scoped to the rows items reference (2642 → 282).
  • Removed a field the DBC table does not have; added a cycle guard to resolveStatsSpell.
  • Spell attribute checks read named constants and Spell.ScalesWithItemLevel() style helpers
    rather than HasAttributeAt(11, 0x4).
  • 16 copies of the extraction marshal/write/abort triple collapsed into one helper.

Fixtures to regenerate

  • AllItems-Nazgrim'sBurnishedInsignia-105549 — new case, previously inert.
  • 3 Prideful Gladiator glove cases — new cases.
  • 14 health-trinket cases per spec (Gladiator's Emblems, Fortitude of the Zandalari).

1337LutZ added 12 commits July 31, 2026 21:59
… feature/dbc-extend-exploration

# Conflicts:
#	assets/database/db.bin
#	assets/database/leftover_db.bin
#	sim/common/mop/enchants_auto_gen.go
#	sim/common/mop/stat_bonus_procs_auto_gen.go
#	sim/mage/arcane/TestArcane.results
#	sim/mage/fire/TestFire.results
#	sim/mage/frost/TestFrost.results
#	sim/priest/shadow/TestShadow.results
#	sim/rogue/assassination/TestAssassination.results
#	sim/shaman/elemental/TestElemental.results
#	sim/warrior/protection/TestProtectionWarrior.results
#	tools/database/gen_effects.go

@hillerstorm hillerstorm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated deep review (8 finder angles + per-finding verification against master and the PR head). 9 findings below as inline comments — the top two are live, user-visible regressions from the Skeer's manual-to-generated migration; the rest are latent landmines or robustness issues in the new generator/factory infrastructure.

Also checked and cleared, for the record: enchant SQL dedupe-by-name provably picks the right rows (PR ships the identical 255 enchant effect IDs as master); Renataki's generated values/IDs/ICD match the deleted manual impl exactly; RequireDamageDealt: false on Elemental Force/River's Song, Phase Fingers' shared-CD category (1141), and River's Song stacking to 2 all match DBC data and are taken as intended fixes.

Comment thread sim/common/mop/stat_bonus_procs_auto_gen.go
Comment thread sim/common/shared/shared_utils.go Outdated
Comment thread sim/common/shared/shared_utils.go
Comment thread sim/common/shared/shared_utils.go Outdated
Comment thread sim/common/shared/shared_utils.go
Comment thread sim/common/shared/shared_utils.go Outdated
Comment thread tools/database/dbc/enchant_overrides.go Outdated
Comment thread tools/database/dbc/spell_chain.go
Comment thread sim/core/item_sets.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants