DB/SpellVisualKit
This file is used to attach different spell effects from SpellVisualEffectName.dbc to certain points on the model. Each column corresponds to areas on a model such as hands, chest and base.
Besides the obvious effects for different attachments, there is "character procedures" (`m_characterProcedure`, `m_charProc[4]`) which have additional non-DB/SpellVisualEffectName effects, like equipping items or coloring the target.
0.5.3.3368
struct SpellVisualKitRec { uint32_t m_ID; uint32_t m_kitType; uint32_t m_anim; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_headEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_chestEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_baseEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_leftHandEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_rightHandEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_breathEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_specialEffect[3]; int32_t m_characterProcedure; float m_characterParam[4]; foreign_keyⁱ<uint32_t, &SoundEntriesRec::m_ID> m_soundID; foreign_keyⁱ<uint32_t, &SpellEffectCameraShakesRec::m_ID> m_shakeID; };
Character Procedures
Character procedure handlers are generic functions that are stored in s_spellProcHandlerFunctions, they are referenced by index using the value of m_characterProcedure (called Index below), the exceptions to this rule are Fishing Line and Blizzard which have dedicated checks. While all params are read as floats, they are often cast to other types, thus explaining large exponent values in file. See below and the SPELLEFFECTDESC structure for casts.
Index | Procedure | Param0 | Param1 | Param2 | Param3 | Notes |
---|---|---|---|---|---|---|
-1 | None | |||||
0 | Chain (Spell) | (uint32_t) SpellChainEffectsRec::m_ID | targetCount | forever | floorf(targetCount) must be 1…3. forever = (value ≥ 1f) , lightning ignores deathTime
| |
1 | Color | color | period | endTime | fadeOutTime | endTime and fadeOutTime are float secs that are stored as uint32_t ms |
2 | Scale | scale | ||||
4 | Emissive | color | ||||
6 | Eclipse | color | fadeInTime | |||
7 | Stand/Walk Anim | standAnim | walkAnim | s_standAnims[standAnim] or s_walkAnims[walkAnim]
| ||
8 | Weapon Trail | (uint32_t) color | (int32_t) fadeOutRate | (uint32_t) duration | (uint32_t) alpha | trailColor = (CImVectorⁱ)(color | (alpha << 24))
|
9 | Blizzard | (uint32_t) modelName | emissionRate | shardModel = MODEL_NAMES[modelName]
| ||
10 | Fishing Line |
const ANIMENUMERATION s_standAnims[3] { ANIM_STAND, ANIM_STEALTHSTAND, ANIM_DEATH } // 0x0, 0x78, 0x1 const ANIMENUMERATION s_walkAnims[2] { ANIM_WALK, ANIM_STEALTHWALK } // 0x4, 0x77 const char *MODEL_NAMES[] { "Spells\FlamestrikeSmall_Impact_Base.mdx", "Spells\CallLightning_Impact.mdx", "Spells\RainOfFire_Impact_Base.mdx", "Spells\Blizzard_Impact_Base.mdx" } struct SPELLEFFECTDESC { SpellVisualKitRec *kitPtr; CImVectorⁱ color; float scale; uint32_t startTime; uint32_t fadeInTime; uint32_t fadeOutTime; uint32_t endTime; uint32_t curTime; float period; int32_t standAnim; int32_t walkAnim; char isOneShot; LightningObject *lightningObjs[3]; // used by Chain };
unknown version
struct SpellVisualKitRec { uint32_t m_ID; foreign_keyⁱ<uint32_t, &AnimationDataRec::m_ID> m_startAnimID; foreign_keyⁱ<uint32_t, &AnimationDataRec::m_ID> m_animID; #if version > ? foreign_keyⁱ<uint32_t, &AnimKitRec::m_ID> m_animKitID; #endif foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_headEffect; // attached to Head foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_chestEffect; // attached to Chest foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_baseEffect; // attached to Base foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_leftHandEffect; // attached to SpellLeftHand foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_rightHandEffect; // attached to SpellRightHand foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_breathEffect; // attached to Breath foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_leftWeaponEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_rightWeaponEffect; foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_specialEffect[3]; // attached to Special1…3 foreign_keyⁱ<uint32_t, &SpellVisualEffectNameRec::m_ID> m_worldEffect; foreign_keyⁱ<uint32_t, &SoundEntriesRec::m_ID> m_soundID; foreign_keyⁱ<uint32_t, &SpellEffectCameraShakesRec::m_ID> m_shakeID; uint32_t m_charProc[4]; float m_charParamZero[4]; float m_charParamOne[4]; float m_charParamTwo[4]; float m_charParamThree[4]; #if version > ? uint32_t m_flags; #endif };
Flags
Value | Description |
---|---|
0x40 | LOOP_ANIMATION |
unknown version
Column Field Type Notes 1 m_ID Integer 2 m_startAnimID Integer Seems to be caster animation of some sort... 3 m_animID Integer Caster animation. 4 m_headEffect Integer Visual effect over the head. 5 m_chestEffect Integer Visual effect at chest. 6 m_baseEffect Integer Visual effect at the base/ground. 7 m_leftHandEffect Integer Visual effect at right hand. 8 m_rightHandEffect Integer Visual effect at left hand. 9 m_breathEffect? Integer Visual effect of AOE spells/abilities. 10 m_leftWeaponEffect? Integer Unknown 11 m_rightWeaponEffect? Integer " 12 m_specialEffect[3]? Integer " 15 m_worldEffect Integer " 16 m_soundID Integer Sound effect associated with the visual effects. 17 m_shakeID Integer 18 m_charProc Integer[4] Known value "17" reference to item_entry in column 26, example spell - 58493(mohawk grenade), point to item 43486 (Mohawk Mask) 22 m_charParamZero Float[4] Colormask converted from HEX to DECIMAL (can be used for caster or target color) 26 m_charParamOne Float[4] 30 m_charParamTwo Float[4] 34 m_charParamThree Float[4]
Character Procedures
The m_charProc handlers appear to never get reused so for ≤10, see the (more detailed) 0.5.3.3368 Character Procedures section.
#if ≥ 11: Freeze 12: Chain 13: ? 14: UpdateAlphaEffectAlpha (SetAlphaMod in ) 15: DoFade #endif #if ≥ ᵘ 16: AddMountTransition 17: AddItemVisual #endif #if ≥ 18: AddCamouflage (AddCustomMaterialEffect in ) 19: AddHeadLook 20: AddTimeRate #endif #if ≥ 21: AddCustomMaterialEffect 22: AddCustomMaterialEffect 23: AddCustomMaterialEffect 24: PlayAllAttachedMirroredModelsOneShot #endif #if ≥ 25: AddItemVisual 26: Chain 27: Weapon Trail #endif