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

[Solved] Taking this trigger to the next Level

Status
Not open for further replies.
Level 5
Joined
May 20, 2013
Messages
162
Ok, so i have got the purpose of this trigger has been to replace the standard Vampiric Aura with an alternate version that applies to ranged units the same as melee. So, as far as accomplishing that goes -it works. And i am very happy for my success so far.

But now i am at a place where i need to correct what i have made.

two areas specifically.

#1, the sfx i placed for making it "look" like Vampiric Aura... i really don't know how to properly destroy them for this application. I so rarely get to use SFX in triggers, this is unfamiliar territory.

#2, i need this trigger to be fully MUI. This means that each player has to be able to potentially have an aura source from a hero, at least one unit, and at least one item. This probably means that i need to set up at least one variable as an array, per player. But i always get confused when trying to do this because i slip so easily into that endless string of array indexes referring back to other array indexes until i can't follow the train of progression anymore.

Thank you graciously for any suggestions.

And of course, just so you know that i am not coming to you empty handed, asking you to write the trigger for me, here is the form i have it in so far. Like i said, it "works" but it has not yet met the 2 points of criteria i outlined above.

First, i have 3 short triggers for establishing the "Aura Holder" unit variable, depending upon the event, whether it is Item, Unit, or Hero.

  • Aura setup 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item carried by (Hero manipulating item) of type Scourge Bone Chimes) Equal to (Item being manipulated)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Vampiric Aura (Alt, Hero) for (Triggering unit)) Equal to 0
          • (Level of Vampiric Aura (Alt, Unit) for (Triggering unit)) Equal to 0
        • Then - Actions
          • Set AuraHolder = (Hero manipulating item)
          • Game - Display to (All players) the text: An Item with Vampir...
        • Else - Actions
  • Aura setup 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Entering unit) is in (Units in (Playable map area) matching ((Level of Vampiric Aura (Alt, Unit) for (Entering unit)) Greater than or equal to 1))) Equal to True
    • Actions
      • Set AuraHolder = (Entering unit)
      • Game - Display to (All players) the text: A warrior with Vamp...
  • Aura setup 3
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Vampiric Aura (Alt, Hero)
    • Actions
      • Set AuraHolder = (Learning Hero)
      • Game - Display to (All players) the text: A hero with the Vam...
And then, Hero, Item, Unit source Aura functions are all handled by 1 main trigger.

  • Vampiric Aura Alternative
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • (AuraHolder belongs to an ally of (Owner of DamageEventSource)) Equal to True
      • (DamageEventSource has buff Vampiric Aura (Alt)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (AuraHolder is A Hero) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (AuraHolder has an item of type Scourge Bone Chimes) Equal to True
              • (Level of Vampiric Aura (Alt, Hero) for AuraHolder) Equal to 0
            • Then - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.00 + (15.00 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolder)))))))
            • Else - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.05 + (15.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolder)))))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (AuraHolder has an item of type Scourge Bone Chimes) Equal to True
              • (Level of Vampiric Aura (Alt, Unit) for AuraHolder) Equal to 0
            • Then - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.00 + (15.00 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolder)))))))
            • Else - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.32 + (3.00 x (Real((Level of Vampiric Aura (Alt, Unit) for AuraHolder)))))))
      • Special Effect - Create a special effect attached to the overhead of DamageEventSource using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • Special Effect - Set Color of (Last created special effect) to color of (Owner of AuraHolder)
      • Special Effect - Set Time Scale of (Last created special effect) to 1.00
Like i said... right now i am mostly concerned with properly destroying the SFX, and with setting this up for full multi-user interface.

Thank you for taking the time to look! ;)
 
Firstly make your AuraHolder an array with the size of 24 (or the number of player your map has)
then do this
  • Set AuraHolder[Player number of the owner of triggering unit] = (Hero manipulating item)
  • Set AuraHolder[Player number of the owner of triggering unit] = (Learning Hero)
  • Set AuraHolder[Player number of the owner of triggering unit] = (Entering unit)
