• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Change base attack speed with items

Level 12
Joined
Feb 5, 2018
Messages
521
If you mean attack cooldown then you need to trigger it. Base attack speed can be done as explained above by Nichilius.

Also you can in theory calculate the attack cooldown via attack speed. Let's say if you use a 2.00 base cooldown speed and modify it with attack speed, should be easy enough to achieve what you want.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
Micca is referring to Attack Base Cooldown which is a unit's baseline for it's "time between attacks". This stat gets modified by increases and reductions to Attack Speed in order to calculate the final time. You can change it in 1.31+ using this Action:
  • Unit - Set Unit: (Triggering unit)'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 1.00
Of course you'll need to manage it with triggers when an item is acquired + and lost -. Index 0 should represent Weapon 1 and Index 1 should represent Weapon 2, but if it doesn't work then try increasing the Index by 1.

To further explain the math, Gloves of Haste does not directly modify the Attack Base Cooldown. Instead, it increases the unit's "Attack Speed" stat by 15 (technically by 0.15). These increases, or reductions if say a Slow debuff is applied, are then used in the following formula to calculate the time between attacks:

Time Between Attacks = Attack Base Cooldown / 1 + Increased attack speed

So assuming a Hero has a Attack Base Cooldown of 2.00 seconds and has 1 Gloves of Haste equipped and we're ignoring all other sources of Attack Speed then it's final attack cooldown would amount to:

2.00 / 1.15 = 1.73 seconds between attacks
 
Last edited:
Top