• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS/AI] A very fast attack. Using the change of an attack index.

Level 7
Joined
Mar 14, 2021
Messages
43
Well, this is a continuation of my previous topic, "An attack with a shorter delay to deal damage", which helps to attack quickly while ignoring the "Micellaneous - Maximum reaction delay (sec)". They can see it if they want. Here we will explain another way to reduce the time between attack and damage to a minimum of 0.002 seconds.

What is needed:

For this it is necessary to have a unit with its second attack available but not activated and that its "Animation Damage Point" is 0.000, since this will be the one used to damage the attacked unit.​

The method

When a unit attacks and its attack rating is changed for another that it has, a glicht is generated. Which ignores the cooldown on the first attack and somewhat on subsequent attacks (there's always an additional delay in this case). We can use for this in "All versions of the game including Reforged", the Root ability, which simply adding it to a dummy unit changes the attack rate to use, or with lines of code use Orb Fire to activate and deactivate attack number 2.​

Wc3BTNUproot.png
Perseverance.jpg


Using GUI code it would be like this:​
  • Test GUI Dummy Attack
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set PointVar = (Position of Test Attacker Unit (default) 0111 <gen>)
      • Unit - Create 1 Test Dummy Attack for Player 1 (Red) at PointVar facing Default building facing (270.0) degrees
      • -------- Adding a skill with maximum speed --------
      • Unit - Add 400% of AS (Item) to (Last created unit)
      • -------- When it goes to the second attack, the glich is generated and ignores the cooldown, --------
      • -------- leaving only the Damage Point at the lowest value 0.01, --------
      • -------- being able to detect in this line when the unit is going to attack, --------
      • -------- with an increase in maximum attack speed it would go to 0.002 seconds --------
      • Trigger - Turn on Detect Attack Test Dummy <gen>
      • Unit - Order (Last created unit) to Attack Test Attacker Unit (default) 0111 <gen>
      • -------- "Root" switches attacks immediately creating the trick, then an attack detector is needed --------
      • Unit - Add Root Enable Attack 2 (Ancestro protector) to (Last created unit)
      • Trigger - Turn off Detect Attack Test Dummy <gen>
      • -------- Since Root silences movement, you don't need to tap the unit to attack. --------
      • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
      • Custom script: call TimerGo()
      • Custom script: call RemoveLocation(udg_PointVar)
  • Detect Attack Test Dummy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to (==) Test Dummy Attack
      • (Level of 400% of AS (Item) for (Attacking unit)) Greater than (>) 0
    • Actions
      • -------- This trick allows you to detect an attack immediately with the Attack Event. --------
      • -------- In this event I order to attack once (or the same order but they are staked), and that's it. --------
      • Unit - Order (Attacking unit) to Attack Once (Attacked unit)
- If the attack 2 and its Art - Damage Point is 0.000, it will take this value so that the delay is a minimum of 0.01 and with a speed of 0.002 seconds.​

Curiosities

- The minimum attack time given is 0.01 seconds but with a 400% attack speed boost it goes to 0.002, so if you use a bash skill well it would be useful as the thunder hammer travels at 0.005 seconds for XD effect.​
- If the skill "Root" is used and in its options of this spell the unit does not turn, the immediate attack will not have to turn the unit to perform it.​
- In consecutive attacks, well, there is a delay of 0.004 seconds and after 0.002 seconds using all of the above (except the Root ability because this silences 'Amov', just in case on the map below there is a unit that attacks with this aspect and also his illusions changing the Attack index for an Orb, in addition to the attacked unit I give it a different classification so that attack 1 is unusable XD, so number 2 works.). So between the attack and damage it takes 0.006 seconds but you also have to leave the ability to increase attack speed about 0.3?? to remove this spell as the attack's cooldown will slow down if this is not done.​
- Until now I couldn't get the cooldown delay on consecutive attacks after a very fast attack has been given, but at least the minimum that can be reached with this on delay is 0.022 seconds, which is the minimum attack speed. But you can use instant attack done by leandrotp, although certain benefits are not applied.​
- In cases where the attacks are missile type or others that are not immediate, the cheat will still work the unit will launch an attack after 0.002 seconds and then the time it takes for the missile to travel to where it will damage the attacking unit.​
- There are many things that I found while trying this and it is a bit long to explain the effects to be able to control this trick more deeply but it seems everything is based on the attack time and its formula. It also matters whether or not one can activate passive abilities like bash or critical hit, since you can deactivate them depending on how you change the attack ratings in a line of code. It is somewhat complicated to get into this a lot because it takes a lot of time to rehearse and test, especially when there is an increase in range.​

Note: I did not find the method that Anitarf used that supposedly uses pause and unpause so that the attack is in the same line of code but well, I guess this is the one left, no way lol

Uses in which this method can be applied

You would simply use this method to have a fast attacking dummy and apply buffs in a very short time. Also create illusions of a unit to create quick attacks regardless of the unit as long as the original unit doesn't have polymorphism lol. With illusions you can also get the current damage of a unit without benefits, (and a trick so that it does not generate a missile if it attacks an illusion, is to put it on top of the target to attack.)​

I attached the test map with the implemented method and what can be done.
 

Attachments

  • An Attack Very Fast.w3x
    135.9 KB · Views: 51
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,220
This is giving me 2007 vibes.
The cool object editor tricks for those who have not gotten into GUI.

The main advantage thgat comes to my mind, it's very useful for those who wants the attack to scale with attack damage instead of whatever raw value is mathed out in a GUI trigger.

Typically it's somewhat discouraged to spread out the config, if I use a system/spell I want all of the numbers to be configurable at the same place. And with newer versions of wc3 we can get the value from the object editors if we wanted to make something that scales with attack.

I'm possibly too narrow-minded, there is probably some use for this, especially if you use some older version of wc3.

Otherwise, nice and short. Layout is nice although you use a different color for the first title
 
I have a functional Attack Indexer which attaches data (an integer) to the weapon index of an attacking unit. The data transmits the information stored at the point of attack and can be read from the damage event by retrieving the damage event weapon type. For the purposes of standardizing your system to allow for more precise data attachment (e.g. let it be actually MUI), you would want to consider doing the same thing.

Real, actual attack indexing has been achieved for reference.

You'd also want to consider actually writing a system to handle this, as a tutorial doesn't seem like a good fit. Dummy caster/attacker systems really should be centralized to avoid putting too much work on the user each time they want to use that kind of function.

Additionally, I would recommend expirimenting with removing the attacking unit's "Amov" ability to expiriment. I know that by removing that ability, the unit doesn't have to turn to cast a spell. For an instant spell cast, you remove the ability immediately after issuing the order (assuming all delays in Object Editor are set to 0).

You can see it in action in Spell System: GUI Spell System v1.8.0.0

JASS:
            //Auto-buff units added to group:
            call UnitAddAbility(udg_Spell_i_PreloadDummy, udg_Spell_i_BuffAbil[i])
            call IssueTargetOrderById(udg_Spell_i_PreloadDummy, udg_Spell_i_BuffOrder[i], u)
            call UnitRemoveAbility(udg_Spell_i_PreloadDummy, udg_Spell_i_BuffAbil[i])
[/copde]
 
Level 7
Joined
Mar 14, 2021
Messages
43
The main advantage thgat comes to my mind, it's very useful for those who wants the attack to scale with attack damage instead of whatever raw value is mathed out in a GUI trigger. Typically it's somewhat discouraged to spread out the config, if I use a system/spell I want all of the numbers to be configurable at the same place. And with newer versions of wc3 we can get the value from the object editors if we wanted to make something that scales with attack.

I intended to use it mostly for multishot, though getting scalable damage would be another benefit of this script other than being able to apply passive buffs almost immediately, without interrupting the original unit with an illusion. Also Blizzard didn't even give us a feature that applies instant attacks without interrupting the current unit order. 😕

You'd also want to consider actually writing a system to handle this, as a tutorial doesn't seem like a good fit. Dummy caster/attacker systems really should be centralized to avoid putting too much work on the user each time they want to use that kind of function.
The truth is that I did not consider making a system itself, since WereElf, who was also looking for a method that would allow him to launch a very fast attack with dummys, could be useful for his system, well if he updates the old one Multishot by WereElf .

Additionally, I would recommend expirimenting with removing the attacking unit's "Amov" ability to expiriment. I know that by removing that ability, the unit doesn't have to turn to cast a spell. For an instant spell cast, you remove the ability immediately after issuing the order (assuming all delays in Object Editor are set to 0).
If you experiment using the method of SilenceEx by leandrotp , as silencing 'Amov' causes the same effect as delete and of course the Root ability already silences this by default, causing the unit not to turn, but I realized in continuous attacks when the attack is exchanged, the next one to perform will not respect the spin for some reason without using silence or anything like that "it also depends on how the detonators are ordered, or if you do this in an EVENT_PLAYER_UNIT_ATTACKED event, things can be different".

Well, Really this trick has a lot of things that need to be analyzed, like Other tricks, like getting the exact time when a missile is launched, but you have to play with "Animation Damage - Point and Cooldown Attack" since with these values they must be equal or at least separated by a minimum of 0.02 seconds, for example. (Animation - Damage Point : 0.82), (Cooldown Attack: 0.80). Although in Reforged this is not necessary because of the functions that could give you attack speed. There are also other things that I found, but in reality all this is made so that any user of any Version of Warcraft 3 can use it, since reforged already comes with more functions that allow better ease of creating systems, but not many people still do not work with Reforged and continues to use older versions like 1.27b through 1.31.

Or well, it's because I'm also making a map that works in all versions of warcraft, and the funny thing is that I use Damage Engine 3.A together with Jesus4Lyf's Damage Engine, although these two libraries have not yet implemented the way to work them how did you do in GDD xD. Greetings...
 
Last edited:
I intended to use it mostly for multishot, though getting scalable damage would be another benefit of this script other than being able to apply passive buffs almost immediately, without interrupting the original unit with an illusion. Also Blizzard didn't even give us a feature that applies instant attacks without interrupting the current unit order. 😕


The truth is that I did not consider making a system itself, since WereElf, who was also looking for a method that would allow him to launch a very fast attack with dummys, could be useful for his system, well if he updates the old one Multishot by WereElf .


If you experiment using the method of SilenceEx by leandrotp , as silencing 'Amov' causes the same effect as delete and of course the Root ability already silences this by default, causing the unit not to turn, but I realized in continuous attacks when the attack is exchanged, the next one to perform will not respect the spin for some reason without using silence or anything like that "it also depends on how the detonators are ordered, or if you do this in an EVENT_PLAYER_UNIT_ATTACKED event, things can be different".

Well, Really this trick has a lot of things that need to be analyzed, like Other tricks, like getting the exact time when a missile is launched, but you have to play with "Animation Damage - Point and Cooldown Attack" since with these values they must be equal or at least separated by a minimum of 0.02 seconds, for example. (Animation - Damage Point : 0.82), (Cooldown Attack: 0.80). Although in Reforged this is not necessary because of the functions that could give you attack speed. There are also other things that I found, but in reality all this is made so that any user of any Version of Warcraft 3 can use it, since reforged already comes with more functions that allow better ease of creating systems, but not many people still work with if not reforged with 1.27b until 1.31.

Or well, it's because I'm also making a map that works in all versions of warcraft, and the funny thing is that I use Damage Engine 3.A together with Jesus4Lyf's Damage Engine, although these two libraries have not yet implemented the way to work them how did you do in GDD xD. Greetings...
If you want something universal, you can attach UnitUserData to the dummy unit, or use Table to attach data to it.
 
Level 7
Joined
Mar 14, 2021
Messages
43
If you want something universal, you can attach UnitUserData to the dummy unit, or use Table to attach data to it.
I use the Table library, and so far I haven't had any issues with recent versions of Reforged on my map, I could now create a system to create a multi-shot system, but I think WereElf will do it. My bad luck is that I started researching this so late and recently found this hack :/ , it would have been very helpful for your Damage system, since Orbs, Arrows, Critical Strike, Bash and other special attack passives can be staked. Anyway .
 
Level 5
Joined
Sep 6, 2010
Messages
91
If you experiment using the method of SilenceEx by leandrotp , as silencing 'Amov' causes the same effect as delete and of course the Root ability already silences this by default, causing the unit not to turn, but I realized in continuous attacks when the attack is exchanged, the next one to perform will not respect the spin for some reason without using silence or anything like that "it also depends on how the detonators are ordered, or if you do this in an EVENT_PLAYER_UNIT_ATTACKED event, things can be different".

Well, Really this trick has a lot of things that need to be analyzed, like Other tricks, like getting the exact time when a missile is launched, but you have to play with "Animation Damage - Point and Cooldown Attack" since with these values they must be equal or at least separated by a minimum of 0.02 seconds, for example. (Animation - Damage Point : 0.82), (Cooldown Attack: 0.80). Although in Reforged this is not necessary because of the functions that could give you attack speed. There are also other things that I found, but in reality all this is made so that any user of any Version of Warcraft 3 can use it, since reforged already comes with more functions that allow better ease of creating systems, but not many people still do not work with Reforged and continues to use older versions like 1.27b through 1.31.
Something you should also keep in mind that the Instant Attack trick, the delay of doing damage with the attack to a unit is 0.020 seconds Wup, and having a minimum of 0.002 seconds breaks the warcraft 3 schemes and could be patched Nah joke.

But so far I haven't had any problems with your method my illusions look like real units as I can turn this on and off using the Bliz_switch attack function, but also the trick of using an Orb to activate attack 2 on the same line of code without side effects, I didn't think it would work and that's good to know.

And as Bribe comments you can make a system out of this, there were even some annoying spells like Thorn Shield which always returns 1 damage no matter if its Factor is 0 so by changing the attack rate just before the damage, it's not affected by This ability is something curious, only if you make the change once in the same line of code.

I don't know what other things can be found with this, but in reality there are many in my opinion. :ogre_hurrhurr:
 
Level 7
Joined
Mar 14, 2021
Messages
43
Something you should also keep in mind that the Instant Attack trick, the delay of doing damage with the attack to a unit is 0.020 seconds Wup, and having a minimum of 0.002 seconds breaks the warcraft 3 schemes and could be patched Nah joke.
Well testing the timing of leandrotp's Fire Arrows Cheat, this depends on the type of attack, I think you use the ranged units. And when you launch an attack with Fire Arrows, it took some time to launch the ability because it can still turn, and for this reason it takes that long lol. With a unit without 'Amov' the minimum time with missile type attack is 0.005 seconds and normal 0.000 seconds. The only condition is to have no Amov or must be silenced for the condition to be met. That was a detail that could not be solved in consecutive attacks, since the unit must turn, strangely it is solved by changing the attack XD

I don't know what other things can be found with this, but in reality there are many in my opinion.:ogre_hurrhurr:
Really yes, there are many things that can be found with this, and the truth is that I even think that the 0.002 seconds can be eliminated to make it instantaneous, but I don't have so much time now to see what else can be done. I guess making an attack like Valkyria from Starcraft is what came out hehe interspersing the attack rates.
 
Last edited:
Level 5
Joined
Sep 6, 2010
Messages
91
Well testing the timing of leandrotp's Fire Arrows Cheat, this depends on the type of attack, I think you use the ranged units. And when you launch an attack with Fire Arrows, it took some time to launch the ability because it can still turn, and for this reason it takes that long lol. With a unit without 'Amov' the minimum time with missile type attack is 0.005 seconds and normal 0.000 seconds. The only condition is to have no Amov or must be silenced for the condition to be met. That was a detail that could not be solved in consecutive attacks, since the unit must turn, strangely it is solved by changing the attack XD
I mention it, since it came out after the first attack, that Time. Now I know it's triggered by the spin, now I can change it within the same attack event. This could work to get the actual "benefits and drawbacks" value of the attack in real time. The only bad thing that could make it work on older versions of Reforged and not on the current patch. :slp:(why blizz)

JASS:
constant integer ARROW_ID = 'AHfa'
:
call IssueImmediateOrderById(source,String2OrderIdBJ("stop"))
call BlzSetUnitWeaponStringField(source,ConvertUnitWeaponStringField(‘ua1w’),1,“normal”)
call UnitAddAbility(source,ARROW_ID)
call IssueTargetOrderById(source,String2OrderIdBJ("flamingarrowstarg"),targ)
call UnitRemoveAbility(source, ARROW_ID)
call BlzSetUnitWeaponStringField(source,ConvertUnitWeaponStringField(‘ua1w’),1,“missile”)
call IssueTargetOrderById(source,String2OrderIdBJ("attack"),targ)

In all versions it would be something like this.
JASS:
call IssueImmediateOrderById(source,String2OrderIdBJ("stop"))
call UnitAddType(targ,UNIT_TYPE_SAPPER)
call SetUnitAbilityLevel(source,Enbal2Atk_ID,2)
call UnitAddAbility(source, 'AHfa')
call IssueTargetOrderById(source,String2OrderIdBJ("flamingarrowstarg"),targ)
call UnitRemoveAbility(source, 'AHfa')
call SetUnitAbilityLevel(source,Enbal2Atk_ID,2)
call IssueTargetOrderById(source,String2OrderIdBJ("attack"),targ)
call UnitRemoveType(targ,UNIT_TYPE_SAPPER)
call SetUnitAbilityLevel(source,Enbal2Atk_ID,1)

It's good that you can continue to find glitches in the current war 3.
 
Last edited:
Level 7
Joined
Mar 14, 2021
Messages
43
I mention it, since it came out after the first attack, that Time. Now I know it's triggered by the spin, now I can change it within the same attack event. This could work to get the actual "benefits and drawbacks" value of the attack in real time. The only bad thing that could make it work on older versions of Reforged and not on the current patch. :slp:(why blizz)

In all versions it would be something like this.
JASS:
call IssueImmediateOrderById(source,String2OrderIdBJ("stop"))
call UnitAddType(targ,UNIT_TYPE_SAPPER)
call SetUnitAbilityLevel(source,Enbal2Atk_ID,2)
call UnitAddAbility(source, 'AHfa')
call IssueTargetOrderById(source,String2OrderIdBJ("flamingarrowstarg"),targ)
call UnitRemoveAbility(source, 'AHfa')
call SetUnitAbilityLevel(source,Enbal2Atk_ID,2)
call IssueTargetOrderById(source,String2OrderIdBJ("attack"),targ)
call UnitRemoveType(targ,UNIT_TYPE_SAPPER)
call SetUnitAbilityLevel(source,Enbal2Atk_ID,1)
It's good that you can continue to find glitches in the current war 3.
Ah, I get what you're looking for, and if it makes sense since the attack event will always happen on any unit, and the instant attack with the Arrows trick would give you the original damage before the attack damage happens without interrupting the event of attack, well of course using the new functions you can reduce the launch time and reset the cooldown, in my case that data would be missing XD, although something else can be done, but of course that would be to investigate more things uhmmm.
 
Level 5
Joined
Sep 6, 2010
Messages
91
It still works, I stopped using it because it didn't give me certain benefits and it breaks the current order of a unit. I didn't know it could be applied within an attack detection event, so I apply it to another dummy type unit and get the actual damage. Now, between launching an attack, the time is so low with this cheat that I was able to do some things on my Wave Map to the enemies and their illusions, without affecting the current orders, this is only applicable in the latest war patch.

Non-RGC dota 1 devs having trouble finding actual attack damage, I guess now there is a fix for that.

Ah, I get what you're looking for, and if it makes sense since the attack event will always happen on any unit, and the instant attack with the Arrows trick would give you the original damage before the attack damage happens without interrupting the event of attack, well of course using the new functions you can reduce the launch time and reset the cooldown, in my case that data would be missing XD, although something else can be done, but of course that would be to investigate more things uhmmm.
Actually, this trick is exploitable, and there are other things that intrigue me :confused:2, like not having to rotate the unit to attack Wup, like the Knight unit in the test map, or doing a single fast attack and not two in a row, like that. like the fact that certain passives like Bash or a crit on the first attack switch don't work and the next one does. Well, Blizzard didn't plan this glicht at all.
 
Last edited:
Top