And then put the [Player number of the owner of DamageEventSource] to every AuraHolder
At the end of the trigger add this
  • Special Effect - Destroy (Last created the special effect)
This ought to do the trick.
 
Last edited:
Level 5
Joined
May 20, 2013
Messages
162
@AvatarsLord TY for your feedback. I have attempted to implement what you suggested, as well as make some more filters for the life steal. It seems to work pretty well. But something i am concerned about now, that i really don't know how to test for is this:

Did i create a system of stacking life-steal effects by the way i composed these triggers, especially trigger #4?

For example. Did i create a scenario where multiple Vampiric Auras (Hero, Item, & Unit) operating within the same radius will stack their life steal benefits on top of each other?

In the updated triggers, the three AuraHolders (Hero, Item, Unit) are 28 slot arrays.
Three more variables, AuraIDNumber_(Hero, Item, Unit) were created to fill "Player number of owner of X unit", where "X unit" meant "Learning hero", "Hero manipulating item", and "Entering Unit" respectively.

One thing my events do not account for is units pre-placed on the map who already have vampiric aura. That can easily be fixed, so no biggy.

Another point i am questioning, is aura size. Yes, my triggers allow for auras to get larger with increased ability level. But the trigger function that i used to represent their radius was stated in terms of "center point of a region with size (width & height). Since i interpreted the lateral dimension of "size" as representing a diameter, i calculated a 900 aura radius as an 1800 aura size to make the change from radius to diameter. I "think" this is right, but not sure.

Funny how complicated something that seems so simple at a glance can get! ;)

  • Aura setup 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item carried by (Hero manipulating item) of type Scourge Bone Chimes) Equal to (Item being manipulated)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Vampiric Aura (Alt, Hero) for (Triggering unit)) Equal to 0
        • Then - Actions
          • Set AuraIDnumber_Item = (Player number of (Owner of (Hero manipulating item)))
          • Set AuraHolderItem[AuraIDnumber_Item] = (Hero manipulating item)
          • Game - Display to (All players) the text: An Item with Vampir...
        • Else - Actions
  • Aura setup 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Entering unit) is in (Units in (Playable map area) matching ((Level of Vampiric Aura (Alt, Unit) for (Entering unit)) Greater than or equal to 1))) Equal to True
    • Actions
      • Set AuraIDnumber_Unit = (Player number of (Owner of (Entering unit)))
      • Set AuraHolderUnit[AuraIDnumber_Unit] = (Entering unit)
      • Game - Display to (All players) the text: A warrior with Vamp...
  • Aura setup 3
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Vampiric Aura (Alt, Hero)
    • Actions
      • Set AuraIDnumber_Hero = (Player number of (Owner of (Learning Hero)))
      • Set AuraHolderHero[AuraIDnumber_Hero] = (Learning Hero)
      • Game - Display to (All players) the text: A hero with the Vam...
  • Vampiric Aura Alternative
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has buff Vampiric Aura (Alt)) Equal to True
      • (DamageEventTarget is A structure) Equal to False
      • (DamageEventTarget is Mechanical) Equal to False
      • (DamageEventTarget is Ethereal) Equal to False
      • (DamageEventTarget is an illusion) Equal to False
      • (DamageEventTarget is dead) Equal to False
      • (Owner of DamageEventTarget) Not equal to (Random player from (All allies of (Owner of DamageEventSource)))
      • (Owner of DamageEventSource) Not equal to (Random player from (All allies of (Owner of DamageEventTarget)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (AuraHolderHero[AuraIDnumber_Hero] belongs to an ally of (Owner of DamageEventSource)) Equal to True
          • ((Region centered at (Position of AuraHolderHero[AuraIDnumber_Hero]) with size ((1400.00 + (400.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolderHero[AuraIDnumber_Hero]))))), 1800.00)) contains DamageEventSource) Equal to True
        • Then - Actions
          • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.05 + (15.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolderHero[AuraIDnumber_Hero])))))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (AuraHolderUnit[AuraIDnumber_Unit] belongs to an ally of (Owner of DamageEventSource)) Equal to True
              • ((Region centered at (Position of AuraHolderUnit[AuraIDnumber_Unit]) with size ((1720.00 + (80.00 x (Real((Level of Vampiric Aura (Alt, Unit) for AuraHolderUnit[AuraIDnumber_Unit]))))), 1800.00)) contains DamageEventSource) Equal to True
            • Then - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.32 + (0.03 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderUnit[AuraIDnumber_Unit])))))))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Region centered at (Position of AuraHolderItem[AuraIDnumber_Item]) with size ((1800.00 + (0.00 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderItem[AuraIDnumber_Item]))))), 1800.00)) contains DamageEventSource) Equal to True
                  • (AuraHolderItem[AuraIDnumber_Item] belongs to an ally of (Owner of DamageEventSource)) Equal to True
                • Then - Actions
                  • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.00 + (0.20 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderItem[AuraIDnumber_Item])))))))
                • Else - Actions
      • Special Effect - Create a special effect attached to the overhead of DamageEventSource using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • Special Effect - Set Color of (Last created special effect) to color of (Owner of DamageEventSource)
      • Special Effect - Set Time Scale of (Last created special effect) to 1.00
      • Special Effect - Destroy (Last created special effect)
 
