Attack Speed

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Attack Speed

Post by Ozzapoo »

Hi! is there any way to get the attack speed of a unit in Jass? (Or GUI)
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Attack Speed

Post by Aero »

No.
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Attack Speed

Post by Ozzapoo »

Ah damnit >.<
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Attack Speed

Post by Aero »

You can sort of backdoor it.

First things first though...a unit's attack speed limit can be no faster than the backswing point (an Animation property which you can change).

Otherwise the attack speed is equal to the unit's base attack speed + an additional (2% attack speed/point of agility <-- This is a constant you can EDIT) + attack speed bonuses (Abilities or items) up to a maximum of 500%.

[Wait for an edit - Will do testing]

Did some thorough tested and have found out how to calculate attack speed and max attack speed.
Test values used:
Animation Backswing Point - 0.000
Animation Damage Point - 0.000
Range - 0.000
Range Motion Buffer - 0.000
Gameplay Constant: Attack Speed Bonus / Point of agility = 1%
Base Attack Speed - 4.000 seconds and 1.000 seconds
Other Attack Speed Modifiers Used - Gloves of Haste; Bloodlust

Conclusions:
-Attack speed bonuses NEVER stack, they add (10% + 15% + 20% = 45% bonus; it does not equal a 10%*15%*20% = 51.8% bonus)
-Attack speed DEBUFFS also DO NOT STACK and subtract linearly. (15% gloves of haste + -25% slow = -10% bonus)
-Attack speeds come in static multiples of 1/32 of a second (0.03125 seconds).
-MINIMUM BASE ATTACK SPEED is .125 seconds, setting it lower will bump it to said attack speed. It can be increased up to .03125 second through the use of attack speed increase buffs or abilities and agility.

To find attack speed, you do the following:

Take base attack speed.
We'll call this the Base.

Next, find the Attack Speed Bonus using the below formula.
(1 + Hero's agility * (% attack speed bonus / point of agility) + any other attack speed bonuses from items or abilities).

Attack speed = (Base / Attack Speed Bonus) rounded up to the nearest 1/32 of a second.
EX 1: 1.000 seconds is a multiple of 0.03125 seconds. If you have 0 agility and no attack speed bonus (100% of normal attack speed), you will get (1.000 seconds / 100%) = 1.000 seconds. BUT! Even though 1.000 seconds is a multiple of 1/32 of a second, you still round up to nearest 1/32. So it would become 1.03125 seconds = your attack speed. If you however had 1 point of agility, it would be (1.000 seconds / 101%) which rounded up would be 1.000 seconds.
EX 2: 2.56 seconds = base attack speed. You have 25 agility (1% attack speed per point of agility), 15% gloves of haste and bloodlust (40%).
Attack speed = (2.56 / 1+.25+.15+.4) = (2.56 / 1.8) = 1.4222222 = (Rounded up to nearest 1/32...) = 1.4375 seconds.

What does all this mean?

Well, for starters, it means that even though the max attack speed bonus is 500%, you don't need all of the 500% bonus to cap your max attack speed.
Example 1: If your base attack speed is 4.000 seconds, your max attack speed is .8125 seconds (492.31%) which will be at 393 agility at 1%/point of agility
Example 2: If your base attack speed is 1.000 seconds, your max attack speed is 0.21875 seconds (457.14%) which will be at 358 agility at 1%/point of agility

It also means that most DPS calculations are INACCURATE!
It also means that the minimum attack speed is 1/32 of a second (.03125 seconds) which means attack speeds less than that are rounded up to it.

So, next time you're playing a TD and you're wondering which to don't click me...

25 damage / 0.03 seconds <-- 300 gold, super tower
20 damage / 0.01 seconds <-- 650 gold, ultimate tower

Guess what...the super tower is better dps.

Attack Speed Calculator
attackspeed.xls
You do not have the required permissions to view the files attached to this post.
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Attack Speed

Post by Ozzapoo »

So...Any way to do this in jass? =\
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Attack Speed

Post by Aero »

Yes, if you know the base attack speed and the hero's agility.
You would also need to find a way to check for attack speed buffs.

It's all doable (Formulas are on spreadsheet).
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Attack Speed

Post by Ozzapoo »

Hm.. I see. Thanks for the info! :D
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Attack Speed

Post by initialD »

If anyone has made it in JASS.
Please share it to me, ok?
I would like to have a
-add attak speed cheat.

btw, even though it could be backdoored through JASS. It still need to add one more ability to the map, right?

yeap.
THanks.
iWon
Newcomer
Posts: 13
Joined: June 30th, 2008, 9:43 am

Re: Attack Speed

Post by iWon »

I would also be happy if someone could do a attack-speed cheat =)
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Attack Speed

Post by Ozzapoo »

Don't bump old topics...Closed.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!