Attack speed, animations, and agility

Curo

Why am I still playing this game...?
Reaction score
109
So I did some searching and found a few threads about achieving maximum attack speed. That's not my goal though. I would like to know exactly how the following values work and determine real attack cooldown, or time between attacks:

Animation Backswing Point
Animation Damage Point
Cooldown Time


I know that the backswing point represents half of the attack animation being completed, and the damage point is the other half.

How exactly does a unit go about executing these times? For instance, assume the following values:

Animation Backswing Point - 0.850
Animation Damage Point - 0.550
Cooldown Time - 2.13

Now this is the order in which I think things unfold, but I want to be clarified on this:

1) 0.000 elapsed - Unit begins performing Backswing animation.
2) 0.850 elapsed - Unit reaches halfway point in the animation. This is where the damage is dealt, and the damage point half of the animation begins.
3) 1.400 elapsed - The entire animation has completed and the cooldown now begins.
4) 3.530 elapsed - The entire cooldown time has elapsed, and the unit begins the attack animation again, starting from step 1.

The reason I am so curious about this is because I want to make sure my heroes don't reach too fast of an attack speed (to maintain balance). I first tried doing this by changing the attack speed bonus per agility point to 1% (instead of the default 2%), but this resulted in my heroes having too slow of an attack speed. Since I can't set the bonus to 1.5%, I figured I would target the problem heroes that gain a lot of agility, and cap their attack speed through the use of animations. That way there will be a constant attack speed reduction (in the form of an animation), yet they still start off with a decent attack speed (in the form of cooldown time).

But in order to do this, I need to know exactly how the real time between attacks is calculated.

