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

I Need help with something.

Status
Not open for further replies.
Level 2
Joined
Jul 27, 2014
Messages
17
In my other forum, I was having someone try to fix a bug when I didn't actually fully test it out with other abilities. Foolish me. I turned an 'item health increase' into a unit ability, and gave it 10 levels to help my map have enemies that balance with hero level. Thing is, that didn't work. Can anyone help me with a trigger? (Or give me an ability that increases health, that can work with a level trigger.) Thanks if you can.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
As you probably noticed with your + HP ability having multiple levels, it is both the problem and solution.

Give the hero a dummy ability which does nothing each level. Then use the bonus health ability exploit to raise maximum health every time the ability level is increased. You may need a trigger if unlearning tomes are in your map.

The bonus health ability exploit works by abusing an error in the game with the ability having multiple levels. Since it never was meant to have multiple levels Blizzard forgot to have appropriate code for raising its level correctly so instead changing the ability level does nothing. However when the ability is removed it looks up the value for the current ability level and removes that health instead of the amount added at level 1. Abusing this exploit mechanic allows you to efficiently raise unit maximum health.

Make a bonus health unit ability with 2 levels. No unit actually persistently holds this, instead it is only used by triggers to change health. Level 1 adds X HP (where X is the amount per level you want your hero to gain). Level 2 adds 0 HP. When you learn your dummy ability give the hero the hp ability, raise it to level 2 and then immediately remove it. It winn add X HP due to level 1, remove 0 HP from raising it (as it is bugged) and then remove 0 HP again when you remove the ability (as it is bugged). The result is your hero now will have X maximum HP more than before.

A less efficient alternative is to use tomes of health (this method is self explanatory). The creation of item widgets will never be as fast as the above method so I advise against it. If you do use tomes of health you must remember to remove the item after it has been used as automatically used items are not removed automatically so can leak. Dead items (items that died due to combat damage) also leak, few people realise this.
 
Status
Not open for further replies.
Top