Changing Attack and Movement Speeds with Items.

Level 6
Joined
Aug 12, 2007
Messages
201
What are the best way to change attack and movement speeds with items. As of right now, my Hero's attack speed is entirely dependent on the type of item he is carrying, as well as his base movement speed can increase or decrease depending on how encumbered he is.

I am just wondering the best abilities to base these changes off of, and what the unit's initial stats should be. If there is an ability that directly adds attack speed, rather then increasing it by a percent, I could simply set his attack cool down to the lowest it will ever be, such as 10, and then subtract the necessary speed depending on what he is wearing.

Alternatively, I could base a series of speed modifiers off of Endurance Aura, which I understand stacks with itself so long as I change the buff. So I could have a AS (Attack Speed) Average, AS Fast, As Slow, AS Very Slow, AS Very Fast sort of setup, and simply attach that aura to each type of item that has that speed. The only problem would be getting the correct variables for the attack speed increase for each one, like 0.8 or 1.2 and what-not, not as precise as setting the exact value.

Same with the movement speed, Could have Encumbered Light, Medium, Heavy, Completely Auras that decrease move speed on Self by the necessary percent, as I have edited game constants to allow for slowed to 0%.

What do you think is the most viable option for this sort of endeavor?
 

Dr Super Good

Spell Reviewer
Level 62
Joined
Jan 18, 2005
Messages
26,970
Movement speed can be alterd via triggers. Otherwise base the ability off the shoe item ability.

Attack rate has to be altered via a spell like gloves of attack speed or endurance aura.

Speed is capped between 0 and 522 atmost otherwise it uses the gameplay constants settings.

Faster attack rate is capped between -80% and +400% and there is no way to alter the base short of upgrades which are permant. FAR directly multiplies the DPS output of a unit. Thus -80% FAR will lower damage output by 80% while +400% FAR will add 400% more DPS output.

Its low bound is capped at 0.01 odd more than the damage point time.

Thus your FAR system just has to values in the range of -80% to 400% as any values outside have no effect.
 
Level 6
Joined
Aug 12, 2007
Messages
201
I can't seem to find this Shoe item ability, it is just straight up 'Shoe' or is it 'Item Shoe', or rather did you mean the ability that is on Boots of Speed which is 'Item Move Speed Bonus' I think I tried using that one before but it didn't take negative values when you held shift to put a negative, it let me place the value but in game it had no effect on the move speed.

Yeah though, 'Item Attack Speed Bonus' and 'Endurance Aura' alter attack speeds, but by percents like 0.15. I guess it would just take some testing to get it down to the proper values that would correspond to Very Slow, Slow, etc. You're saying I can't make it go any less then -0.8 or a value greater then 4.0 though? Also if I used Item Attack Speed Bonus, would it stack with other Item Attack Speed Bonuses that were decreasing the value, say if you had a shield that reduces attack speed while held, and the sword is increasing attack speed while held, does it do the math or just pick one?

EDIT: A quick test tells me Gloves of Haste stack with each other, while Boots of Speed to not. I also discovered that it doesn't actually reduce or increase the attack speed the way I had hoped for. It's making him literally slower, as in the animations is long and drawn out when speed is greatly reduced, I was hoping for an extended cool down time between strikes rather then an unrealistic, drawn out attack.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 62
Joined
Jan 18, 2005
Messages
26,970
Output value in object editor form for unit attack rate = The value given in object editor / (1+FAR (%/100)) .
Thus a unit attacking with an attack rate of 1 (1 second per shot) with 50% FAR.
1/(1+0.5)
= 1/1.5
= 0.6667 is the output attack rate in cooldown (seconds per shot).

Note that it can not be less than the damagepoint + a constant (I think 0.0101 or something, check an older post of mine).

Also note that the reason for the -80% cap is obvious, if it had no cap, at -100% you would get a division by 0 error and values which make no sense and so cause instabilities and exceptions in the engine. Thus the -80% cap, which incidently is 400% more time per shot while +400% cap is 400% more shots per second Symatry was the reason these divisions were choosen.

You can change movement speed via triggers, look into using that as an alternative if the abilities give you problems.
 
Level 6
Joined
Aug 12, 2007
Messages
201
I might just have to resort to triggers in the end, it'll be tedious but it will be more reliable and accurate in the end. So long as I keep it to a select few different attack speeds, I can condition them to check for any item that would have that attack speed in the inventory and then set the necessary value. How do I output the attack rate value and do all these setting modifications though? Can that be done with GUI or do I need to call JASS functions?

EDIT: Still no luck finding anything to do with the attack cooldown rate, though I did find animation speeds, but they didn't seem to work properly, and I also thought about having an Endurance Aura with multiple levels which I could trigger to set it to a certain level, with each level corresponding to a certain attack speed value.
 
Last edited:
Top