Custom Aura (advanced help requied)

ultimate11

Active Member
Reaction score
25
Hello helpers.
I`v created an aura based on devation aura (just for buff effect :D) that increases friendly hero units their stats (int,str,agi) by (for exemple at aura lv.3) 60% of primary attribute and 30% of secondary attribute.
The system that recognize hero primary attribute is based of hero selection and each hero get and integer as his own custom value 1 = strenght 2 = agility 3 = intelligence
Aura work`s very very fine with no issue is adding the correct amount of status then when hero is not in range of aura is taking back the added value of status as should be.
The only problem is that I can`t make it MUI.
Maybe can somebody give me some hint :D.Here are the triggers:
Trigger:
  • Aura
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- Buffing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Buffer is alive) Equal to True
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of Buffer using war3mapImported\LawOfBloodScroll_Cast.mdx
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
      • Set Buffed_group = (Units in (Entire map) matching (((Matching unit) has buff Brilliance Aura (custom)) Equal to True))
      • Unit Group - Pick every unit in Buffed_group and do (Actions)
        • Loop - Actions
          • Set Buffed = (Load 1 of (Key (Picked unit)) from MY_hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Buffed Equal to False
            • Then - Actions
              • Hashtable - Save True as 1 of (Key (Picked unit)) in MY_hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 1
                • Then - Actions
                  • Set Buff_lvl = (Level of Briliance Aura for Buffer)
                  • Set Buff_val_int = (Integer(((Real((Intelligence of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_str = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.20 x (Real(Buff_lvl))))))
                  • Set Buff_val_agi = (Integer(((Real((Agility of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                  • Hero - Modify Intelligence of (Picked unit): Add Buff_val_int
                  • Hero - Modify Strength of (Picked unit): Add Buff_val_str
                  • Hero - Modify Agility of (Picked unit): Add Buff_val_agi
                  • Hashtable - Save Buff_val_str as 2 of (Key (Picked unit)) in MY_hashtable
                  • Hashtable - Save Buff_val_agi as 3 of (Key (Picked unit)) in MY_hashtable
                  • Hashtable - Save Buff_val_int as 4 of (Key (Picked unit)) in MY_hashtable
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 2
                • Then - Actions
                  • Set Buff_lvl = (Level of Briliance Aura for Buffer)
                  • Set Buff_val_int = (Integer(((Real((Intelligence of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_str = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_agi = (Integer(((Real((Agility of (Picked unit) (Include bonuses)))) x (0.20 x (Real(Buff_lvl))))))
                  • Hero - Modify Intelligence of (Picked unit): Add Buff_val_int
                  • Hero - Modify Strength of (Picked unit): Add Buff_val_str
                  • Hero - Modify Agility of (Picked unit): Add Buff_val_agi
                  • Hashtable - Save Buff_val_str as 2 of (Key (Picked unit)) in MY_hashtable
                  • Hashtable - Save Buff_val_agi as 3 of (Key (Picked unit)) in MY_hashtable
                  • Hashtable - Save Buff_val_int as 4 of (Key (Picked unit)) in MY_hashtable
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 3
                • Then - Actions
                  • Set Buff_lvl = (Level of Briliance Aura for Buffer)
                  • Set Buff_val_int = (Integer(((Real((Intelligence of (Picked unit) (Include bonuses)))) x (0.20 x (Real(Buff_lvl))))))
                  • Set Buff_val_str = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_agi = (Integer(((Real((Agility of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                  • Hero - Modify Intelligence of (Picked unit): Add Buff_val_int
                  • Hero - Modify Strength of (Picked unit): Add Buff_val_str
                  • Hero - Modify Agility of (Picked unit): Add Buff_val_agi
                  • Hashtable - Save Buff_val_str as 2 of (Key (Picked unit)) in MY_hashtable
                  • Hashtable - Save Buff_val_agi as 3 of (Key (Picked unit)) in MY_hashtable
                  • Hashtable - Save Buff_val_int as 4 of (Key (Picked unit)) in MY_hashtable
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 1
                • Then - Actions
                  • Set Buff_lvl = (Level of Briliance Aura for Buffer)
                  • Set Buff_val_int = (Integer(((Real(((Intelligence of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.20 x (Real(Buff_lvl))))))
                  • Set Buff_val_str = (Integer(((Real(((Strength of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_agi = (Integer(((Real(((Agility of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.10 x (Real(Buff_lvl))))))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • Buff_val_str Not equal to (Load 2 of (Key (Picked unit)) from MY_hashtable)
                          • Buff_val_agi Not equal to (Load 3 of (Key (Picked unit)) from MY_hashtable)
                          • Buff_val_int Not equal to (Load 4 of (Key (Picked unit)) from MY_hashtable)
                    • Then - Actions
                      • Hero - Modify Intelligence of (Picked unit): Subtract (Load 4 of (Key (Picked unit)) from MY_hashtable)
                      • Hero - Modify Strength of (Picked unit): Subtract (Load 2 of (Key (Picked unit)) from MY_hashtable)
                      • Hero - Modify Agility of (Picked unit): Subtract (Load 3 of (Key (Picked unit)) from MY_hashtable)
                      • Set Buff_val_int = (Integer(((Real((Intelligence of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                      • Set Buff_val_str = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.20 x (Real(Buff_lvl))))))
                      • Set Buff_val_agi = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                      • Hero - Modify Intelligence of (Picked unit): Add Buff_val_int
                      • Hero - Modify Strength of (Picked unit): Add Buff_val_str
                      • Hero - Modify Agility of (Picked unit): Add Buff_val_agi
                      • Hashtable - Save Buff_val_str as 2 of (Key (Picked unit)) in MY_hashtable
                      • Hashtable - Save Buff_val_agi as 3 of (Key (Picked unit)) in MY_hashtable
                      • Hashtable - Save Buff_val_int as 4 of (Key (Picked unit)) in MY_hashtable
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 2
                • Then - Actions
                  • Set Buff_lvl = (Level of Briliance Aura for Buffer)
                  • Set Buff_val_int = (Integer(((Real(((Intelligence of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_str = (Integer(((Real(((Strength of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_agi = (Integer(((Real(((Agility of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.20 x (Real(Buff_lvl))))))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • Buff_val_str Not equal to (Load 2 of (Key (Picked unit)) from MY_hashtable)
                          • Buff_val_agi Not equal to (Load 3 of (Key (Picked unit)) from MY_hashtable)
                          • Buff_val_int Not equal to (Load 4 of (Key (Picked unit)) from MY_hashtable)
                    • Then - Actions
                      • Hero - Modify Intelligence of (Picked unit): Subtract (Load 4 of (Key (Picked unit)) from MY_hashtable)
                      • Hero - Modify Strength of (Picked unit): Subtract (Load 2 of (Key (Picked unit)) from MY_hashtable)
                      • Hero - Modify Agility of (Picked unit): Subtract (Load 3 of (Key (Picked unit)) from MY_hashtable)
                      • Set Buff_val_int = (Integer(((Real((Intelligence of (Picked unit) (Include bonuses)))) x (0.20 x (Real(Buff_lvl))))))
                      • Set Buff_val_str = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                      • Set Buff_val_agi = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                      • Hero - Modify Intelligence of (Picked unit): Add Buff_val_int
                      • Hero - Modify Strength of (Picked unit): Add Buff_val_str
                      • Hero - Modify Agility of (Picked unit): Add Buff_val_agi
                      • Hashtable - Save Buff_val_str as 2 of (Key (Picked unit)) in MY_hashtable
                      • Hashtable - Save Buff_val_agi as 3 of (Key (Picked unit)) in MY_hashtable
                      • Hashtable - Save Buff_val_int as 4 of (Key (Picked unit)) in MY_hashtable
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to 3
                • Then - Actions
                  • Set Buff_lvl = (Level of Briliance Aura for Buffer)
                  • Set Buff_val_int = (Integer(((Real(((Intelligence of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.20 x (Real(Buff_lvl))))))
                  • Set Buff_val_str = (Integer(((Real(((Strength of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.10 x (Real(Buff_lvl))))))
                  • Set Buff_val_agi = (Integer(((Real(((Agility of (Picked unit) (Include bonuses)) - (Load 4 of (Key (Picked unit)) from MY_hashtable)))) x (0.10 x (Real(Buff_lvl))))))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • Buff_val_str Not equal to (Load 2 of (Key (Picked unit)) from MY_hashtable)
                          • Buff_val_agi Not equal to (Load 3 of (Key (Picked unit)) from MY_hashtable)
                          • Buff_val_int Not equal to (Load 4 of (Key (Picked unit)) from MY_hashtable)
                    • Then - Actions
                      • Hero - Modify Intelligence of (Picked unit): Subtract (Load 4 of (Key (Picked unit)) from MY_hashtable)
                      • Hero - Modify Strength of (Picked unit): Subtract (Load 2 of (Key (Picked unit)) from MY_hashtable)
                      • Hero - Modify Agility of (Picked unit): Subtract (Load 3 of (Key (Picked unit)) from MY_hashtable)
                      • Set Buff_val_int = (Integer(((Real((Intelligence of (Picked unit) (Include bonuses)))) x (0.20 x (Real(Buff_lvl))))))
                      • Set Buff_val_str = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                      • Set Buff_val_agi = (Integer(((Real((Strength of (Picked unit) (Include bonuses)))) x (0.10 x (Real(Buff_lvl))))))
                      • Hero - Modify Intelligence of (Picked unit): Add Buff_val_int
                      • Hero - Modify Strength of (Picked unit): Add Buff_val_str
                      • Hero - Modify Agility of (Picked unit): Add Buff_val_agi
                      • Hashtable - Save Buff_val_str as 2 of (Key (Picked unit)) in MY_hashtable
                      • Hashtable - Save Buff_val_agi as 3 of (Key (Picked unit)) in MY_hashtable
                      • Hashtable - Save Buff_val_int as 4 of (Key (Picked unit)) in MY_hashtable
                    • Else - Actions
                • Else - Actions
      • Custom script: call DestroyGroup(udg_Buffed_group)
      • -------- Debuffing --------
      • Set Buffed_group = (Units in (Entire map) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) has buff Brilliance Aura (custom)) Equal to False)))
      • Unit Group - Pick every unit in Buffed_group and do (Actions)
        • Loop - Actions
          • Set Buffed = (Load 1 of (Key (Picked unit)) from MY_hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Buffed Equal to True
            • Then - Actions
              • Hashtable - Save False as 1 of (Key (Picked unit)) in MY_hashtable
              • Set Buff_val_int = (Load 4 of (Key (Picked unit)) from MY_hashtable)
              • Set Buff_val_str = (Load 2 of (Key (Picked unit)) from MY_hashtable)
              • Set Buff_val_agi = (Load 3 of (Key (Picked unit)) from MY_hashtable)
              • Hero - Modify Intelligence of (Picked unit): Subtract Buff_val_int
              • Hero - Modify Strength of (Picked unit): Subtract Buff_val_str
              • Hero - Modify Agility of (Picked unit): Subtract Buff_val_agi
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in MY_hashtable
            • Else - Actions
      • Custom script: call DestroyGroup(udg_Buffed_group)

Trigger:
  • Aura learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Briliance Aura
    • Actions
      • Set Buffer = (Triggering unit)
      • Trigger - Turn on Aura <gen>
      • Trigger - Turn off (This trigger)
 

inevit4ble

Well-Known Member
Reaction score
38
Tbh, when I see this I almost feel like it could be done quite easily with vJASS
true but hey,

You can use a hashtable for each stat. Instead of "MyHashtable" you would have "StrTable, AgiTable, IntTable" but I dont think thats an issue.

Having "buffer" more than once is the issue. An array how sort of help. You could save the unit dependent on OwningPlayers Number but if the player has more than one unit with this aura it won't work either, so another hashtable for that would work.

Things to note: Note sure if the buffs are stackable but if a unit has one buff and is surrounded by 3 units with this aura, the buffed unit will get 3 x the Bonuses. IDK if thats desired
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
have you thought about using a hashtable with the units as the key and saving the values like that to make it MUI?
edit: nvm i see you are doing that...
as far as i can see you are doing it correctly for mui, the only problem i forsee is extreme lag if you are picking every unit not in an auras range of a unit every second

you should add the units to a unit group and remove them via:

Trigger:
  • Events
    • A unit increases the level of <spell>
    • Conditions
      • Level of <spell> for triggering unit is equal to 1
    • Actions
      • Unit Group - Add triggering unit to Has_Aura
      • Unit Group - Add triggering unit to Aura_Active_Group (unless u dont want the aura carrier to be affected)
      • Trigger - Add event (A unit comes within <aura range> of triggering unit to Trigger 2 <gen>
      • Trigger - Add event (A unit leaves <aura range> of triggering unit to Trigger 2 <gen>


Trigger 2:
Trigger:
  • Events
    • Conditions
    • Actions
      • Set Still_Affected = true
      • Unit Group - Pick all units in Has_Aura matching condition (within <aura range> of triggering unit) and do actions
        • Actions
          • Set Still_Affected = False
      • If Then Else
        • If
          • Still Affected is equal to true
          • Triggering unit is a Hero is equal to true
        • Then
          • Unit Group - Add unit to Aura_Active_Group
        • Else


Trigger:
  • Events
    • Time - Periodic Event every (however many seconds you want) seconds
    • Conditions
    • Actions
      • Unit Group - pick all units in Aura_Active_Group and do actions
        • Actions
          • <---- Here is where you add the aura effects
 

ultimate11

Active Member
Reaction score
25
@GFreak not lag it`s a problem,aura dont leak ,dont lag dont make any possible problem.The problem is me that I cant find a solution to make it MUI.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
as far as i could tell your version should work for mui... thats what concerned me as for how it was done, it could not be working because of some odd glitch, and the way you did it seems kinda all over the place... was just suggesting a way that might work
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top