Page 1 of 2

Damage over time spells

Posted: Tue Jan 12, 2016 7:39 am
by Faux
A question for you experts.

When you cast a damage over time spell in Vanguard, did it do immediate damage? Take a necro spell for instance:

Devouring shadows I:

Shadows slowly consume your opponent's life force, dealing #18#1131-1193# damage over 60 sec and transferring half of the life to you.


Unmodified, it does 75-80 damage per tick for 60 seconds. Would you cast that spell and see 75-80 damage immediately or would the damage not start to appear until the first tick interval (4 seconds for necro spells)?

Worded another way, which set of the below intervals would you see damage?

0 4 8 12 16 20 24 28 32 36 40 44 48 52 56

or

4 8 12 16 20 24 28 32 36 40 44 48 52 56 60


The counter example would be:

Sealed Fate I:

Condemns an opponent dealing damage to them in 3 waves. The first wave deals #14#185-197# physical damage instantly, the second deals #14#2184-2300# over 60 sec, and the third deals #14#3550-3736# over 10 minutes.

This DoT specifically states it deals damage immediately and then has 2 separate waves of ticking damage.

Re: Damage over time spells

Posted: Tue Jan 12, 2016 11:51 am
by Ily
No idea about VsH but any MMO I have ever played or pen and paper game the DoT always does the starting tick damage as soon as it is landed. Even progressive curve DoTs worked this way, initial tick was very little damage but then it ramped up.

Re: Damage over time spells

Posted: Tue Jan 12, 2016 11:57 am
by Xinux
Yea Ily is right and i know i made a post about that here somewhere. It does a initial tick damage when it lands on the target.

Re: Damage over time spells

Posted: Tue Jan 12, 2016 12:01 pm
by Faux
Ok. I play a necro in EQ and it definitely does not work like that, but EQ does synchronized DoT ticks, so all DoTs start on the next tick.

I found a necro video and you guys are right, it does the initial tick immediately.

Re: Damage over time spells

Posted: Tue Jan 12, 2016 12:25 pm
by Jakkal
I gave John a bunch of combat logs, the rogue has lots of DOTS, I imagine looking at those would give you some answers. But I'm pretty sure they did the initial damage as soon as the spell/attack landed and started ticking from there.

Re: Damage over time spells

Posted: Wed Jan 13, 2016 7:48 am
by John Adams
Faux, I had a bolt-of-lightning moment about this. Rather than change your Tick start, why don't we just do the initial round of damage for the DoT in the function cast()? I believe that's how I was scripting them anyway, to do the first dot damage, then the tick would take over to finish the rest.

Re: Damage over time spells

Posted: Wed Jan 13, 2016 8:28 am
by Faux
[quote="John Adams"]Faux, I had a bolt-of-lightning moment about this. Rather than change your Tick start, why don't we just do the initial round of damage for the DoT in the function cast()? I believe that's how I was scripting them anyway, to do the first dot damage, then the tick would take over to finish the rest.[/quote]

Thats what I am doing John. With a duration of 60 seconds and a frequency of 4 seconds, The ticks run for 15 ticks from 4-60s. The 0s damage is done in cast. And I'm actually using 16 as the number of ticks for damage distribution since we are starting at 0.

I need to get debug working again so that I can find the current crash. I'll send you a PM about it shortly.

Re: Damage over time spells

Posted: Wed Jan 13, 2016 1:22 pm
by John Adams
Oh, I think my (new) issue then is that SpellDamage (if in the function cast()) is not generating aggro. Only when the first tick landed did the mob come at me.

Re: Damage over time spells

Posted: Wed Jan 13, 2016 2:32 pm
by Faux
I haven't committed that change yet, but it definitely generates agro locally by doing the first tick within the cast function. Need to find the crash before I commit it

Re: Damage over time spells

Posted: Wed Jan 13, 2016 2:45 pm
by John Adams
Well this:

Code: Select all

function cast(Caster, dmgType, dmgMin, dmgMax)
    SpellDamage(Caster, dmgType, 0)
end
is not going to do anything. dmgMin of 0 is not going to generate aggro.

When I say do the initial damage in cast, I mean the first mathematical split of the total / frequency, since the start of frequency should be the exact instant of casting (not 4 seconds later).

Code: Select all

function cast(Caster, dmgType, dmgMin, dmgMax)
    dmgMin = math.floor((dmgMin / ticks) + 0.5)
    dmgMax = math.floor((dmgMax / ticks) + 0.5)
    SpellDamage(Caster, dmgType, dmgMin, dmgMax)
end
And, all functions in the Spell Script should be receiving the exact same parameters, regardless of if cast uses "ticks" or not. Not really sure yet why you are passing "ticks" anyway, that should all be in c++ - meaning each min/max damage sent to function tick() should be calculated in code, not in Lua. Lua scripter should just pass SpellDamage(Caster, dmgType, dmgMin, dmgMax) then, without having to do math.