First of all
  • Vampiric Aura Alternative
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has buff Vampiric Aura (Alt)) Equal to True
      • (DamageEventTarget is A structure) Equal to False
      • (DamageEventTarget is Mechanical) Equal to False
      • (DamageEventTarget is Ethereal) Equal to False
      • (DamageEventTarget is an illusion) Equal to False
      • (DamageEventTarget is dead) Equal to False
      • (Owner of DamageEventTarget) Not equal to (Random player from (All allies of (Owner of DamageEventSource)))
      • (Owner of DamageEventSource) Not equal to (Random player from (All allies of (Owner of DamageEventTarget)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (AuraHolderHero[Player number of DamageEventSource] belongs to an ally of (Owner of DamageEventSource)) Equal to True
          • ((Region centered at (Position of AuraHolderHero[Player number of DamageEventSource]) with size ((1400.00 + (400.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolderHero[Player number of DamageEventSource]))))), 1800.00)) contains DamageEventSource) Equal to True
        • Then - Actions
          • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.05 + (15.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolderHero[Player number of DamageEventSource])))))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (AuraHolderUnit[Player number of DamageEventSource] belongs to an ally of (Owner of DamageEventSource)) Equal to True
              • ((Region centered at (Position of AuraHolderUnit[Player number of DamageEventSource]) with size ((1720.00 + (80.00 x (Real((Level of Vampiric Aura (Alt, Unit) for AuraHolderUnit[AuraIDnumber_Unit]))))), 1800.00)) contains DamageEventSource) Equal to True
            • Then - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.32 + (0.03 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderUnit[Player number of DamageEventSource])))))))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Region centered at (Position of AuraHolderItem[AuraIDnumber_Item]) with size ((1800.00 + (0.00 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderItem[Player number of DamageEventSource]))))), 1800.00)) contains DamageEventSource) Equal to True
                  • (AuraHolderItem[Player number of DamageEventSource] belongs to an ally of (Owner of DamageEventSource)) Equal to True
                • Then - Actions
                  • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.00 + (0.20 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderItem[Player number of DamageEventSource])))))))
                • Else - Actions
      • Special Effect - Create a special effect attached to the overhead of DamageEventSource using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • Special Effect - Set Color of (Last created special effect) to color of (Owner of DamageEventSource)
      • Special Effect - Set Time Scale of (Last created special effect) to 1.00
      • Special Effect - Destroy (Last created special effect)
[/QUOTE]

The way you did was wrong because AuraID's was set to the last one who triggered the first 3 of the triggers.
Example
Player one picked up an Item
AuraID is now 1
Player two picked up an item
AuraID is now 2
Now when player one attacks the fourth trigger is using the player two's ID
That's why it needs to be [Player number of DamageEventSource]
This way the number of the triggering player will be the number of the array.

I don't think it stacks because it seems the 3 vampiric aura's have the same buff.
 
