• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

DBC editing - spell creation

crumpets

Enthusiast
I'm not sure what the policy is for dbc editing here, take it down if you don't condone it.
This has been posted by me over at modcraft and ac web (completely lost on ac web :crazy:) but it might server some purpose, so here it goes. I'm working on the rest, honest.

Get yourself MyDBCEditor (google it...tada) [DON'T FORGET TO TICK THE "ZERO BASED" TICKBOX AT THE BOTTOM OF THE EDITOR OR THE COLUMN IDS WILL NOT BE THE SAME AS IN THIS TUTORIAL]

Open up Spell.dbc (you're doing so well)

Tonight we're going to tackle a basic but surprisingly educating problem to solve:

There are a few things you need to know about spells. More often than you'd think there is more than one spell involved in the casting of a "singular" spell. For instance, Holy Shock, this spell either heals the target if friendly or damages the target if hostile. Now, unfortunately, dbc's don't handle any mechanic this dynamic and therefore it's handled via the core and there are actually two spells (two entries in the dbc) for each rank of holy shock, one that heals and one that deals damage. Right, now say you wanted to edit holy shock for your new fantabulous twink server so you hop along to open-wow and look up Holy Shock (http://wotlk.openwow.com/?spell=20473) and openwow tells you that the id is 20473. Great, now you head on over to column 80 (incidentally I'll teach you what these columns actually mean, just knowing "that's the one that has the same number as the tooltip" is ridiculous, but I digress...) but what's this? it's empty! you check all the other nearby columns in the vague hope that there will be a number that you can change that will do the right thing, but none of them come close to the damage/healing value specified in the tooltip! ah well, I guess your twink realm won't be so fantabulous after all, right? WRONG MOTHERFUCKER! Here's the solution to your problem, but in order to understand it you have to approach it logically. I've already told you, spell such as holy shock have to be handled in the core, but this is the spell you use to cast it, so this spell must tell you something... It does, the tooltip tells you everything, it tells you how much it will heal for on friendly targets and how much it will damage your newly created super custom fun time boss for your amazing twink server. So, now you go in search of the tooltip column in the DBC, which, by the way, is 170 (most of the time) and you see this:

Quote:Blasts the target with Holy energy, causing $25912s1 Holy damage to an enemy, or $25914s1 healing to an ally.


Ooooh numbers, let's break this down:

"$" pretty much means your getting a value from somewhere else in the dbc. What comes after it is what row it's getting that value from, if there is no number after it, that means it's getting the number from it's own row (e.g. $s1)

"s" stands for the effectbasepoint columns a.k.a 80-82

"1" doesn't have to be 1, but it stands for which of the effectbasepoint columns it is getting the number from, in this case it's column 80, if it was 2 then it would be column 81 and if it was 3 then it would be column 82.

With this new found knowledge you can see that the tooltip is pointing to two different rows (two different spells) to return the heal/damage values. For the heal value it's pointing to row 25914, and sure enough, if we go to row 25914 at column 80, there's the value for the minimum heal for holy shock.



Right ok that's it for tonight, do it yourself with a spell like haunt, see if you can successfully modify both values.

Part one continued: Columns explained

I'm going to try and teach columsn with something to relate to. So let us deconstruct a spell.
Lets take rank 3 fireball (http://wotlk.openwow.com/?spell=145) as it's nice and simple. Ok, so let's look at what fireball does: It takes 2.5 seconds to shoot a projectile (fire-ball... durrr) which deals 53-73 fire damage and then 2 damage over 6 seconds after that.


Quote:It takes 2.5 seconds


This is the cast time. Column 28 handles cast time, but it stands for the casting time index, not the time itself. The value here points to a row in another dbc, SpellCastTimes.dbc. With our fireball, the value in column 28 is 19 so we need to go to SpellCastTimes.dbc and look at row 19 to understand further. We're only interested in column one and the row id in spellcasttimes.dbc as it tells us how long the cast time is, at row 19 the value in column 1 is 2500, so this means that it's done in milliseconds (1000 milliseconds in a second). If you wanted to change the cast time of fireball then you would need to change the value in column 28 (spell.dbc) to a different row id from SpellCastTimes.dbc.


Quote:shoot a projectile (fire-ball...dur)


This is the visual of the spell. Spell visuals are exceedingly complex so I won't go into too much detail as it would no longer be defined basic. But, column 131 is the spell visual column, to oversimplify, this is what makes the fireball look like a fireball, what makes the explosions on impact and what controlls the casting visual. The path of the fireball through the air is controlled elsewhere, but this will be discussed at another time, it's much more advanced. I suggest, for now, you don't tamper with this, it's unlikely it will turn out well. I promise I'll get round to a comprehensive tutorial on it.


Quote:deals 53-73 fire damage and then 2 damage over 6 seconds after that.


This is the fun stuff, but also the most complex. We'll start at the beginning, basic attributes of the spell (columns 4-11 define atributes, these are like limiting factors). The only attribute that fireball has is in column four and it's 0x10000 which means that the spell cannot be cast whilst shapeshifted, simple, this is an attribute that almost every spell has (apart from the obvious exceptions) What the attributes mean can be found here: http://www.pxr.dk/wowdev/wiki/index.php?title=Spell.dbc/Attributes (mind, this is only for the first attribute column, each one has its own set).

The spell target type also needs to be defined somewhere, this is defined in column 16. For fireball the value here is zero, which means it can have a singular player/creature target, we'll get on to how this is further refined in a bit.
Lets move on to the spell effects. Columns 71-73 define the effects of the spell. Fireball has two effects, some instant damage and a periodic damage tick. Column 71 for fireball has the value 2 which stands for SPELL_EFFECT_SCHOOL_DAMAGE ( list can be found here : http://www.pxr.dk/wowdev/wiki/index.php?title=Spell.dbc/Effect), Column 72 for fireball has the value 6 which stands for SPELL_EFFECT_APPLY AURA.

Lets deal with the SPELL_EFFECT_SCHOOL_DAMAGE first, this means that damage of a particular school is done to the target. The school of damage is defined at column 225, where the value for fireball is 4, which is the value for the fire school of damage. We then go to columns 80-82, which are the effectbasepoints columns, and it is (sortof) the amount of the effect that is applied, so for fireball the value in column 80 (the first effect therefore the first effectbasepoint column) is 52, which means that 53 points of fire damage will be dealt to the target (0 is counted as 1 here), sorted.

As for SPELL_EFFECT_APPLY_AURA, well we need to say which aura is applied. So we go to columns 95-97, which are the columns for "effectapplyauraname". We go to column 96, as the effect was defined in the second effect column and therefore the aura defined should be in the second applyaura column. For fireball the value in column 96 is 3, which stands for SPELL_AURA_PERIODIC_DAMAGE (http://www.pxr.dk/wowdev/wiki/index.php?title=Spell.dbc/EffectApplyAuraName) so this means periodic damage is done. Columns 98-100 handle the effect amplitude, which in this case handles the amount of time between the damage ticks, so if we look at column 99 (second column, again, same reasons as before) we see the value for fireball which is 2000, which means that periodic damage will be dealt every 2 seconds (measured in milliseconds). Now we go to the second effectbasepoints column (81) and see that the value is 1 which means 2 damage will be done every 2 seconds. But the after effect of fireball only lasts 6 seconds so this needs to defined somewhere and it is, in column 40, the durationindex column. This column points to the spellduration.dbc and for fireball has the value 32, which points to row 32 in spellduration.dbc which is 6000 a.k.a 6 seconds in milliseconds.
Now, to get back to how the target is refined, we already know it has to be a singular player/creature, but columns 86-88 handle what each effect of the spell can, well, affect. With fireball in column 86 and 87 the value is 6, which means that the effects can not be applied to the caster, in other words, the spell cannot be cast on self.


Ok, I think that's it for the basic explanations of the dbc columns, I hope you enjoyed and I hope it's not too much of a wall of text!

If you don't like it, tell me to stop and I'll stop, I don't care as long as you don't run around screaming about how inferior I am compared to your immense power etc.
If you do like it, just say thanks.

Before you think I'm wrong, bear in mind I've simplified the explanations of some things in order for easy reading.

I will update this as time progresses.
 
Last edited:

Paland

Enthusiast
Thanks for the tutorial :)
I got a question: I try to modify the %weapon damage of Chimera Shot and don't know where to do that. I had a look as you pointed out in your tutorial but it did not really help me out.
It says: 'You deal $s3%' etc. following I had a look at the 82th column where it says -1 ( http://prntscr.com/3mrmnv )
I am quite new to .dbc edits so I don't really know where to look for the 'weapon damage value' now. Would be nice if you could give me a tip where to have a look if this doesnt work.


Regards,
Paland
 

Rochet2

Moderator / Eluna Dev
Thanks for the tutorial :)
I got a question: I try to modify the %weapon damage of Chimera Shot and don't know where to do that. I had a look as you pointed out in your tutorial but it did not really help me out.
It says: 'You deal $s3%' etc. following I had a look at the 82th column where it says -1 ( http://prntscr.com/3mrmnv )
I am quite new to .dbc edits so I don't really know where to look for the 'weapon damage value' now. Would be nice if you could give me a tip where to have a look if this doesnt work.


Regards,
Paland

The guide assumes that ID is at 0 index like here:
http://www.pxr.dk/wowdev/wiki/index.php?title=Spell.dbc#3.3.5.12340

Your SS has it at index 1.
This means that column 82 is actually 81 in the SS.

The column saying 399 is the one you edit for the damage %, which apparently you have already ,.. since it was 124 at the beginning.
 

Paland

Enthusiast
Thanks a lot. I will try it out :)

Edit:
Works :) - http://prntscr.com/3mtjxj
And no I did not edit it, I became dev at a server and was confronted with these things, just need to correct them now :p

Thanks a lot.

Regards,

Paland
 
Last edited:

Paland

Enthusiast
Another thing: I tried to modify Rogues' Envenom spell (57993). In spell discription it says "Finishing move that consumes your Deadly Poison doses on the target and deals instant poison damage. Following the Envenom attack you have an additional $s3% chance to apply Deadly Poison and a $s2% increased frequency of applying Instant Poison for 1 sec plus an additional 1 sec per combo point. One dose is consumed for each combo point:
1 dose: ${($m1-1)*1+$AP*0.09} damage
2 doses: ${($m1-1)*2+$AP*0.18} damage
3 doses: ${($m1-1)*3+$AP*0.27} damage
4 doses: ${($m1-1)*4+$AP*0.36} damage
5 doses: ${($m1-1)*5+$AP*0.45} damage"

I wanted to know where to find the AP* 0.45/0.36 for each dose or how to modify it. Also what does $m1 point at? I don't know how to use the parameter atm, would be nice if somebody could explain that to me :)

Regards,
Paland.
 
Last edited:

Shard

Sexy Member
I wanted to know where to find the AP* 0.45/0.36 for each dose or how to modify it. Also what does $m1 point at? I don't know how to use the parameter atm, would be nice if somebody could explain that to me :)

Hi, sorry for my bad english & I hope I've understood your question..
So, If you want to modify damages for each dose you can edit it by DB : spell_bonus_data, DBC modding isn't needed for this spell.
Find Envenom (ID 32645) or add it if it does not exist (should exist), then try to modify value in "ap_bonus", then test it.
Hope that was what you want haha.

I will update this as time progresses.

You can add that :
column 53 --> Requiered Item, (Like [Soul Shard](6265) for Warlock spells)
column 61 --> Amount of requiered item (column 53)

Shard.
 

Paland

Enthusiast
I already did that but the damage still was too high even if I basicly set it to a bonus of 0 like 0.00000000000002 as AP bonus so I thought it might be possible to change it there too. But thanks for your reply. :)
I just got confused by some of the parameters / structure of the .dbc because I am quite new to these kind of development but I managed to get used to it (atleast a little bit :D). Thanks for your great support :)

Regards,
Paland
 
Top