Mana regen skill based on int? Trigger help

sicpher

New Member
Reaction score
0
Hi i have an idea for this spell but i don't know how to apply it using triggers, please help me.

Unit with 200 INT

Unit casts 'Active' spell on self that increases mana regeneration by 0.5% / 1% / 1.5% of total INT every X second for 30 seconds.
 

sicpher

New Member
Reaction score
0
bump....

because this is a core spell (if it's made possible from trigger) of my range class, that's why i really need help =]
 

Avaleirra

Is back. Probably.
Reaction score
128
You can only bump once in 24 hours btw.

Can't you just add mana to a unit based on their intelligence?


Just make a periodic trigger that takes their int and gives them mana if they have the buff.
 

hopy

Active Member
Reaction score
64
Im not sure if theres a easy'r way of doing this but this is my own solution:

First of all you will need an active ability that gives a buff, something like Beserk or something I think would do fine.

Trigger:
  • Arcane Meditation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Meditation
    • Actions
      • Trigger - Turn on Arcane Meditation 2 <gen>


Trigger:
  • Arcane Meditation 2
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set MM_Hero = (Units in (Entire map) matching (((Matching unit) has buff Arcane Meditation) Equal to True))
      • Unit Group - Pick every unit in MM_Hero and do (Actions)
        • Loop - Actions
          • Set MM_Int[1] = ((Intelligence of (Picked unit) (Include bonuses)) / 2)
          • Set MM_Int[2] = (Intelligence of (Picked unit) (Include bonuses))
          • Set MM_Int[3] = (MM_Int[1] + MM_Int[2])
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + (Real(MM_Int[(Level of Arcane Meditation for (Picked unit))])))
      • Custom script: call DestroyGroup(bj_MM_Hero)


Just so you know the whole MM_Int[1] = blahblah, MM_Int[2] = blahblah and MM_Int[3] = (MM_Int[1] + MM_Int[2]).
Thats because I couldnt think of any way of doing this in a formula with Int / abilty level or something so I did it like this ... works just as well I'd say :p

MM_Int is an Intreger Variable with an array.
MM_Hero is an Unit Group Variable
Arcane Meditation is the abiltiy ... I thought this would be a nice name for itxD (stolefromthemagetalentsinWoW :O)
- Base it off something like beserk without any bonusses ... for an abiltiy like this Id remove the mana cost also xD.
Arcane Meditation is also a buff ... I forgot to give it a different name so it wouldnt be confusing.


I have not tested this yet, but my PC takes about 10 minutes to load a map so I prefer not to test it myself. xD
Sorry about that.
 

tooltiperror

Super Moderator
Reaction score
231
You can only bump once in 24 hours btw.

Can't you just add mana to a unit based on their intelligence?


Just make a periodic trigger that takes their int and gives them mana if they have the buff.

Personally I would not use that method, because Buff checking is not very accurate.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
BUMP ?!

I don't know how many times I've told new people here:
Don't bump/double post withn 24 hours !

There are rules in this forum, please read them !
(Sorry for this "outbrake" but I'm getting very tired of it ! :()

Anyways, to your problem, here's a version which uses custom value (Use it if you're not using unit's custom value for other stuff) :
Trigger:
  • Int Regeneration
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 30
      • Unit Group - Add (Triggering unit) to Periodic_Group


Trigger:
  • Int Periodic
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Animate Dead for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Picked unit)) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
            • Else - Actions


And here we use hashtables:
Trigger:
  • Int Regen Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TempHash = (Last created hashtable)


Trigger:
  • Int Regeneration Hash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Hashtable - Save 30 as 1 of Key (Triggering unit) in TempHash
      • Unit Group - Add (Triggering unit) to Periodic_Group


Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempInt = (Load 1 of Key (Picked unit) from TempHash)
          • Hashtable - Clear all child hashtables of child 1 in TempHash
          • Hashtable - Save (TempInt - 1) as 1 of Key (Picked unit) in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Your_Ability for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
              • Hashtable - Clear TempHash
            • Else - Actions


