• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Levelling up Item Abilities?

Status
Not open for further replies.
Level 4
Joined
Aug 5, 2007
Messages
49
Is this possible? I've triple checked my code and can only come to the conclusion that item abilities can't be levelled via trigs, even if they are converted to unit abils.

The ability in question is the Max HP bonus item. I'm trying to trigger scaling life totals.

Edit: hoooold up, apparently I can mod the handicap of the player to increase the hp of all units, now, this is obvs not a solution that can be used for everyone but it should suit my purposes just fine.
 
Last edited:
Is this possible?
Yes it is completely possible and works.

The ability in question is the Max HP bonus item.
Which is bugged. It levels up correctly but lacks an "on levelup" function internally so does not change the bonus when levelling up. However on ability remove it will still remove the correct amount of life for the ability level. The result is the item ability bug which allows you to freely modify unit health.

  1. Ability level 1 -> 100 maximum life
  2. Ability level 2 -> 0 maximum life
  3. Give ability to unit (gain 100 maximum life).
  4. Increment ability level (ability level 1 -> 2)
  5. Remove ability from unit (lose 0 maximum life)
  6. Unit now has +100 life permanently, as if given by tome of life.
 
With an ability based off from Item Life Bonus and this trigger you can also decrease a unit's max life. it can modify the life for greater or lower.
The ability must have 7 levels and all levels "Max Life Gained" data must be set as following:
Level 1 = 0
Level 2 = -1
Level 3 = -10
Level 4 = -100
Level 5 = 1
Level 6 = 10
Level 7 = 100

hive.jpg


  • Use
    • Events
    • Conditions
    • Actions
      • Set Some_Unit = Desired unit
      • Set Max_Hp = Integer (The value you wish max life to become, ex: 100)
      • Trigger - Run Set Max Hp <gen> (ignoring conditions)
  • Set Max Hp
    • Events
    • Conditions
    • Actions
      • Set Max_Hp = (Max_Hp - (Integer((Max life of Some_Unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Max_Hp Greater than 0
        • Then - Actions
          • Set Loop_Integer = ((Max_Hp - (Max_Hp mod 100)) / 100)
          • For each (Integer A) from 1 to Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add Max Life Modifier to Some_Unit
              • Unit - Set level of Max Life Modifier for Some_Unit to 4
              • Unit - Remove Max Life Modifier from Some_Unit
          • Set Max_Hp = (Max_Hp mod 100)
          • Set Loop_Integer = ((Max_Hp - (Max_Hp mod 10)) / 10)
          • For each (Integer A) from 1 to Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add Max Life Modifier to Some_Unit
              • Unit - Set level of Max Life Modifier for Some_Unit to 3
              • Unit - Remove Max Life Modifier from Some_Unit
          • Set Max_Hp = (Max_Hp mod 10)
          • For each (Integer A) from 1 to Max_Hp, do (Actions)
            • Loop - Actions
              • Unit - Add Max Life Modifier to Some_Unit
              • Unit - Set level of Max Life Modifier for Some_Unit to 2
              • Unit - Remove Max Life Modifier from Some_Unit
        • Else - Actions
          • Set Max_Hp = (0 - Max_Hp)
          • Set Loop_Integer = ((Max_Hp - (Max_Hp mod 100)) / 100)
          • For each (Integer A) from 1 to Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add Max Life Modifier to Some_Unit
              • Unit - Set level of Max Life Modifier for Some_Unit to 7
              • Unit - Remove Max Life Modifier from Some_Unit
          • Set Max_Hp = (Max_Hp mod 100)
          • Set Loop_Integer = ((Max_Hp - (Max_Hp mod 10)) / 10)
          • For each (Integer A) from 1 to Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add Max Life Modifier to Some_Unit
              • Unit - Set level of Max Life Modifier for Some_Unit to 6
              • Unit - Remove Max Life Modifier from Some_Unit
          • Set Max_Hp = (Max_Hp mod 10)
          • For each (Integer A) from 1 to Max_Hp, do (Actions)
            • Loop - Actions
              • Unit - Add Max Life Modifier to Some_Unit
              • Unit - Set level of Max Life Modifier for Some_Unit to 5
              • Unit - Remove Max Life Modifier from Some_Unit
I've also attached a demo map so you can just copy

Credits: Tom Jones
 

Attachments

Status
Not open for further replies.
Back
Top