Level 5
Joined
May 20, 2013
Messages
162
@Avatars Lord your solution seems to work beautifully. Thanks again for the input! ;)

I guess the biggest issues i've created, now that i have what i wanted -ranged vampiric aura -i've thrown the Melee Game out of balance. What will i do now to fix it? :)
 
Last edited:
Level 8
Joined
Mar 19, 2017
Messages
248
Sadly that solution is MPI not MUI, and has some loopholes (what if the hero drops the item?, this is fixable tho).
For a MUI solution you don't even need a player id array or unit index array; i would use the boolean "Unit (damageSource) has Buff" condition (which in fact is an ability level comparisson, as buffs are abilities).
If the source has the vampiric aura buff then perform/stack/add a lifesteal. If you want (with custom scripts) you can even access the level of the buff as those are abilities.
If you want vampiric auras to stack (not recommended), then make as much buffs and buff comparissons, and you continiously modify a real variable, called let's say, lifesteal (if the source has some item, set lifesteal to lifesteal plus some arbitrary number; in other comparisson, if the source has some buff then set modify lifesteal, etc; and at the end of the trigger you grant the stacked lifesteal via SetUnitState).
In vanilla WC3 bone chimes won't stack with vampiric aura tho, and higher level auras will prevail over all others.
 
Level 5
Joined
May 20, 2013
Messages
162
@disruptive_

I built this one off of Command Aura. The reason being, that regular Vamp Aura is hard coded to not show buff on ranged attackers. Command can be selected to recognize ranged or melee. I still use the regular vamp aura buff though.I just wanted this so that ranged units could receive it's benefits too.

What i "might" do to balance it out just a bit, is on my map, the heroes abvance to 11 & get an extra level on their ult. I might curb the Dreadlord a little by dividing his Vampiric Aura onto 4 levels instead of three, and let that extra level of VA replace his super ult.

I don't think i understand the difference between MUI & MPI ;)
 
Multiple Unit Instanceable--> MUI
Multiple Player Instanceable--> MPI

What I gave you only works if one player's heroes have only one Vampiric Aura item or Player has only one unit with vampiric aura.
Example:
Player one's first hero buys vampiric aura. AuraHolder[1]=First Hero
Player one's second hero also buys vampiric aura. AuraHolder[2]= Second Hero

First Hero attack's lifesteal is calculated by the second hero's Vampiric Aura.
 
Level 5
Joined
May 20, 2013
Messages
162
Ok, well i need to fix it for MPI then, because VA items are a common drop, and there are VA units available as Mercenaries.
 
Level 8
Joined
Mar 19, 2017
Messages
248
It happens that getting the level of the buff (with a simple Jass call as gui only allows a boolean) won't work. My mistake.
It either returns 1 if the unit has the buff or 0 if it doesn't. The best solution for this, if you want to use the "get the buff method", is to edit undead vampiric aura (as it is the only ability that features levels) so each level has a different buff. When the ability is leveled the previous level buff will linger and will show in the status UI with the leveled one. Not elegant anymore.
You can edit the tooltip of each buff so it features an assigned level.
 
Level 5
Joined
May 20, 2013
Messages
162
Ok, you guys are throwing a lot at me that i am having trouble processing. That is why i can't hold a job! ;)

Here is all i want. I want just one simple Vampiric Aura buff that does not stack. I want the more powerful aura to take precedence over the weaker one, when multiple auras among allies are overlapping each other's ranges.

In other words... i want it to operate as standard Aura "except" it applies to ranged as well as melee. That was why i had to re-purpose a different ability (i chose command aura) for the job, because it shared its buff to ranged -regular vampiric aura does not, and has no editor options allowing it to do so.

So here are two questions.

1). Does the game calculate the stronger aura simply by level number, or does it calculate it according to the aura life return data?

2). I just realized there is something i "can" do, if it helps the situation.

Since i built this Ranged VA from Command Aura, i "could" toggle it to only apply it to ranged units -this is a built in option of the command aura ability. I could then add it to units with standard Vampiric Aura, and level it by trigger when the hero/item/unit levels vampiric aura. Would this help at all with the MUI/MPI calculations?

