HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question About Attack Speed Formula

09-15-2007, 01:39 AM#1
PandaMine
Since I am doing a custom attack system, I have one quick question. Basically here is the formula for IAS

Quote:
Attack Speed Bonus % Formula: The formula to determine how fast a unit attacks when its attack speed is increased by an IAS (increased attack speed bonus) percent is BaseAttackSpeed/(1+IAS*0.01).
--> BaseAttackSpeed is the unit base attack speed cooldown.
--> IAS is expressed in decimal form; 369% IAS = 3.69.

I just have one simple question, if you have for example 2 gloves of haste (15% each), does the percentage stack directly so the formula will be

Quote:
BaseAttackSpeed(1 + 0.3 * 0.01)

or is it done differently?
09-15-2007, 01:58 AM#2
TaintedReality
Yes, attack speed is added directly. Here's a bunch of that kind of info:

http://www.gamefaqs.com/computer/dos...e/589475/28855
09-15-2007, 05:32 AM#3
PandaMine
Thanks heaps
09-15-2007, 10:32 AM#4
Pheonix-IV
I'm fairly sure the IAS %'s are all done based on the current attack speed. So if i have a unit with 2.0 attack speed and i give him 10% IAS, his attack speed drops by 10% (0.2) to 1.8, if i add another 10% IAS he gets 10% of 1.8 (.18) taken off, so it becomes 1.72, and so on.
(Note: The above formula is not how WCIII works out IAS, i used it as an example. The correct formula for the 10% is Base Attack Speed * (100\(100 + 10)))

EX: Get our unit with 2.0 speed again. Apply said 10% IAS. 2.0 * (100\(100 + 10)) = 2.0 * 0.9 = 1.8

See how it works?
Yes, this means diminishing returns, which is how just about every % thing in WCIII works.


Oh yes, and the order is:

Base Attack Speed
Agility Speed Bonus
Passive Abilities Speed Bonus
Aura Bonus*
Item Bonus*

The speed %'s are applied in that order, the only exception are the Aura and Item bonuses, which are applied in the order at which they are given to the unit.

EX: If i have a TC and he gets level 1 endurance aura (10% i think) and then picks up Gloves of Haste for 15%, the Endurance Aura's 10% is applied FIRST, and the Gloves of Haste SECOND.

If, however, he picks up the GoH and then learns Endur Aura, the 15% from the GoH is FIRST and the 10% from the Endur Aura is SECOND.


Oddly enough this does NOT apply for dynamically given abilities. If i give a unit an ability based on Gloves of Haste, it immediately places itself underneath all item and aura speed bonuses. Weird huh?

--EDIT--

Oh, i didn't notice that guide. He does get armour wrong but the rest is good.
09-15-2007, 01:42 PM#5
Anitarf
Are you sure that's how it works? As far as I know all the attack speed bonus percents first add up and then the unit's cooldown is modified by that formula.
09-15-2007, 03:40 PM#6
Fireeye
Phoenix, i'm sorry to tell you, but you made a little calculation error in this part:
2.0 * (100\(100 + 100) = 2.0 * 2 = 4.0
It should be
2.0*(100/(100+100) = 2*(100/200) = 200/200 = 1

I personally use this formula due it's a bit easier to read in my opinion.
f(x) = (base aspd * 100)/(100 + bonus in %)
If you want to use decimals the formula becomes even shorter:
f(x) = base aspd / (1 + bonus in decimal)

However i made a few tests some time ago (well around 4 - 5 months ago) with the attack speeds and the bonus only adds up, no complicate formula or multiplication also it doesn't matter if the bonus is applied through items, stats, active or passive abilities.
09-16-2007, 01:37 AM#7
Pheonix-IV
Whoops, i forgot to remove that part from the post. I actually rewrote it when i realise i'd fucked it up.


I worked out the order thing when i was using units with a 10 second cooldown and increasing their attack speed with large % modifyers. I was trying to work out why units recieved a much larger increase to speed when they just picked up the 100% buff and then the 10% item than if they got the 10% item and then the 100% buff.
09-16-2007, 02:10 AM#8
Anitarf
Actualy, either if bonuses are added together or if they're applied in multiple steps, the order doesn't matter. The final cooldown would be (base cooldown/(1+bonus1+bonus2+bonus3)) if they add up or (base cooldown/((1+bonus1)*(1+bonus2)*(1+bonus3)))) if they multiply, the result isn't changed if you switch bonus1 and bonus2 for example.
09-16-2007, 05:11 AM#9
Pheonix-IV
They multiply on top of each other, hence the diminishing returns, and hence why the dudes who picked up the 100% and then the 10% were attacking faster than the ones who got the 50% and then the 60%, despite having identical cooldowns.