• 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.

[General] Managed to increase MAX hp by level--- no idea how/why it works. Can someone explain?

Status
Not open for further replies.
Level 8
Joined
Apr 8, 2009
Messages
499
Hey there fellow Hivers.

I have a hero that summons a unit.
The higher the level of the summoning ability, the more MAX HP the summoned unit needs to have...
+100 MAX HP per level to be precise.

After messing around with abilities, triggers and #magic, it somehow works?



  • Ranger Summon Familiar
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Familliar
    • Actions
      • Unit - Add Familiar HP bonus [Ranger] to (Summoned unit)
      • Unit - Set level of Familiar HP bonus [Ranger] for (Summoned unit) to (Level of Summon Familiar [Ranger] for (Summoning unit))
      • Unit - Remove Familiar HP bonus [Ranger] from (Summoned unit)
full



As a side note, the ability is based on the 'Item Life Bonus' ability.

Now my question is, how/why the hell does this work? (I need to know so I can abuse this in the future).
 
Last edited:
Level 12
Joined
May 22, 2015
Messages
1,051
This is well known and often the method used in bonus mod systems.

This is what is happening:
Item health bonus adds base level amount of health (level 1 amount).
Changing the level of the ability DOES NOT change the number used (this is a bug - it affects a bunch of other abilities - I don't know the full list but I know item health bonus is on it as well as the item immolation ability).
However, when you REMOVE the ability, the amount of health subtracted is the amount that the current level of the ability is supposed to give. This is what causes the health to change (and it is permanent).

You can do the same thing by switching the level 1 bonus amount to 0, then go down by 100 for each level above (0, -100, -200, -300, etc.)

EDIT:
Note that this method works exactly the same for the item bonus mana ability.
 
Level 8
Joined
Apr 8, 2009
Messages
499
This is well known and often the method used in bonus mod systems.

This is what is happening:
Item health bonus adds base level amount of health (level 1 amount).
Changing the level of the ability DOES NOT change the number used (this is a bug - it affects a bunch of other abilities - I don't know the full list but I know item health bonus is on it as well as the item immolation ability).
However, when you REMOVE the ability, the amount of health subtracted is the amount that the current level of the ability is supposed to give. This is what causes the health to change (and it is permanent).

You can do the same thing by switching the level 1 bonus amount to 0, then go down by 100 for each level above (0, -100, -200, -300, etc.)

EDIT:
Note that this method works exactly the same for the item bonus mana ability.

So basicly--- while active, it won't add the amount it's supposed to add--- but when it's removed it WILL remove the amount it was supposed to 'add'?

If so, very interesting and usefull. Thanks!
And yeah, I figured this might apply to mana bonus abilities. :)

Also, as far as I know, not being able to effectively change the level of an ability goes for all Item based abilities... I could be wrong though.
 
Level 12
Joined
May 22, 2015
Messages
1,051
So basicly--- while active, it won't add the amount it's supposed to add--- but when it's removed it WILL remove the amount it was supposed to 'add'?

If so, very interesting and usefull. Thanks!
And yeah, I figured this might apply to mana bonus abilities. :)

Also, as far as I know, not being able to effectively change the level of an ability goes for all Item based abilities... I could be wrong though.
Ya you got it right. It's super nice since, set up properly, you can set max health / mana on a unit very easily (bonus mod allows this along with setting bonus attributes and stuff). It just feels so nice from a coding perspective to be able to so freely modify stats.

I don't think it is for ALL item abilities. I know I've used the item damage bonus ability to have scaling damage before.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
It is a bug with item abilities. Many item abilities with passive effects lack correct code to manage level changes. As such changing the level of one of those abilities will not alter the property modification it gives. However they do have correct code to manage removal, so removing the ability does remove the correct amount of property. The problem, or should I say exploit, is that there can be a discrepancy between the about of property the ability added and the correct amount of property to remove due to a change in level.
 
Level 19
Joined
Jul 2, 2011
Messages
2,161
Agh wow thank you @SAUS
you are always very helpful with these tough problems.

I've been secretly and silently battling with this idea for a long time because in my game damage is linked to mana, which sucked because summoned units never had enough to match the strength of their masters

thanks
 
Status
Not open for further replies.
Top