DB/SpellVisualKit: Difference between revisions

From wowdev
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
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.  
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.  


==Header Info ==
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.
Records..................7834
Fields.....................38
Record Size...............152
String Block Size...........1


==Structure ==
==0.5.3.3368==
  struct SpellVisualKitEntry // sizeof(0x9C)
  struct SpellVisualKitRec {
  uint32_t m_ID;
  uint32_t m_kitType;
  uint32_t m_anim;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_headEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_chestEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_baseEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_leftHandEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_rightHandEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_breathEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_specialEffect[3];
  int32_t m_characterProcedure;
  float m_characterParam[4];
  {{Template:Type/foreign_key|table=SoundEntries}} m_soundID;
  {{Template:Type/foreign_key|table=SpellEffectCameraShakes}} m_shakeID;
};
 
===Character Procedures===
 
Character procedure handlers are generic functions that are stored in <tt>s_spellProcHandlerFunctions</tt>, they are referenced by index using the value of <tt>m_characterProcedure</tt> (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 <tt>SPELLEFFECTDESC</tt> structure for casts.
 
{| class="wikitable"
|-
! Index !! Procedure !! Param0 !! Param1 !! Param2 !! Param3 !! Notes
|-
| -1 || None || || || ||  ||
|-
| 0 || Chain (Spell) || (uint32_t) [[DB/SpellChainEffects|SpellChainEffectsRec]]::m_ID || targetCount || forever ||  || <tt>floorf(targetCount)</tt> must be 1…3. <code>forever = (value ≥ 1f)</code>, lightning ignores <tt>deathTime</tt>
|-
| 1 || Color || color || period || endTime || fadeOutTime || <tt>endTime</tt> and <tt>fadeOutTime</tt> 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 ||  ||  || <code>s_standAnims[standAnim]</code> or <code>s_walkAnims[walkAnim]</code>
|-
| 8 || Weapon Trail || (uint32_t) color || (int32_t) fadeOutRate || (uint32_t) duration || (uint32_t) alpha || <code>trailColor = ({{Template:Type|CImVector}})(color &#124; (alpha << 24))</code>
|-
| 9 || Blizzard || (uint32_t) modelName || emissionRate ||  ||  || <code>shardModel = MODEL_NAMES[modelName]</code>
|-
| 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[]
  {
  {
    m_ID; // +0x0, size 0x4, type 0
  "Spells\FlamestrikeSmall_Impact_Base.mdx",
    m_startAnimID; // +0x4, size 0x4, type 0
  "Spells\CallLightning_Impact.mdx",
    m_animID; // +0x8, size 0x4, type 0
  "Spells\RainOfFire_Impact_Base.mdx",
    m_animKitID; // +0xC, size 0x4, type 0
  "Spells\Blizzard_Impact_Base.mdx"
    m_headEffect; // +0x10, size 0x4, type 0
}
    m_chestEffect; // +0x14, size 0x4, type 0
    m_baseEffect; // +0x18, size 0x4, type 0
struct SPELLEFFECTDESC
    m_leftHandEffect; // +0x1C, size 0x4, type 0
{
    m_rightHandEffect; // +0x20, size 0x4, type 0
  SpellVisualKitRec *kitPtr;
    m_breathEffect; // +0x24, size 0x4, type 0
  {{Template:Type|CImVector}} color;
    m_leftWeaponEffect; // +0x28, size 0x4, type 0
  float scale;
    m_rightWeaponEffect; // +0x2C, size 0x4, type 0
  uint32_t startTime;
    m_specialEffect; // +0x30, size 0xC, type 0
  uint32_t fadeInTime;
    m_worldEffect; // +0x3C, size 0x4, type 0
  uint32_t fadeOutTime;
    m_soundID; // +0x40, size 0x4, type 0
  uint32_t endTime;
    m_shakeID; // +0x44, size 0x4, type 0
  uint32_t curTime;
    m_charProc; // +0x48, size 0x10, type 0
  float period;
    m_charParamZero; // +0x58, size 0x10, type 3
  int32_t standAnim;
    m_charParamOne; // +0x68, size 0x10, type 3
  int32_t walkAnim;
    m_charParamTwo; // +0x78, size 0x10, type 3
  char isOneShot;
    m_charParamThree; // +0x88, size 0x10, type 3
  LightningObject *lightningObjs[3]; // used by Chain
    m_flags; // +0x98, size 0x4, type 0
};
 
==unknown version==
struct SpellVisualKitRec {
  uint32_t m_ID;
  {{Template:Type/foreign_key|table=AnimationData}} m_startAnimID;
  {{Template:Type/foreign_key|table=AnimationData}} m_animID;
#if version > ?
  {{Template:Type/foreign_key|table=AnimKit}} m_animKitID;
#endif
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_headEffect;       // attached to Head
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_chestEffect;       // attached to Chest
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_baseEffect;       // attached to Base
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_leftHandEffect;   // attached to SpellLeftHand
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_rightHandEffect;   // attached to SpellRightHand
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_breathEffect;     // attached to Breath
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_leftWeaponEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_rightWeaponEffect;
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_specialEffect[3]; // attached to Special1…3
  {{Template:Type/foreign_key|table=SpellVisualEffectName}} m_worldEffect;
  {{Template:Type/foreign_key|table=SoundEntries}} m_soundID;
  {{Template:Type/foreign_key|table=SpellEffectCameraShakes}} 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===
{| style="background:#FCFCFC; color:black"
|-
! width="80" | Value
! width="750" | Description
|-
| 0x40 || LOOP_ANIMATION
|}




  '''Column Field Type Notes'''  
==unknown version==
  1 ID Integer
  '''Column   Field                 Type         Notes'''  
  2 iRefID_[[AnimationData.dbc|AnimationData]] Integer Seems to be caster animation of some sort...
  1       m_ID                  Integer  
  3 iRefID_[[AnimationData.dbc|AnimationData]] Integer Caster animation.
  2       [[AnimationData.dbc|m_startAnimID]]         Integer     Seems to be caster animation of some sort...
  4 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer Visual effect over the head.
  3       [[AnimationData.dbc|m_animID]]             Integer     Caster animation.
  5 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer Visual effect at chest.
  4       [[SpellVisualEffectName.dbc|m_headEffect]]         Integer     Visual effect over the head.
  6 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer Visual effect at the base/ground.
  5       [[SpellVisualEffectName.dbc|m_chestEffect]]         Integer     Visual effect at chest.
  7 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer Visual effect at right hand.
  6       [[SpellVisualEffectName.dbc|m_baseEffect]]         Integer     Visual effect at the base/ground.
  8 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer Visual effect at left hand.
  7       [[SpellVisualEffectName.dbc|m_leftHandEffect]]     Integer     Visual effect at right hand.
  9 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer Visual effect of AOE spells/abilities.
  8       [[SpellVisualEffectName.dbc|m_rightHandEffect]]     Integer     Visual effect at left hand.
  10 Unknown Integer Unknown
  9       [[SpellVisualEffectName.dbc|m_breathEffect?]]       Integer     Visual effect of AOE spells/abilities.
  11 Unknown Integer "  
  10       m_leftWeaponEffect?  Integer     Unknown
  12 Unknown Integer "
  11       m_rightWeaponEffect?  Integer     "
13 Unknown Integer "
  12       m_specialEffect[3]?  Integer     "
14 Unknown Integer "  
  15       [[SpellVisualEffectName.dbc|m_worldEffect]]         Integer     "
  15 iRefID_[[SpellVisualEffectName.dbc|SpellVisualEffectName]] Integer "  
  16       [[SoundEntries.dbc|m_soundID]]             Integer     Sound effect associated with the visual effects.
  16 iRefID_[[SoundEntries.dbc|SoundEntries]] Integer Sound effect associated with the visual effects.
  17       [[SpellEffectCameraShakes.dbc|m_shakeID]]             Integer  
  17 iRefID_[[SpellEffectCameraShakes.dbc|SpellEffectCameraShakes]] 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)
  18 Unknown Integer
  22       m_charParamZero      Float[4]    Colormask converted from HEX to DECIMAL (can be used for caster or target color)
19 Unknown Integer
  26       m_charParamOne        Float[4]
20 Unknown Integer
  30       m_charParamTwo        Float[4]   
21 Unknown Integer
  34       m_charParamThree      Float[4]
  22 Unknown Float Colormask converted from HEX to DECIMAL (can be used for caster or target color)
23 Unknown Float "
24 Unknown Float "
25 Unknown Float* null
  26 Unknown Float "
27 Unknown Float "
28 Unknown Float "
29 Unknown Float* null
  30 Unknown Float "
31 Unknown Float "
32 Unknown Float "
33 Unknown Float* null
  34 Unknown Float "
35 Unknown Float " 
36 Unknown Float* " null
37 Unknown Float* " --> associated with [[SpellVisualEffectName.dbc]]?; null


Retrieved from "http://www.sourcepeek.com/wiki/SpellVisualKit.dbc"
==Character Procedures==
The <tt>m_charProc</tt> handlers appear to never get reused so for ≤10, see the (more detailed) [[DB/SpellVisualKit#Character_Procedures|0.5.3.3368]] Character Procedures section.
#if {{Template:Sandbox/VersionRange|min_expansionlevel=1}}
  11: Freeze
  12: Chain
  13: ?
  14: UpdateAlphaEffectAlpha (SetAlphaMod in {{Template:Sandbox/PrettyVersion|expansionlevel=6}})
  15: DoFade
#endif
#if {{Template:Unverified|{{Template:Sandbox/VersionRange|min_expansionlevel=3}}}}
  16: AddMountTransition
  17: AddItemVisual
#endif
#if {{Template:Sandbox/VersionRange|min_expansionlevel=4}}
  18: AddCamouflage (AddCustomMaterialEffect in {{Template:Sandbox/PrettyVersion|expansionlevel=6}})
  19: AddHeadLook
  20: AddTimeRate
#endif
#if {{Template:Sandbox/VersionRange|min_expansionlevel=5}}
  21: AddCustomMaterialEffect
  22: AddCustomMaterialEffect
  23: AddCustomMaterialEffect
  24: PlayAllAttachedMirroredModelsOneShot
#endif
#if {{Template:Sandbox/VersionRange|min_expansionlevel=6}}
  25: AddItemVisual
  26: Chain
  27: Weapon Trail
#endif


[[Category:DBC]]
[[Category:DBC]]
[[Category:DBC_Alpha]]
[[Category:DBC_WotLK]]
[[Category:DBC_WotLK]]

Latest revision as of 12:31, 22 June 2022

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 ≥ Vanilla
 11: Freeze
 12: Chain
 13: ?
 14: UpdateAlphaEffectAlpha (SetAlphaMod in WoD)
 15: DoFade
#endif 
#if ≥ Wrath
 16: AddMountTransition
 17: AddItemVisual
#endif 
#if ≥ Cata
 18: AddCamouflage (AddCustomMaterialEffect in WoD)
 19: AddHeadLook
 20: AddTimeRate
#endif 
#if ≥ Mists
 21: AddCustomMaterialEffect
 22: AddCustomMaterialEffect
 23: AddCustomMaterialEffect
 24: PlayAllAttachedMirroredModelsOneShot
#endif 
#if ≥ WoD
 25: AddItemVisual
 26: Chain
 27: Weapon Trail
#endif