And thank you so much for all your help. I am obviously just in over my head with this -but that is not hard to do! :)
 
Level 8
Joined
Mar 19, 2017
Messages
248
The trigger that offered Avatar Lord is MPI, but won't mess with the status UI of the unit. It kind of uses the buff method.

The SOLE buff approach, has less overhead and is MUI, but even if done well, will mess with the status UI of the unit, because:
1. You can't get the level of the buff, so for the effects of Dreadlord Vampiric Aura, that is leveled, you will never know if you must lifesteal 15%/30%/45%, just by getting the buff. One could say at this time, "just use a custom aura system" but that is overkill.
2. Because of point 1, you are resigned to create a different buff for each level (so you vinculate a different buff with a different lifesteal amount), should you want to make this method work.
But because how auras (and leveled abilities in general) work, particularly that if 1 aura has different buffs for each level it will stack the icon of the buff in the unit infocard, as they are indeed DIFFERENT.
It will show the correct level tho, even if they have different buffs.
Example: there are 2 dreadlords, one with level 2 VA, and the other with level 1 VA. Units in range of both will show 2 vampiric auras in their infocard, the level 1 and the level 2 one, as they have different buffs. Each will inform the correct level tho.
With a bit of triggering you can make it so that those auras stack or not at all, and you can even altere the rules of aura prevailing. See the trigger, it uses the DDS you are using.
3. Optional: With some more triggering (will just say "dummy abilities", because i tend to either be extremely vague or overload people with information, but what i'm trying to say is that there is a roundabout) you can make this possible to work without UI messing.

About your 1) question: it does by level number, as ie. you use a dummy command aura and you set all the damage to 0 for each level, guess what could happen if the engine calculates according to the aura damage data amount.
 

Attachments

  • Damage Engine v3.8.w3x
    48.3 KB · Views: 28
Level 5
Joined
May 20, 2013
Messages
162
Ok... now i should probably wait about posting because the truth is i'm operating on so much sleep deprivation that i can not give this topic the clarity it requires.

The more this thread unfolds, the more i long for the bliss of that ignorance wherein when it "looked" like it worked, it worked, and that was good enough for me! ;)

