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

Unit max life

Status
Not open for further replies.
Level 3
Joined
Oct 20, 2011
Messages
26
Hi, i'm making an ORPG map and want some help to a spell:

I want the spell to give the hero(example blademaster) 5000 extra to hes maximum hitpoints. The spell is a pasive spell(you can not use it every X seconds)

PS: The spell may not contains vJass, GUI or any programs(ONLY THE BASIC WC3 EDITOR)

Thank you! :goblin_boom:
 
just create an ability based on the item ability which increases max hit points... then create a dummy ability based on some passive ability, then when the hero learns it, add the custom MHP increase ability...

and oh, GUI is part of the basic wc3 editor dude... its basically what you see in the trigger editor...

and are you serious in making an ORPG, when you don't even know this? coz going on like this would just either be that your map will be a total failure or it will take years to finish or you won't finish it as you'd get tired or scrap it when you became good with triggering and realize that what you've done so far is bad...
 
Level 3
Joined
Oct 20, 2011
Messages
26
just create an ability based on the item ability which increases max hit points... then create a dummy ability based on some passive ability, then when the hero learns it, add the custom MHP increase ability...

and oh, GUI is part of the basic wc3 editor dude... its basically what you see in the trigger editor...

and are you serious in making an ORPG, when you don't even know this? coz going on like this would just either be that your map will be a total failure or it will take years to finish or you won't finish it as you'd get tired or scrap it when you became good with triggering and realize that what you've done so far is bad...

No no..
the last 10 maps i made didnt be to something but this is difrent...

well, do you mind to show to trigger and "dummy", im kidn of lost cause i never made a dummy myself. People always make the dumy for me without explaining what it does or why/how it does what it do.
 
Just take like for example the evasion spell as the base, then set all the evasion fields to 0.0 and give it the right icon, name etc... then give that ability to the hero... now create a trigger which when the hero learns/level that skill, will add the max hp modifying ability to it...

so you're serious??? you're talking of an ORPG here... and you don't even know what GUI or a dummy is for...
 
Level 3
Joined
Oct 20, 2011
Messages
26
so long, so good :)

But i cant increase tje max hp of the hero, only set the hp to full

i make a trigger who set life of trggering unit to life of triggering unit + 5000(he just heal 5000 hp)

I can't find the place where the text says: set maximum of triggering unit to maximum life of triggering unit + 5000.
 
Level 3
Joined
Oct 20, 2011
Messages
26
I will try now :)
If it doesn't work i will give up on that spell and make it when i've trained some more

THANK YOU

PS: can't give u more rep again before i have gived some mroe around to otehr ppl :S

-i'll give u when i can
 
Level 8
Joined
Jan 8, 2010
Messages
493
the item ability Adiktuz is talking about is the Item Life Bonus (any of Greater, Least, Lesser or least will do). create another ability based on it and change Data - Max Life Gained to 5000.

btw, when you have it as "you cannot use it every x seconds" it's not really a passive ability (since a passive ability is active the moment the unit learns it) but it's an active spell since you use it. and you really don't need to train some more to understand some complex ability triggering or whatnot, you can ask something here if it's really something that you can't understand (though don't ask about "where is the Object Editor" or something like that, people will probably hate you) XD
 
Level 3
Joined
Oct 20, 2011
Messages
26
Thank you :)

If anyone (knows how to/can) make the trigger and want to spend some time to help me i would be glad.

Ofc you will get rep.

PS: where is the object editor xD
 
tobi3234 said:
PS: where is the object editor xD

this...

ronojales said:
(though don't ask about "where is the Object Editor" or something like that, people will probably hate you) XD

I'm sleepy as its 1:22am here now (and I need to wake up by about 6am) so I can't help for now...
 
Level 8
Joined
Jan 8, 2010
Messages
493
@Darkgrom
that doesn't change the unit's Max HP, but heals the hp of the unit to the value.

@tobi
if you are not familiar with indexing systems and such, i'll suggest you base your HP-Max-ing ability from Berserk for its buff, so you don't need to create a dummy unit and many triggering. since you probably want your spell to do something like this:
1. unit casts the spell
2. unit receives the Max HP bonus
3. after a while, the Max HP bonus will be removed from the unit
..right?

so like i said, base your ability from Berserk. place a custom buff in it, and have this trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • Ability being cast Equal to YourAbility
  • Actions
    • Add (Triggering unit) to CustomGroup
    • Turn on NextTrigger
  • NextTrigger
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CustomGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff CustomBuff) Equal to True
            • Then - Actions
              • Unit - Add MaxHP Ability to (Picked unit)
            • Else - Actions
              • Unit - Remove MaxHP Ability from (Picked unit)
              • Unit Group - Remove (Picked unit) from CustomGroup