I would appreciate some intellectual and experienced responses to this, rather than comments like "why don't you just decrease the amount of agility your heroes gain?". For anyone curious, the answer to that is that my main problem comes from items that give stat bonuses (it's my controlled alternative to stat tomes).
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
I don't think anyone really knows how the calculation is made. My understanding, though, is that the Damage Point is a delay between the initiation of an attack and its completion, the Backswing Point is time after the Damage Point before the cooldown, and the cooldown is after the entire attack process before another attack can be initiated.

Try setting those values to very high numbers, one by one, and see how they scale with attack speed bonuses - that's the best thing I can suggest.

BTW, another approach would be to give each hero an invisible negative attack speed item ability by default, to slow them down.
 

Curo

Why am I still playing this game...?
Reaction score
109
I don't think anyone really knows how the calculation is made. My understanding, though, is that the Damage Point is a delay between the initiation of an attack and its completion, the Backswing Point is time after the Damage Point before the cooldown, and the cooldown is after the entire attack process before another attack can be initiated.

Try setting those values to very high numbers, one by one, and see how they scale with attack speed bonuses - that's the best thing I can suggest.

BTW, another approach would be to give each hero an invisible negative attack speed item ability by default, to slow them down.

I'm pretty sure I read in a tutorial that backswing comes first. After all it is the action of, if you will, raising your sword/arm to swing at something. This would be followed by impact, then possibly an afterswing, logically. Blizzard's terminology can be confusing.

Interesting idea on the item ability. However, it's not a problem for me to slow them down at the start. What I need is to have them slowed once they reach max speed, and such a slow item would just be overcome by additional agility. I want to lower the max speed, which I think can be done by altering the animations.

I'll probably end up doing as you said, and setting each value to a high number individually to see what happens. Even then my results may be skewed, which is why I had hoped a professional editor had done something previously that may help me. The knowledge in these guys heads - you can't imagine :p
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
I have played around with attacks but I haven't see a case that "Backswing" comes first. I just think that when the attackee is behind the attacker, "Backswing" will comes instead of "Damage Point", but it's NOT.

how do I test this ? simple, I created three trigger:
  • Trigger1: when unit A attacks unit B, set an integer I to 0, turn on trigger2.
  • Trigger2: every 0.01s, increases I by 1
  • Trigger3: when unit B takes damage (of course it's damage from unit A's attack), display I

calculation for the increase/decrease of "Animation Damage Point" and "Attack Cooldown" with Attack Speed:

<base> / (1 + Attack Speed / 100 )

so, with this:
Animation Backswing Point - 0.850
Animation Damage Point - 0.550
Cooldown Time - 2.13

  1. 0.000 elapsed - Unit begins performing Backswing animation.
  2. 0.550 elapsed - Unit reaches "damage point" in the animation. This is where the damage is dealt. The cooldown of the attack will begin for (Cooldown Time - Animation Damage Point)
  3. 2.130 elapsed - The entire cooldown time has elapsed, and the unit begins the attack animation again, starting from step 1.

p.s: Attack Speed maximum is 400% and minimum is -80%
 

Curo

Why am I still playing this game...?
Reaction score
109
  1. 0.000 elapsed - Unit begins performing Backswing animation.
  2. 0.550 elapsed - Unit reaches "damage point" in the animation. This is where the damage is dealt. The cooldown of the attack will begin for (Cooldown Time - Animation Damage Point)
  3. 2.130 elapsed - The entire cooldown time has elapsed, and the unit begins the attack animation again, starting from step 1.

First off, shouldn't your 3rd point there be 2.680 (0.550 + 2.130)? What you are saying is that the cooldown begins as soon as the backswing animation begins, which would mean animation has nothing to do with time between attacks (which is wrong).

I found this, taken from the world editor tutorials site:

Combat - Attack x - Animation Backswing Point (Real)
The amount of time it takes a unit/building/hero to go through half the physical movement necessary to attack something.... This field combines additively with "Combat - Attack x - Animation Damage Point" to form the total time taken to physically attack a target.

Combat - Attack x - Animation Damage Point (Real)
The amount of time it takes a unit/building/hero to go through half the physical movement necessary to attack something.... This field combines additively with "Combat - Attack x - Animation Backswing Point" to form the total time taken to physically attack a target.

According to this tutorial the "damage point" is the point at which half the attack animation has completed (I am assuming this is where damage is done). Now, the other half of the animation has to complete. I know players in games such as dota move their hero slightly after dealing damage in order to cut off the damage point animation, so that their attack cools down faster. This leads me to think that the cooldown begins at the damage point, so it should go:

  1. 0.000 elapsed - Unit begins performing Backswing animation.
  2. 0.550 elapsed - Unit reaches "damage point" in the animation. This is where the damage is dealt. The cooldown time of the attack (2.130) will begin.
  3. 2.680 elapsed - The entire cooldown time has elapsed, and the unit begins the attack animation again, starting from step 1.

So cumulatively, the entire cooldown time would be the backswing animation + cooldown time.

calculation for the increase/decrease of "Animation Damage Point" and "Attack Cooldown" with Attack Speed:

<base> / (1 + Attack Speed / 100 )

How do you define "Base" and "Attack Speed" here? And are you saying that the animation scales directly with the cooldown time? Sorry I'm a little confused here, can we just use terms used in the object editor please? I'm guessing "attack speed" refers to any percent bonuses gained through agility and abilities. So then is "base" the attack cooldown time, or does it involve the animations as well? This leads back to my original question of how do animations factor into overall attack cooldown.
 
Reaction score
107
First off, shouldn't your 3rd point there be 2.680 (0.550 + 2.130)? What you are saying is that the cooldown begins as soon as the backswing animation begins, which would mean animation has nothing to do with time between attacks (which is wrong).

I found this, taken from the world editor tutorials site:

According to this tutorial the "damage point" is the point at which half the attack animation has completed (I am assuming this is where damage is done). Now, the other half of the animation has to complete. I know players in games such as dota move their hero slightly after dealing damage in order to cut off the damage point animation, so that their attack cools down faster. This leads me to think that the cooldown begins at the damage point, so it should go:

  1. 0.000 elapsed - Unit begins performing Backswing animation.
  2. 0.550 elapsed - Unit reaches "damage point" in the animation. This is where the damage is dealt. The cooldown time of the attack (2.130) will begin.
  3. 2.680 elapsed - The entire cooldown time has elapsed, and the unit begins the attack animation again, starting from step 1.

So cumulatively, the entire cooldown time would be the backswing animation + cooldown time.

I'm fairly sure that animation is independent to cooldown, in the way that, attack speed is restricted by the backswing value.
With your given values, try changing the attack cooldown to 0.01 and test it, watch the attack speed of the unit, then go back and change the damage point and backswing point both to 0 and see the difference.
So in that way, in the above example the cooldown would start at time = 0s
and won't add cumilatively.

Also about your dota reference the reason people move their hero straight after the dealing damage is to cut off the backswing animation, as it is essentially a waste of time having your hero just standing there finishing the animation and not anything to do with having a faster attack cooldown. I think this would be most evident with CM's casting animation and perhaps to a lesser degree her attack animation.

How do you define "Base" and "Attack Speed" here? And are you saying that the animation scales directly with the cooldown time? Sorry I'm a little confused here, can we just use terms used in the object editor please? I'm guessing "attack speed" refers to any percent bonuses gained through agility and abilities. So then is "base" the attack cooldown time, or does it involve the animations as well? This leads back to my original question of how do animations factor into overall attack cooldown.

I believe base is the cooldown, while attack speed is the bonus attack speed percentage from all sources ie. agility/items/abilities etc. I also remember reading somewhere that the given formula applies for positive values only, so negative bonuses would react differently.
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
@Curo, sorry for being unclear, it's like baka-ranger said but the negative is like that, not different.

the thing that have a difference between positive and negative calculation is damage reduction of armor.
---
and, things I said above is what I got from actual test, if it's not right so, well, it doesn't matter to me :p
 

Curo

Why am I still playing this game...?
Reaction score
109
Thank you for the input so far.

Any more opinions?
 

Curo

Why am I still playing this game...?
Reaction score
109
Ok so I did a little testing, and here's what I found:

  1. Damage is done at the damage point. So, if the damage point is 2.000, damage will be dealt at 2.000, regardless of other values.
  2. If the cooldown time is > the damage point, the time in between attacks will = cooldown time. So, if cooldown time = 2.000, an attack will be initiated every 2.000 sec.
  3. If the cooldown time is < the damage point, the damage point will act as the cooldown. This means that if damage point = 2.000 and cooldown time = 1.000, there will be 2.000 in between each attack.
  4. Backswing animation seems to be irrelevant.

Conclusions:
If cooldown time = 2.000 and damage point = 1.000, the damage will be dealt 1 second into the attack, and it will take 1 second after the damage is dealt for a new attack to initiate (2 sec cd - 1 sec dmg point), meaning it will be 2 sec after the initial damage is dealt before damage is dealt again. So, the first damage will be dealt after 1 sec, the second damage dealt after 3 sec, 3rd after 5 sec, etc.

Maximum attack speed can be limited by setting the damage point to the desired minimum attack speed.

None of these values stack cumulatively. Damage point merely determines at which point during the attack the damage is dealt. Real cooldown time is determined by the larger of the "cooldown time" and "damage point" values.

Disclaimer:
With further testing, some of these conclusions were found to be wrong. Please read the rest of the thread.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Good research. :thup: So, the tutorial was incorrect after all?
 

Curo

Why am I still playing this game...?
Reaction score
109
Good research. :thup: So, the tutorial was incorrect after all?

Highly. Perhaps Tom is right and backswing has something to do with when the target is behind the attacker, but I haven't looked into this, nor do I intend to. I've found what I was looking for :)