Before we started turning over this topic again on the question of user/player instances, this was the third incarnation of the triggers i had produced based on Avatars advice.

  • Aura setup 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item carried by (Hero manipulating item) of type Scourge Bone Chimes) Equal to (Item being manipulated)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Vampiric Aura (Alt, Hero) for (Triggering unit)) Equal to 0
        • Then - Actions
          • Set AuraHolderItem[(Player number of (Owner of DamageEventSource))] = (Hero manipulating item)
          • Game - Display to (All players) the text: An Item with Vampir...
        • Else - Actions
  • Aura setup 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Entering unit) is in (Units in (Playable map area) matching ((Level of Vampiric Aura (Alt, Unit) for (Entering unit)) Greater than or equal to 1))) Equal to True
    • Actions
      • Set AuraHolderUnit[(Player number of (Owner of DamageEventSource))] = (Entering unit)
      • Game - Display to (All players) the text: A warrior with Vamp...
  • Aura setup 3
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Vampiric Aura (Alt, Hero)
    • Actions
      • Set AuraHolderHero[(Player number of (Owner of DamageEventSource))] = (Learning Hero)
      • Game - Display to (All players) the text: A hero with the Vam...

  • Vampiric Aura Alternative
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has buff Vampiric Aura) Equal to True
      • (DamageEventTarget is A structure) Equal to False
      • (DamageEventTarget is Mechanical) Equal to False
      • (DamageEventTarget is Ethereal) Equal to False
      • (DamageEventTarget is an illusion) Equal to False
      • (DamageEventTarget is dead) Equal to False
      • (Owner of DamageEventTarget) Not equal to (Random player from (All allies of (Owner of DamageEventSource)))
      • (Owner of DamageEventSource) Not equal to (Random player from (All allies of (Owner of DamageEventTarget)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (AuraHolderHero[(Player number of (Owner of DamageEventSource))] belongs to an ally of (Owner of DamageEventSource)) Equal to True
          • ((Region centered at (Position of AuraHolderHero[(Player number of (Owner of DamageEventSource))]) with size ((1400.00 + (400.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolderHero[(Player number of (Owner of DamageEventSource))]))))), 1800.00)) co Equal to True
        • Then - Actions
          • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.05 + (15.00 x (Real((Level of Vampiric Aura (Alt, Hero) for AuraHolderHero[(Player number of (Owner of DamageEventSource))])))))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (AuraHolderUnit[(Player number of (Owner of DamageEventSource))] belongs to an ally of (Owner of DamageEventSource)) Equal to True
              • ((Region centered at (Position of AuraHolderUnit[(Player number of (Owner of DamageEventSource))]) with size ((1720.00 + (80.00 x (Real((Level of Vampiric Aura (Alt, Unit) for AuraHolderUnit[(Player number of (Owner of DamageEventSource))]))))), 1800.00)) con Equal to True
            • Then - Actions
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.32 + (0.03 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderUnit[(Player number of (Owner of DamageEventSource))])))))))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Region centered at (Position of AuraHolderItem[(Player number of (Owner of DamageEventSource))]) with size ((1800.00 + (0.00 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderItem[(Player number of (Owner of DamageEventSource))]))))), 1800.00)) cont Equal to True
                  • (AuraHolderItem[(Player number of (Owner of DamageEventSource))] belongs to an ally of (Owner of DamageEventSource)) Equal to True
                • Then - Actions
                  • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x (0.05 + (0.10 x (Real((Level of Vampiric Aura (Alt, Item) for AuraHolderItem[(Player number of (Owner of DamageEventSource))])))))))
                • Else - Actions
      • Special Effect - Create a special effect attached to the overhead of DamageEventSource using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • Special Effect - Set Color of (Last created special effect) to color of (Owner of DamageEventSource)
      • Special Effect - Set Time Scale of (Last created special effect) to 1.00
      • Special Effect - Destroy (Last created special effect)
Now, for "my" purposes, just testing vs AI in single players, this worked fine. But it is true that while there may be a max of 1 hero per player with VA, there can potentially be multiple units or items per player, which if my understanding is correct, is the complication here. I think my variables accommodated 1 of each per player -which probably isn't enough, since SBC seems to drop a lot on the map, & mercenaries are always another factor.

Is there a way i can retrofit the work i have already done through arrays/hashtables/Unit Groups etc? Is there something i can do, for example adding a mechanism to periodically re-evaluate who the proper Aura Holder should be while the triggers are in effect, destroying & rebuilding variables...


Keep in mind, i still don't really understand the ramifications between MUI & MPI, so try to read between the lines when i have used those terms -there is excellent chance i didn't know what i was saying! ;)

@disruptive_ ok, it took me a while to figure out what you were doing in your map example -& i still probably don't get all of it. One thing i did notice right away is that Dreadlord + SBC = game crash. I was confused for some time by how you had 3 identical VA buffs, that always listed as the same monolithic VA buff. After i added (1),(2),(3) in the suffix fields, & then looked back, it made more sense.

I have not examined your trigger closely yet -i need to take a break from this first.

But here is another option.

I started this whole thread just on the whim of expanding VA apply to ranged as well as melee. In retrospect that is probably not a good idea in terms of how it changes meticulously calculated racial balances. What is likely a better answer, and much easier to implement, is a single hero/item/unit, that has its own "ranged" Vampiric Aura. Just give it a different name, different icons, but it can probably still share the common VA buff.

And as for counting levels... this may be a problem i have to address. My custom heroes level up differently than regular heroes. My heroes start with all their abilities as operational unit abilities that are all advanced simultaneously by one 11 single hero ability with 11 levels. My units work the same way -unit abilities have 11 levels, upgraded through tech.

So... units have higher ability levels than standard heroes -evwen if the abilities themselves are typically weaker.