CustomGroup is a Unit Group variable which will have units the used the ability in it.
CustomBuff is the buff you placed in your Berserk-based ability (btw, your Berserk-based ability should have all data changed to 0).
MaxHP Ability is the ability based from Item Life Bonus.
 
Level 3
Joined
Oct 20, 2011
Messages
26
@Darkgrom
that doesn't change the unit's Max HP, but heals the hp of the unit to the value.

@tobi
if you are not familiar with indexing systems and such, i'll suggest you base your HP-Max-ing ability from Berserk for its buff, so you don't need to create a dummy unit and many triggering. since you probably want your spell to do something like this:
1. unit casts the spell
2. unit receives the Max HP bonus
3. after a while, the Max HP bonus will be removed from the unit
..right?

so like i said, base your ability from Berserk. place a custom buff in it, and have this trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • Ability being cast Equal to YourAbility
  • Actions
    • Add (Triggering unit) to CustomGroup
    • Turn on NextTrigger
  • NextTrigger
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CustomGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff CustomBuff) Equal to True
            • Then - Actions
              • Unit - Add MaxHP Ability to (Picked unit)
            • Else - Actions
              • Unit - Remove MaxHP Ability from (Picked unit)
              • Unit Group - Remove (Picked unit) from CustomGroup
CustomGroup is a Unit Group variable which will have units the used the ability in it.
CustomBuff is the buff you placed in your Berserk-based ability (btw, your Berserk-based ability should have all data changed to 0).
MaxHP Ability is the ability based from Item Life Bonus.

Nearly true :)
Try to think on an ORPG-map u know. I want the spell to be passive, so then u reach level 30 ur max hp will be increased with 5000 permenent or
( or example increased by 100 x str)

I'll give u rep for ur hard work, so if u dont want, u dont have to help me anymore right now, cause u allready did alot :)
PS: i just finnished my charge spell (If anybody need that spell to their map)
 
Level 8
Joined
Jan 8, 2010
Messages
493
ahh so that's what you need the Max HP for (i really never got to playing most ORPG's since i can't start most of them with a single-player XD)
then what you just need is just something like
  • Events
    • Unit - A unit Gains a level
  • Conditions
    • (Level of (Triggering unit)) Equal to 30
  • Actions
    • Unit - Add MaxHP Skill to (Triggering unit)
    • Unit - Add Dummy Skill to (Triggering unit)
Dummy Skill is just something you show on the UI, something with a tooltip like
"Your hero gains 5000 bonus HP for reaching level 30". it really doesn't do anything. just base it off from another passive (or aura) ability and have all data to 0. if you don't want to add it don't :p
your "you can not use it every x seconds" is confusing though.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
Ok i will do it as ronojals with a item ability

1. open the object editor
2. select abilitys and go to special > items > item life bonis greater (lesser)
3. now you see rows to the right find the field "data - max life gained" to 5000

now use
  • Untitled Trigger 001
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to HP
    • Actions
      • Unit - Add Item Life Bonus (Lesser) to (Triggering unit)
 

Attachments

  • HP done.w3x
    16.5 KB · Views: 98
Level 17
Joined
Nov 13, 2006
Messages
1,814
Hi, i'm making an ORPG map and want some help to a spell:

I want the spell to give the hero(example blademaster) 5000 extra to hes maximum hitpoints. The spell is a pasive spell(you can not use it every X seconds)

PS: The spell may not contains vJass, GUI or any programs(ONLY THE BASIC WC3 EDITOR)

Thank you! :goblin_boom:

u can do with techtree in object editor + trigger.

