- Joined
- Mar 13, 2020
- Messages
- 421
the Real ISX1 dont work well... not even in Gui some Real Fields are Broken like Fan of Knives EFK1... and and and
Doesn't this accomplish exactly what you had in mind? Also you have to do the -1 thing because weapon indexes start at 0, let's just say blizzard is dumb.
Melee Initialization
Events
Map initialization
Conditions
Actions
Unit - Set Attack Interval of Footman 0001 <gen> to 0.01 for weapon index: (1 - 1)
Note: Max hits per second is 60.
Yeah that won't help me since it will affect only attack cooldown and wont slow down attack animations ... for example when u set cooldown to 10 seconds, unit will make attack at normal speed and then just keep standing on the spot like an idiot doin nothing. When units are affected by attack speed buffs like bloodlust or auras like endurance they will attack faster means, lower cooldown but faster attack animations as well. When on the other hand they got buff which slowing their attack speed they will play their attack animations slower, its a shame we still don't have natives to handle this stat properly, since only thing u can do in unit data is edit run / walk speed animations and attack cooldown/backswing point which only defines time of damage event during attack animation.Doesn't this accomplish exactly what you had in mind? Also you have to do the -1 thing because weapon indexes start at 0, let's just say blizzard is dumb.
Melee Initialization
Events
Map initialization
Conditions
Actions
Unit - Set Attack Interval of Footman 0001 <gen> to 0.01 for weapon index: (1 - 1)
Note: Max hits per second is 60.
Yeah agility would probably be able to do the trick as long as its possible to have negative values of agility on hero which will have negative impact on attack speed. I am using agility as crit rate as well atm, but that can be easily reworked by editing several functions. But it won't solve attack speed problems on units anyways only for heroes and i clearly do not want every unit on the map to be a hero.Uncle found out that Blademasters Bladestorm damage Real "OWW1" can be fixed by
Incrase the Ability level
and Decrase the Ability level
after you set the Damage sounds weird but it fixed the Real Field for "OWW1" maybe some others need a Simular Trick to get them to work and its a much of a research to find out...
btw if you use a Custom Stat system like me and i think you do... cuz i saw your custom UI maybe just use agility? as Attackspeed Modifyier and set 1 Point to 1% that would fix your problem...
i use Agility as Crit/Spellcrit for each 1 Point you get 1% of Crit/Spellcrit... so that would be a solution too...
Okay man this one worked... that basically means BlzSetAbilityRealLevelField() function works, it will change ability data for unit, but it won't recalculate this changed data on unit. If you have passive ability which have certain buff effect, for example ('AIsx') ability, and u change its ISX1 data field, it will be changed, but effect won't be applied since it looks like passive abilities effects like these are applied only when unit gets the ability (which is useless since you can modify real fields only after ability was given) OR it will by also applied whenever unit gain level progress on the ability. That basically means, if you have ability with such passive effect, you need to make sure it got at least 2 levels defined and whenever you wanna change Real Field you change it for Level1 and after that set ability level to 2 and back to 1 making game engine recalculate and apply ability bonuses on unit.Uncle found out that Blademasters Bladestorm damage Real "OWW1" can be fixed by
Incrase the Ability level
and Decrase the Ability level
after you set the Damage sounds weird but it fixed the Real Field for "OWW1" maybe some others need a Simular Trick to get them to work and its a much of a research to find out...
function Unit_SetAttackSpeed(u,as)
if GetUnitAbilityLevel(u, FourCC('AIsx')) == 0 then
UnitAddAbility(u, FourCC('AIsx'))
end
BlzSetAbilityRealLevelField(BlzGetUnitAbility(u, FourCC('AIsx')), ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1, 0, as)
SetUnitAbilityLevel(u, FourCC('AIsx'), 2)
SetUnitAbilityLevel(u, FourCC('AIsx'), 1)
end
It's not a weird behavior. Preplaced units have no variables referencing them, those variables are only created using GUI. There must always be one trigger in GUI with, e.g.:I did find out one really weird behaviour while testing this. When u have pre-created units on the map, and u try to apply these functions on them via vJASS or Lua it won't work... for some reason. If u do it via GUI it will work fine, but code won't not even GUI Custom Script action. You need to run at least 1 action IN GUI which somehow using pre-created unit as parameter and that will somehow make BlzSetAbilityRealLevelField() work on them even in the code. So for example run SetUnitHp gui Action on pre-created unit and afterwards code function will work as well...
Oh never realized that oneIt's not a weird behavior. Preplaced units have no variables referencing them, those variables are only created using GUI. There must always be one trigger in GUI with, e.g.:
Unit - Kill Footman 0000 <gen> and no event. This then generates gg_unit_hfoo_0000.
I guess enable/disabe makes sense as well, since it forces some native ab data recalculations upon unit. Trick with wait timer sounds super weird, but i wouldn't be that surprised since there are dozens of weird behaviors behind WE which are not properly documentated.I don't think the ability even needs 2 levels for the Increase/Decrease trick to work, I had just assumed that all along.
There's a lot of weird bugs and behaviors with these "new" functions. I recommend trying different approaches if you can't get something to work. I find myself having to "refresh" things in order for them to update and start working properly, whether that be increasing/decreasing levels or disabling/enabling an ability. Sometimes a 0 second Wait (preferably a Timer) is necessary... These things are really finicky.