I had not been aware this had any consequences in how triggers work, ;)

EDIT: What if AuraHolder(Hero/item/unit) arrays were set 1 to 11 to reflect the ability level of the aura source? Would this help anything?

Here is a copy of Disrupti'ves Trigger -with the (#) suffix attached to the buff level for clarity.

  • Set Damage Copy
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has buff Vampiric Aura (3)) Equal to True
        • Then - Actions
          • Set lifesteal = (lifesteal + 0.45)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DamageEventSource has buff Vampiric Aura (2)) Equal to True
            • Then - Actions
              • Set lifesteal = (lifesteal + 0.30)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DamageEventSource has buff Vampiric Aura (1)) Equal to True
                • Then - Actions
                  • Set lifesteal = (lifesteal + 0.15)
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • lifesteal Not equal to 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Percentage life of DamageEventSource) Not equal to 100.00
            • Then - Actions
              • Custom script: call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl", udg_DamageEventSource, "chest"))
            • Else - Actions
          • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x lifesteal))
          • Custom script: call DisplayTextToPlayer(Player(0), 0.,0., GetUnitName(udg_DamageEventSource) + " just stole life equal to " + R2S(udg_lifesteal) + " of it's damage.")
        • Else - Actions
      • Set lifesteal = 0.00
With the structure of this trigger, it appears that i can arrange the Aura hierarchy in descending order of preference. So, i could set for each level "Then:hero; Else:item;Else unit..." or "item, unit, hero..." or whatever order i decided as the first choice for the action to execute off of.

Am i understanding that part correctly?

And come to mind, if i "am" potentially going to set up this trigger for an ability with 11 levels, is there a way i could do it from a hashtable, or an "for each integer A" format instead of stringing that long a sequence of "If/Then/Else" functions together? Or would that ruin the sequence step hierarchy?

EDIT, EDIT! Ok, here is a "something" i made following what Disruptive outlined... but at this point it has no real goal. I am just posting it as a way to communicate the terms i am understanding this in.
AuraHolderHero is a variable representing a unit.
AuraIDnumber is an integer variable preserving the aura ability level of Aura Holder.

