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

[General] Item Life Bonus doesn't work

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hey,

I'm creating a passive ability that gives X amount of health to a unit. I'm using Item Life Bonus for the system but it doesn't work. How to make it work / what other ability I should use?

Tech map attached. Also if someone knows more dynamical way to make that calculator for fixed amount of health that would be nice to have.
 

Attachments

  • HEALTHHHH.w3x
    19.3 KB · Views: 63
Level 26
Joined
Aug 18, 2009
Messages
4,097
The Item Life Bonus ability is bugged in the way that modifying the level for the unit does not adjust the bonus it receives. It is stuck at level 1. However, the current level is indeed saved and when you remove the ability from the unit, it will subtract the value of the current level. And that's what most of those systems use.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
No, you need to use the bug I just told you about.

Make an Item Life Bonus ability with the following bonus stats:

Level 1 - 0
Level 2 - -1

Add the ability to the unit via trigger, set the ability of the level for the unit to 2, remove the ability from the unit -> the unit will end up with 1 more max hp and you can repeat this process to gain more. For higher bonuses, it would be better to use bigger packages though to reduce the amount of jass instructions.

Then you will usually have stats like this:

Level 1 - 0
Level 2 - -1
Level 3 - -2
Level 4 - -4
Level 5 - -8
Level 6 - -16
Level 7 - -32
Level 8 - -64
...

or what you have done yourself

Level 1 - 0
Level 2 - -1
Level 3 - -10
Level 4 - -100
Level 5 - -1000
...
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
I think I just understood half what you said but I will try this method once I'm home. My brains have never good with stuff like this but I try. I try, I try and I try. I try until I bleed and then I come here crying nothing really worked.

So... Later today I will come back and tell how everything went.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I do not think so because it is not carried over when the unit morphs.

An alternative btw is to not use the bug but make Life Bonus abilities of different level 1 bonuses. Combine them to get the value you desire. The advantage is it's more robust, the unit actually stores the ability. For morphing you can set the ability permanent on the unit.

The disadvantage is that there is a limit, you cannot stack the same ability. However, using the powers of 2 e.g., it allows for getting any integer in between and the max increases exponentially, so it's easy to exhaust both the reasonable and the cap of wc3.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I do not think so because it is not carried over when the unit morphs.
I could swear HP added using the item ability level exploit did persist during morphs (as it functions identically to tomes).

The problem however is during a unit type change using the Chaos ability. It re-applies the HP bonus resulting in considerably larger bonus than intended. However this is a bug with Chaos as it also affects stats from tomes.

The disadvantage is that there is a limit, you cannot stack the same ability. However, using the powers of 2 e.g., it allows for getting any integer in between and the max increases exponentially, so it's easy to exhaust both the reasonable and the cap of wc3.
Except the unit has no abilities from the bonus. That is why the item ability level exploit is such a neat trick as you can re-use the same abilities to apply a bonus multiple times and it functionally is the same as if the bonus was added by consuming tomes of health.
 
Status
Not open for further replies.
Top