• 🏆 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!

[General] Dummy Ability: What type of abilities should be used for applying buffs.

Status
Not open for further replies.
Level 12
Joined
May 28, 2015
Messages
382
This has been boggling my mind lately on what should I used for a dummy spell in order to apply buffs which doesn't override.

I created a spell which has a dummy spell based on Acid Bomb and renamed its buff to (Fire). Now my other unit has Acid Bomb. I decided to cast the spell to the target in which causes the buff(Fire) to be applied but then the other unit containing the ability Acid Bomb decided to cast as well at the same target right after my unit has finished casting it.

Result: The Acid Bomb buff overrides the first buff(Fire).. resulting in complete dissatisfaction and failure of spell making.

Now the question is: What spells should I based my dummy spell upon in order to prevent certain buffs from overriding other buffs?? Same goes to slows, poison, damage per second buffs, attack speed buff, etc.
 
Level 13
Joined
Jul 15, 2007
Messages
763
I think auras are the only buffs that can stack with each other, which is why people use them for debuffs/buffs for triggered abilities (with the only gimmick is that they don't flash when the duration is less than 10 seconds).

That is also why you should only have 1 version of each ability in your map (e.g. only have 1 Unholy Frenzy available at a time) since they behave oddly if you apply lots of difference instances of the same base spell
 
natural hostile -> heroes -> channel is the best (and most popular) custom spell. It contains properties that let you choose weather it is an instant, channel, AoE, hidden, ect. spell. It is used with triggers to make original spells that doesn't exist in the Abilities section. Take care of the "text - order string" property because when a unit have to spells with the same order string then the spells will conflict. If you still have the double-cast problem then the bug might lie in your triggers.
 
Level 12
Joined
May 28, 2015
Messages
382
I think auras are the only buffs that can stack with each other, which is why people use them for debuffs/buffs for triggered abilities (with the only gimmick is that they don't flash when the duration is less than 10 seconds).

That is also why you should only have 1 version of each ability in your map (e.g. only have 1 Unholy Frenzy available at a time) since they behave oddly if you apply lots of difference instances of the same base spell

I'm not talking about what spell should I based for my hero. I'm talking what spells should i based for my dummy spell, like if I want to use channel and I want an ability to slow the target but the problem is, the slow buff can be overridden by another buff which is the same to the applied buff. I want a dummy spell to be able to slow the target without ever overriding other slows which is already applied to the afflicted unit.

I think auras are the only buffs that can stack with each other, which is why people use them for debuffs/buffs for triggered abilities (with the only gimmick is that they don't flash when the duration is less than 10 seconds).

That is also why you should only have 1 version of each ability in your map (e.g. only have 1 Unholy Frenzy available at a time) since they behave oddly if you apply lots of difference instances of the same base spell

If so then how am I supposed to make the aura of such ability to just affect one specific unit, like a targeted unit? Plus isn't there another option? Does the "Slow" ability (which is an autocast ability) stacks with other dummy spells based on the same one?
 
Level 13
Joined
Jul 15, 2007
Messages
763
I'm not talking about what spell should I based for my hero. I'm talking what spells should i based for my dummy spell, like if I want to use channel and I want an ability to slow the target but the problem is, the slow buff can be overridden by another buff which is the same to the applied buff. I want a dummy spell to be able to slow the target without ever overriding other slows which is already applied to the afflicted unit.



If so then how am I supposed to make the aura of such ability to just affect one specific unit, like a targeted unit? Plus isn't there another option? Does the "Slow" ability (which is an autocast ability) stacks with other dummy spells based on the same one?

I know. Use spell booked auras or slow aura (tornado) and remove them when the duration has expired. Set the aura to affect self only.

Also, lets say you have 2 versions of the Slow spell.

Slow 1 - has no slow, the buff makes the target look on fire
Slow 2 - your ordinary slow

If you cast slow 1 followed by slow 2, the target will become slowed but the buff will not be overidden by slow 2 (the buff from slow 1 will persist). I think that's how it goes anyway, 99% of people here use tornado slow aura for custom buffs.

Tornado slow is great, but with a bit more work, you can easily change auras like Endurance (IAS, ms) Command (damage), Thorns (reflect) , Unholy (ms/life reg), Brilliance (mana), Devotion (armor) etc. to make stackable buffs that affect stats.

In your example, you can keep the native acid bomb as it is, and then trigger your fire one.
 
So basically orb effects and attack modifiers like cold arrows, slow poison and venomous spear, etc. are a bad idea to use as dummy units??

Yes. That will require your dummy unit to have an attack greater than 0 to be able to attack other units, forcing you to make your dummy deal damage. Also auras doesn't affect units instantaneously... There will always be about 0.1 - 0.2 delay before an aura takes effect. If you want to slow a unit via a dummy, use a slow ability and give it levels (optional). After that you order your dummy to cast the spell.

  • Unit - Create 1 dummyCaster for Neutral Passive at (Position of Peasant 0004 <gen>) facing Default building facing degrees
  • Unit - Add dummySpell to (Last created unit)
  • -------- If your spell has levels: --------
  • Unit - Set level of dummySpell for (Last created unit) to (Level of Acid Bomb for (Triggering unit))
  • -------- - --------
  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Peasant 0004 <gen>
  • Unit - Add a 0.10 second Generic expiration timer to (Last created unit)
Remember to change your dummy's casting time to 0.
 
Level 13
Joined
Jul 15, 2007
Messages
763
Auras do have a very slight delay, but it's not very noticeable in game-time. If the delay is a problem (which it 99% probably wont), you give your targets modified gloves of haste, damage abilities etc. so the effect is immediate, and use an aura for buff display only.

Any auras stack when they have their own buffs. I didn't mention every aura.

Slow Poison is a good dummy ability, but not for your uses.
 
Level 12
Joined
May 28, 2015
Messages
382
Yes. That will require your dummy unit to have an attack greater than 0 to be able to attack other units, forcing you to make your dummy deal damage. Also auras doesn't affect units instantaneously... There will always be about 0.1 - 0.2 delay before an aura takes effect. If you want to slow a unit via a dummy, use a slow ability and give it levels (optional). After that you order your dummy to cast the spell.

  • Unit - Create 1 dummyCaster for Neutral Passive at (Position of Peasant 0004 <gen>) facing Default building facing degrees
  • Unit - Add dummySpell to (Last created unit)
  • -------- If your spell has levels: --------
  • Unit - Set level of dummySpell for (Last created unit) to (Level of Acid Bomb for (Triggering unit))
  • -------- - --------
  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Peasant 0004 <gen>
  • Unit - Add a 0.10 second Generic expiration timer to (Last created unit)
Remember to change your dummy's casting time to 0.

But will the "Slow" ability not override other buffs?? What if I use the "Slow" ability to my one spell and the same spell to my other one?
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
I'm telling you, Slow Aura (Tornado) is the way to go. Please look at the sample map to see its potential.

PROS:
- Stacks.
- No longer needs a dummy caster to apply the buff.

CONS:
- Manually trigger the duration and effect (unless it is a slow effect). The buff is just for show.
- Buff status icon does not fade (blink) when it is about to expire.
 

Attachments

  • Stacking Buffs.w3x
    16.8 KB · Views: 112
Level 22
Joined
Feb 6, 2014
Messages
2,466
If 0.2 second inaccuracy don't matter matter to you, you can still use Waits and still make it MUI. You just have to set the unit to a local variable or if you're applying it to Triggering Unit, it will work just fine since Triggering Unit acts like a local variable in a trigger.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
Because I suck at hashtables. I never really understand that stuff

Anyway.. My spell is an area spell, then how do I remove the buffs from several units, since im using unit group which have loops that are bad when using waits inside it.

If you're using Unit Indexer, just periodically add those units' time count. Example,
  • Set CustomValue = Custom Value of Picked Unit
  • Set Buff_Time[CustomValue] = Buff_Time[CustomValue] + 0.03
If you're periodic timer runs every 0.03 second.

If not, then try dynamic indexing. Instead of using unit groups, indexed them instead.
 
Level 11
Joined
Aug 24, 2012
Messages
429
I have had the same big issue with the buffs - I think there is a buff or two that does stack with a base version of itself, but they weren't very useful buffs for making dummy spells cast by dummy units (they didn't affect movement/attack speed for example).

This problem is hard-coded unfortunately (I do honestly wish one of these days someone will just hack and crack the code - I know it's probably illegal but Blizzard left some much stuff in their game that is hard-coded for no good reason). So until someone cracks the source-code the only solutions are:

1. Use only one type of ability per map (no copy of slow/inner fire/acid bomb)-which severely limits the number of spells.

2. Categorize spells - Make it clear to the players that these spells won't stack. Add a category to each spell (each spell based on inner fire has the inner fire category) and make it clear that spells from the same category will never stack.

3. Use Auras. Simplest way to achieve stacking effects but severely limits the targeting capability of the spell.

You can also make trigger only spells (base the ability on channel) and manipulate the unit's stats through triggers alone - set unit speed to X for example. But this will take the longest time of all methods and is really cumbersome.

I personally would go for option number 2 while I cross my fingers that some will crack this hard-coded nonsense and make advanced spell-making accessible to people with little JASS knowledge.
 
Level 13
Joined
Jul 15, 2007
Messages
763
I verge towards number 1; there are A LOT of spells you can use before you run out of options. I think if you've got 10 spells based on Inner Fire, you ran out of imagination somewhere :p. Once number 1 isn't an option, i resort to 3.

What do you mean by "severely limits the targeting capability of the spell"? You can use auras as buffs for any type of spell (no target, single target, area) with enough GUI mastery.
 
Level 11
Joined
Aug 24, 2012
Messages
429
I verge towards number 1; there are A LOT of spells you can use before you run out of options. I think if you've got 10 spells based on Inner Fire, you ran out of imagination somewhere :p. Once number 1 isn't an option, i resort to 3.

What do you mean by "severely limits the targeting capability of the spell"? You can use auras as buffs for any type of spell (no target, single target, area) with enough GUI mastery.

What I meant was that if you want to use an aura buff on a single unit you have to give that aura (the ability) to that unit, set target allowed to self and remove it afterwards via triggers. This type of trigger is not easilly made MUI.

Also a lot of buff spells? What if you want to have the standard ones as well? What if you just want to leave the current units as they are and just add new ones? For me, 1 is hardly a decent solution.
 
Level 13
Joined
Jul 15, 2007
Messages
763
I have yet to see a map that uses all default units, plus new units (perhaps an altered melee?). In that case, 1 or 2 aren't options, and only 3 is.

But there's still a plethora of abilities that don't use buffs, and thus can be recreated as many times as you like. Buffs are also only indicators, as such, they're not strictly required.

They are easily made MUI... Hashtables have been in the editor for a while now, and i assure you, once you make one spell that uses auras as buffs in the Hashtable, you'll be able to fart them out like nothing.

Edit: I've included one of the abilities from one of my maps that uses hashtables. All it does is X damage after 7 seconds.

  • Impending Death Hash
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set ImpendingDeathHash = (Last created hashtable)
  • Impending Death Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impending Death
    • Actions
      • Set TEMP_INT_ay[1] = (Level of (Ability being cast) for (Triggering unit))
      • If (TEMP_INT_ay[1] Equal to 1) then do (Set TEMP_REAL_ay[2] = 200.00) else do (Do nothing)
      • If (TEMP_INT_ay[1] Equal to 2) then do (Set TEMP_REAL_ay[2] = 400.00) else do (Do nothing)
      • If (TEMP_INT_ay[1] Equal to 3) then do (Set TEMP_REAL_ay[2] = 600.00) else do (Do nothing)
      • If (TEMP_INT_ay[1] Equal to 4) then do (Set TEMP_REAL_ay[2] = 800.00) else do (Do nothing)
      • -------- Store the duration in the Hashtable under the unit's Handle ID --------
      • Hashtable - Save 7.00 as 0 of (Key (Target unit of ability being cast)) in ImpendingDeathHash
      • -------- Store the damage in the Hashtable under the unit's Handle ID --------
      • Hashtable - Save TEMP_REAL_ay[2] as 1 of (Key (Target unit of ability being cast)) in ImpendingDeathHash
      • -------- Store the caster in the Hashtable under the unit's Handle ID --------
      • Hashtable - Save Handle Of(Casting unit) as 2 of (Key (Target unit of ability being cast)) in ImpendingDeathHash
      • Set RemainingTime = (Load 0 of (Key (Target unit of ability being cast)) from ImpendingDeathHash)
      • -------- Add the unit to the group of units that are being damaged when the effect ends --------
      • Unit Group - Add (Target unit of ability being cast) to ImpendingDeathGroup
      • Unit - Add Impending Death (Buff) to (Target unit of ability being cast)
      • Trigger - Turn on Impending Death Elapse <gen>
  • Impending Death Elapse
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ImpendingDeathGroup and do (Actions)
        • Loop - Actions
          • -------- Get the remaining time in seconds --------
          • Set RemainingTime = (Load 0 of (Key (Picked unit)) from ImpendingDeathHash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RemainingTime Greater than 0.00
            • Then - Actions
              • -------- update the time remaining --------
              • Hashtable - Save (RemainingTime - 1.00) as 0 of (Key (Picked unit)) in ImpendingDeathHash
              • -------- do nothing --------
            • Else - Actions
              • -------- remove abilities & deal damage --------
              • Unit - Remove Impending Death (Buff) from (Picked unit)
              • Unit - Remove Impending Death buff from (Picked unit)
              • Unit - Cause (Load 2 of (Key (Picked unit)) in ImpendingDeathHash) to damage (Picked unit), dealing (Load 1 of (Key (Picked unit)) from ImpendingDeathHash) damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in ImpendingDeathHash
              • Unit Group - Remove (Picked unit) from ImpendingDeathGroup
              • If ((Number of units in ImpendingDeathGroup) Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
 
Level 12
Joined
May 28, 2015
Messages
382
Buffs are strictly important aside from indicators.. Buffs that are from the same ability id, always replaces the current buff from the applied new one. Its pretty annoying actually as it replaces a more stronger buff with lesser buff.

Just like this --> Faerie Fire casted to a target > Reduces armor by 5> Spell(based on faerie fire) casted to the same target > Replaces the Faerie Fire buff with Spell buff, reducing the armor by 3. Conclusion: Not stackable and pretty much a dumb idea.
 
Level 12
Joined
May 28, 2015
Messages
382
Yeah.. but its really a bothersome that you can do such feat only in triggers. It's actually annoying and will slow you down if you plan on making abilities as many and fast as possible. I wish that blizzard has just put options on data wether its stackable or not, much like abilities like envenomed spears which gives u the option to chose what's going to stack.
 
Level 11
Joined
Aug 24, 2012
Messages
429
Yeah.. but its really a bothersome that you can do such feat only in triggers. It's actually annoying and will slow you down if you plan on making abilities as many and fast as possible. I wish that blizzard has just put options on data wether its stackable or not, much like abilities like envenomed spears which gives u the option to chose what's going to stack.

It really is annoying...like I said, I hope someone can do a really good hack of this nonsense one of these days.
 
Level 12
Joined
May 28, 2015
Messages
382
Using buff through triggers is really bothersome, you set so much abilities just for a buff like using Slow aura(tornado) and such... Its really annoying especially if you don't know much about abilities, for example: What if I want the enemy to be damaged per second by percent of its max health?? What ability should I use?? Sort of like that.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Wc3 is a trick fest and pretty much any customization requires triggers because it's just the most elementary base. Surely you can do some things rather with standard features but that often comes with the penalty that it's not well adaptable to your trigger infrastructure, which is why it's emulated via triggers. On the other hand not everything can be done via triggers either, so yeah, have to be crafty.
 
Status
Not open for further replies.
Top