I think those should work :S
(Hashtables don't really work that good on Newge, but I hope that reads correct XD)
 

hopy

Active Member
Reaction score
64
Naw I thought I was all cool and helpfull with my little post and than I noticed Komaqtion's post and was all like: <,<

But might I ask something ... it doesn't realy have anything to do with this subject I guess and I aint the creator of this threat but ...
What exactly is a hashtable? I noticed those were new in that patch but never understood what they do.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I'd simply suggest you read on it :p

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/

But basically it's faster gamecache...
Though you might not know what that is either XD

Well, it's just like a variable which can handle several values inside other values... It's almost like structs, though not vJASS and easier to access from the outside ;)

Anyways, read that tutorial and you should understand a bit more at least ;)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, XD Sorry it was supposed to be this:
Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempInt = (Load 1 of 0 from TempHash)
          • Hashtable - Clear all child hashtables of child Key (Picked unit) in TempHash
          • Hashtable - Save (TempInt - 1) as 1 of 0 in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Animate Dead for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
              • Hashtable - Clear all child hashtables of child Key (Picked unit) in TempHash
            • Else - Actions


;)
 

SuperSoldier

New Member
Reaction score
10
Now it's even less MUI... You are loading and saving one value for every unit, not one value per unit, but just one value overall... So now if 30 people cast this spell, they each only get one tick of it...

EDIT: Here, since you're taking forever reading that global hashtable thread, I'ma fix this for you:

Trigger:
  • Int Regen Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TempHash = (Last created hashtable)


Trigger:
  • Int Regeneration Hash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Hashtable - Save 30 as 1 of Key (Triggering unit) in TempHash
      • Unit Group - Add (Triggering unit) to Periodic_Group
      • Trigger - Turn on Int Periodic Hash&lt;gen&gt;


Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempBool = False
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempBool = True
          • Set TempInt = (Load 1 of Key (Picked unit) from TempHash)
          • Hashtable - Save (TempInt - 1) as 1 of Key (Picked unit) in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Your_Ability for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempBool Equal to False
        • Then - Actions
          • Hashtable - Clear TempHash
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

Psiblade94122

In need of sleep
Reaction score
138
alternitively you can make the spell give a buff to the caster and detect everyone that has the buff every second (then restore mana using picked unit as your "unit")

edit, didnt see post #5
but, why isnt buff checking accurate?
 

sicpher

New Member
Reaction score
0
Thanks for all the helpful replies+triggers, and I PROMISE, i will read the rules before i post next time! cheers! :thup:
 

sicpher

New Member
Reaction score
0
Now it's even less MUI... You are loading and saving one value for every unit, not one value per unit, but just one value overall... So now if 30 people cast this spell, they each only get one tick of it...

EDIT: Here, since you're taking forever reading that global hashtable thread, I'ma fix this for you:

Trigger:
  • Int Regen Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TempHash = (Last created hashtable)


Trigger:
  • Int Regeneration Hash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Hashtable - Save 30 as 1 of Key (Triggering unit) in TempHash
      • Unit Group - Add (Triggering unit) to Periodic_Group
      • Trigger - Turn on Int Periodic Hash&lt;gen&gt;


Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempBool = False
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempBool = True
          • Set TempInt = (Load 1 of Key (Picked unit) from TempHash)
          • Hashtable - Save (TempInt - 1) as 1 of Key (Picked unit) in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Your_Ability for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempBool Equal to False
        • Then - Actions
          • Hashtable - Clear TempHash
          • Trigger - Turn off (This trigger)
        • Else - Actions





I have 1 problem with this trigger, the "Cooldown" on the spell does not work if this trigger is active . I based my spell on Roar
 

SuperSoldier

New Member
Reaction score
10
I have 1 problem with this trigger, the "Cooldown" on the spell does not work if this trigger is active . I based my spell on Roar

wat.
I have no idea how your spell could not have a cooldown if this trigger is active, it doesn't pause the unit, order it to stop, reset the cooldown, or re-add the skill(no idea if that would cause it anyway...)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      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