with in trigger when u learn that skill set upgrade lv to ur custum upgrade (u can use the animal war training too for this just dont forget add to ur hero: techtree upgrades ur upgrade)
 
Level 2
Joined
Oct 26, 2011
Messages
25
you honestly dont need to use any triggers for this. just use the item ability of hp boost (as people have previously mentioned) and turn change it to a hero ability. simply add the correct tooltips, icons and values. bam. done, in like 1 minute
 
Level 2
Joined
Oct 18, 2011
Messages
16
Have you tried increasing the units armor? I've made a unit with 510,000 HP and I gave him 50 armor (75% damage reduction) and he is pretty hard to kill. 15 Hero's took about 10 minutes to kill him.
 
Level 2
Joined
Oct 26, 2011
Messages
25
yes ive tried it and it works just fine for me. also tried doing the same thing with the mana boost, which also works

edit: ill upload a map or screenshot or something when i get home if i remember
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Have you tried increasing the units armor? I've made a unit with 510,000 HP and I gave him 50 armor (75% damage reduction) and he is pretty hard to kill. 15 Hero's took about 10 minutes to kill him.

Armor acts as extra hitpoints when you receive attack damage in WC3. 50 armor in melee conditions acts as +300% more hitpoints when you take attack damage. This equates to a 75% damage reduction as you have equivenrtly 4 hitpoints to take damage for every 1 hitpoint you lose. A common and foolish mistake people make is to think that armor has diminishing returns. Armor does not have diminishing returns, an extra 10 armor in melee means an extra 60% of your hitpoints worth of attack damage you can take before dieing.
 
Level 2
Joined
Oct 26, 2011
Messages
25
ok strange. i even created a new map to try it and it didnt exactly work as i had planned....

i made it off a passive health boost, and the ability worked for level 1, i left it at 300, but after i increased it to level 2, there was no change (should have boosted another 300). i guess u will have to do this through triggers then, unless u make seperate abilities and replace each level with a trigger, but thats really strange, i could have sworn ive done it before

guess its just another world editor bug that doesnt work, such as changing immolate damage.
sorry =/
 
