[General] fixed attack rate

Level 9
Joined
Dec 12, 2007
Messages
489
hello...
I've been searching for a bit, both from forum posts and tutorials on the web, and so far, none have discussed about this for wc3, most just discuss about maximum attack speed :(.

I'm interested in replicating the attack speed mechanic of Jhin, a champion of LoL into Wc3.

for those unfamiliar with LoL, here's a link with description of that specific champion (see the Whisper passive).

basically, Jhin's attack mechanic is:
1. he has a fixed attack rate (naturally didn't gain attack speed through buff or item).
2. attack speed bonus and crit chance will increases its attack damage
3. he has a fixed amount of ammo which needs to be reloaded before be able to attack again.

now,

I understand that replicating (2) is almost impossible though so,
I'm interested to replicate the (1) and (3) only from list above.
I already have a concept to replicate point (3), but currently stuck on replicating (1).

the condition:
- the unit is a ranged Hero

so far, my approach includes:
- disable attack speed gain from Agility (gameplay constant) or set Agi to 1/Agi gain to 0.
- removes attack speed buff/debuff from spells when applied to the Hero
- set the attack backswing to desired number.

now, the problem:
P1. I can't prevent attack speed gain/loss from aura
P2. I can't prevent attack speed gain/loss from item

for P1,
a. my only solution for now was to trigger all attack speed aura so it specifically excludes the unit type

for P2,
b. I'm thinking about swapping attack speed item acquired with non attack speed item, or
c. not include any attack speed item in the game

solution (a) and (b) was too map specific and will actually require too much work :(,
while solution (c) was a bit exaggerated and I myself want to avoid it.

so, any input or did anyone has actually attempted this and can/willing to point me to the right direction?
 
Last edited:
Level 3
Joined
Jul 2, 2014
Messages
45
I'd suggest you experiment with BlzSetUnitAttackCooldown(unit u, real interval, integer attackindex), perhaps when applied it skips any attack speed gain, for instance you set it to 1.5 (1 attack every 1.5 second), give an attack speed bonus (whatever the source) and try to reply BlzSetUnitAttackCooldown() to 1.5 interval, see if it goes back to 1.5 or is increased by attack speed ?
 
Level 5
Joined
May 12, 2014
Messages
133
I can think of a way to emulate the fixed attack rate. Using channel with the id set to "attack". So whenever the unit attacks a target they default to using the spell instead.

This might not help much since casting a spell means the unit isnt actually attacking, so things like lifesteal and bonus damage are tricky. But it does basically ignore attack speed modifications. The spell can also be briefly disabled after 4 attacks ("spell casts") to emulate "reloading".
 
Level 34
Joined
Feb 27, 2007
Messages
4,604
I can think of a way to emulate the fixed attack rate. Using channel with the id set to "attack". So whenever the unit attacks a target they default to using the spell instead.
If the unit is idling and a hostile unit comes within its acquisition range, the unit will not be 'ordered' to attack the invader, it will just acquire the target and begin making attacks. In this instance the attack skill would never fire.
 
Level 5
Joined
May 12, 2014
Messages
133
That's when you use the same fix as the OoL trick. When the unit acquired a target order to attack.

In theory it should work. Though having a cooldown on channel might mess with things. Not too sure.
 
Top