Edit:
I should clarify that the tutorial wasn't wrong per say, but it was incomplete. There isn't a tutorial yet that gives a complete description of how this stuff works, so I'm continuing my research.
 

Curo

Why am I still playing this game...?
Reaction score
109
So I did a little extra testing. My previous testing was just with regular units, so this time I tried using heroes. It seems that as your attack speed/agility increases, the damage point decreases as well as the cooldown. So, my original hypothesis of being able to cap attack speed using the damage point animation was incorrect.

I also found that although having a damage point larger than the cooldown time causes the unit to wait longer (than the cooldown) between attacks, stopping the damage point animation by moving the hero slightly (like they do in dota) will finish the damage point animation, making it ready to attack again (cooldown permitting). So, if my cooldown is 1 sec, and my damage point is 4 sec, my unit will wait 4 seconds in between attacks. However, if I move my unit right after the damage is dealt, it will only have to wait the cooldown time (1 sec), not the full damage point time (4 sec). I'm not sure how this applies if the damage point is shorter than the cooldown, as it usually is, since regardless of the animation, the unit still needs to wait the cooldown time before attacking again.

I'm still trying to figure where backswing animation fits into this all....

A little extra:
Given 4 similar heroes, where the only things that differ are the 3 values in question, I found the following, where damage point = DP, and cooldown time = CD:
  • Hero A: DP = 2, CD = 2
  • Hero B: DP = 2, CD = 1
  • Hero C: DP = 1, CD = 2
  • Hero D: DP = 1, CD = 1
Heroes A, B, and C all attacked at the same rate. Hero D attacked twice as fast as any of the other heroes. The attack speed ratio remained the same as agility amount was changed (whether agi = 0 or 100, Hero D still attacked twice as fast as the other 3 heroes).

Pay close attention to Heroes B and D. While the effect is not as I originally thought, increasing the damage point can limit the attack speed cap of the hero. However this is not a hard cap, but rather it scales with attack speed bonuses. So while setting the DP to 2 sec will not cap my attack speed at 2 sec, it will increase my overall cooldown when compared to a unit with the same cooldown, but a longer DP. Again, this is due to damage point acting as cooldown time if it is larger than the cooldown time. The only difference between capping attack speed through CD and DP is that DP can be cut off by canceling the attack animation, allowing for another attack to be initiated sooner. Of course this matters very little if DP < the time it takes to cancel the animation (through a small movement of the unit).

Now the question is whether or not I will find the same result when the heroes have, respectively, DP = 2, CD = 3 and DP = 1, CD = 3.

The Answer:
So here I am answering the above question. For comparison purposes, I have eliminated the variable of backswing, and set it to 0 sec.
  • Hero A: DP = 1, CD = 3
  • Hero B: DP = 2, CD = 3
The only thing I found here was that with the smaller DP, the damage is done sooner in the attack (1 sec into the attack versus 2 sec into the attack). The actual time between attacks/damage remains 3 in both scenarios. Now 100 agility is added. Again, Hero A deals damage sooner, but the time between attacks/damage is still the same with both heroes. So, it can be said that DP only puts a cap on overall attack speed when it is larger than the CD. Even with the introduction of a Hero C with DP = 3, CD = 3, I still found the same effect: to have an attack speed cap in place, DP > CD. If DP < CD or DP = CD, no attack speed cap will be placed by the DP.

For those curious, a hero with a 3 second cooldown time, and 100 agility (+200% speed) will attack once every second. In my experiment, even if DP < 1 sec, there was no change to the outcome.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top