Level 8
Joined
Jan 8, 2010
Messages
493
yeah, Item Life Bonus, as well as Item Mana Bonus (i think that's what they were called?), always works for level 1, but not for further levels. to have multiple bonuses for one unit you even have to change the ability's name (Item Life Bonus 1, Item Life Bonus 2, etc) 'cause i tested some time ago and added two Item Life Bonus and it didn't give the bonus i desired, until i changed that other one's name.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
And that is why you have to give it levels and add/remove the ability. Set level 1 bonus to 0. Set level 2 bonus to -100. Add the ability, set the level to 2 and remove it. +100 HP acquired.

To remove 100 HP, either create similar ability but +100 as level 2 value, or use the same ability and set level 3 data to +100.
 
Level 10
Joined
Oct 5, 2008
Messages
355
Here is an alternate, i think the idea came up at the very beginning of this topic, but was somehow thrown away

I made a trigger like this a time ago for an orpg i was working on, the difference is that it 1. could increase or reduce the maximal hp value by a value up to +-9999, 2. it didn't added any ability to the hero and 3. it will bug on stopped units and units without any inventory which could use powerups.

So, since you don't want to increase the max hp of normal units but the hp of heros, this method could be quite usefull for you. (ofc you could add to them the "Inventory (Hero)" ability, unpause them, run this method and remove the inventory and pause them again when needed)

It was based on the idea to add the unit an amount of custom tomes of health, increasing or decreasing its max hp.

When you would incease the max hp by 5000 through tomes, you could take a +5000 tome, 5 +1000 tomes or 500 +10 tomes. The first decision is for your question the best choise.


So, just add a Tome of health +5000 to your hero when he's unpaused, and you increased his health by 5000.


  • HP Addition
    • Events
      • Insert Event here
    • Conditions
      • (Changedunit is alive) Equal True
    • Actions
      • Hero - Create HP+5000 and give it to Changedunit

(You will need to create the tome and to create the ability which adds the 5k Hp to your hero and add this ability to the tome)


Beware: The following needs some understanding of triggering overall and some maths

The trigger came from the following thoughts:
You can divive a number into the digits multuiplied with 10 power a number:

an Example: 3210 would be: 3*103+2*102+4*101+5*100
To reduce laggs by creating a mass of tomes, i used this.

So, you need the following to increase the HP:

N abilitys and N items (where N is a variable of your choise):
N abilitys: N times a changed version of the ability of the health tome (Permanent Life increasement (+50), each one with the values +1, +10, +100, +1000.... (depending on how high your numbers will be, for +5000, you will need to set N equal to 4, else you will create too many tomes. (like said above)
N items: Custom versions of the tomes, which inhibits the single abilitys and which will be added to the hero

Then you need 5 global variables:
-An Integervariable, which represents N (In the following, i named it "HPitemsamount")
-2 Integervariables, which is required for the Loop (I named it "Loopinteger" and "Loopinteger2", you can recycle it in other triggers theoretically)
-An Integervariable, which represents the amount of HP which should be added to the hero (I named it "Hpaddition")
-An Array of Itemtypevariable of the Arrayamount of N, representing the tomes which increases the health (I named it "HPItems", maybe with "Hpitemsamount" the only variables which cannot by recycled)
-A Unitvariable, which represents the unit, whose Hp should be increased (I named it "Changedunit")

The triggers are rather small:

The INI, to determinate the tomes:

  • HP Table
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Required Variables: HPitemsamount (In fact, the variable N); HPitems[1....N] (The items, which increased the hp) --------
      • Set HPitemsamount = 4
      • Set HPitems[1] = HP+1
      • Set HPitems[2] = HP+10
      • Set HPitems[3] = HP+100
      • Set HPitems[4] = HP+1000
The main trigger, in your triggers, you need just to set ChangedUnit to the unit, whose HP should be increased and Increasedamount to the amount of max HP which should be added and then just run this trigger, checking the conditions:

  • HP Addition
    • Events
    • Conditions
      • (Changedunit is alive) Equal True
      • HPaddition Greater than 0
    • Actions
      • -------- Required Variables: HPaddition (The amount you want to increase the max HP); ChangedUnit (The unit, whose Max Hp should be increased), Loopinteger and Loopinteger2 (For the Loop) --------
      • For each (Integer Loopinteger) from 1 to HPitemsamount, do (Actions)
        • Schleifen - Aktionen
          • -------- HP+(10 power N) Tomes: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • (HPaddition mod (Integer((Power(10.00, (Real(Loopinteger))))))) Greater than 0
              • ((HPaddition mod (Integer((Power(10.00, (Real(Loopinteger))))))) / (Integer((Power(10.00, ((Real(Loopinteger)) - 1.00)))))) Greater than als 0
            • 'THEN'-Actions
              • For each (Integer Loopinteger2) from 1 to ((HPaddition mod (Integer((Power((Real(Loopinteger)), 10.00))))) / (Integer((Power((Real((Loopinteger - 1))), 10.00))))), do (Actions)
                • Loop - Actions
                  • Hero - Create HPitems[Loopinteger] and give it to Changedunit
            • 'ELSE'-Actions
(Unfortunately, the power function just exists for Real variables in GUI :( )



With tomes, there is one problem in the engine:
They wont be removed on use!

So, spamming with tomes would cause the map to lag after a while.
Trigger:
  • Tomeremover
    • Events
      • Unit - A unit Aquires an Item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Gleich HP+1000
    • Actions
      • Item - Remove (Item being manipulated)
In the "Or" conditions, add any tomes you want to remove. The tomes will be removed after their effect takes place.


Maybe this is not the best version of the trigger, fell free to modify it to your liking

I hope i could help, and next time, i read the posts before more properly to delete redundant content from my post ;)

Edit: With the system i meantioned above, you are able, to use a dummi ability, on which learning you just add hp with this ability to the hero. When you have tomes of retraining in your map, you need of course for this a trigger also and tomes with negative amount and the whole thing before.

Edit2: Oh, i didn't saw the "Should not contain GUI", i'm sorry for my reply, which is now free to be deleted :/
 
Last edited:
Level 3
Joined
Jul 12, 2011
Messages
32
why are you selling triggers to Tobi, cause he
obviously doesn't want to work on them.
Anyway, let the kid play and have fun for few months.
 
Status
Not open for further replies.
Top