Both variables are arrayed to 28, according to player number.

  • Aura Search is Active
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Vampiric Aura (11)) Equal to True)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Vampiric Aura for (Picked unit)) Equal to 11
            • Then - Actions
              • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
              • Set AuraHolderHero_11[(Player number of (Owner of (Picked unit)))] = (Picked unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Vampiric Aura for (Picked unit)) Equal to 10
                • Then - Actions
                  • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                  • Set AuraHolderHero_10[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Vampiric Aura for (Picked unit)) Equal to 9
                    • Then - Actions
                      • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                      • Set AuraHolderHero_9[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Vampiric Aura for (Picked unit)) Equal to 8
                        • Then - Actions
                          • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                          • Set AuraHolderHero_8[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Vampiric Aura for (Picked unit)) Equal to 7
                            • Then - Actions
                              • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                              • Set AuraHolderHero_7[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Vampiric Aura for (Picked unit)) Equal to 6
                                • Then - Actions
                                  • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                                  • Set AuraHolderHero_6[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Vampiric Aura for (Picked unit)) Equal to 5
                                    • Then - Actions
                                      • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                                      • Set AuraHolderHero_5[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Level of Vampiric Aura for (Picked unit)) Equal to 4
                                        • Then - Actions
                                          • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                                          • Set AuraHolderHero_4[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • (Level of Vampiric Aura for (Picked unit)) Equal to 3
                                            • Then - Actions
                                              • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                                              • Set AuraHolderHero_3[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • (Level of Vampiric Aura for (Picked unit)) Equal to 2
                                                • Then - Actions
                                                  • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                                                  • Set AuraHolderHero_2[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                                                • Else - Actions
                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    • If - Conditions
                                                      • (Level of Vampiric Aura for (Picked unit)) Equal to 1
                                                    • Then - Actions
                                                      • Set AuraIDnumber_Hero[(Player number of (Owner of (Picked unit)))] = (Level of Vampiric Aura for (Picked unit))
                                                      • Set AuraHolderHero_1[(Player number of (Owner of (Picked unit)))] = (Picked unit)
                                                    • Else - Actions
But one problem i still see with this method... it still does not account for multiple units with the same ability at the same level owned by the same player. I don't seem to know how to do that. So, at the end of the day, it adds a lot of bloat & still effectively filters very little.

So i am going to ask this again: is this a situation a hashtable could salvage, or am i missing something a lot simpler?

I am in so far over my head, this is completely hopeless! It is just like everything else in this world i set my hand towards: i just suck at it!!!

No wonder i have to apply for SSI! I suck at everything i do!!! Even the games/hobbies i engage in -i suck. I can never produce anything worthy to share with a community! I SUCK AT EVERYTHING!


EDIT EDIT EDIT: "If" i used separate buffs for each level of the aura, you know what would be super cool? Is to be able to use upgrade buttons to represent the Aura, like the one's that you use to represent weapon/armor/caster upgrade levels -the ones that have the level number in the lower right hand corner? It would be totally appropriate. Do we have such buttons anywhere for Vampiric Aura?

Honestly, i think one of the rules for acceptance of any button bundle, it should be required that it have a button in that format in the event some one wants to use it to represent tech/ability level! ;)

O rats! Would the game even know to fill the slot with a level number it is used as the icon for a buff? I don't think Buffs are measured that way in the game. At least, in the editor, there are no level fields to fill in.
 
Last edited:
Level 8
Joined
Mar 19, 2017
Messages
248
Lots of questions, i'm going in reverse order;
1. It happens that YES, there are multiple icons in upgrade style, for vampiric aura and even more.
I presume you don't know about that resource so: Иконки умений с улучшениями - WarCraft 3 / Модмейкинг - XGM: eXtreme Gamedev & Modmaking
2. In the method i posted, you are tracking if a damage source has a determinated buff. Simple and MUI. Auras give buffs automatically, you don't really need to compare or access the range of the damage source with an aura source, unless you precisely want to do something with the aura source. Since vanilla vampiric aura (and every other auras) doesn't feature that at all, i find that pointless. But the sole Buff method has some drawbacks that i posted, will say primarily aesthetic and accessing (can't get the level of the aura) ones. You are also saying that you need to feature 11 levels for the aura, which is also a problem.
The MPI method works well if each player can have up to 1 vampiric aura source. Other than that, if you need lots of customized features, i suggest importing or constructing an aura system. If you need ie. a custom vampiric aura that works in your terms (especially accessing the source of the aura, and ie. the level of the aura) that allows more than 1 unit instances per player then we are precisingly talking about an aura system. I would say that, in your trigger you tried an aproximation to that.
Aura system will recquire either hashtables or a unit indexer, to make it easier to read and construct.
3. The trigger i posted allows for hierarchy. It first compare if a unit has any of kind of vampiric aura buff (remember that i had to create as much vampiric aura buff as levels), but if a buff is founded it stops comparing and sets the lifesteal amount (i should just put "0.45" instead of "lifesteal +0.45" but for some stupid reason i was thinking in aura stacking but then retracted), so the first excludes the others. If lifesteal is not 0, means that we found a damage source eligible for lifesteal actions, so we perform some lifesteal. It shows the heal special effect only to sources with less than 100% of their maximum health. I put the lifesteal reset at the end because who fuc***g knows (should be in the first line of the trigger).
About hashtables, i think you CAN'T automatize the buff(X)->lifesteal(X) approach, with hashtables or unit indexers, atleast in the damage event trigger (with a unit indexer you could make a periodic trigger that refreshes a real array called lifesteal based on the higher level buff, then in the damage event trigger you just access that real array, but here you are trading performance for clarity; SIDENOTE: if you create an array and set it's array limit to any number, it doesn't mean you can't increase the limit after, just look at the array variables of the Damage Engine system and how they're initialized), so to allow just one comparisson instead of 3 or 11 in your case.
 
Status
Not open for further replies.
Top