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

Leveling up Item Ability Dilemma

Status
Not open for further replies.
Level 2
Joined
Jul 26, 2011
Messages
12
Hello!
I'm pretty much new to this site, but this site always been my best friend when it comes to questions etc.

However i got a dilemma and the question follows;

  • Concentration
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Elementalist
      • (Item-type of (Item being manipulated)) Equal to |cff7777aaConcentration|r
    • Actions
      • Unit - Add Concentration (Elementalist Icon) to (Triggering unit)
      • Unit - Add Concentration (Elementalist) Mana Pool to (Triggering unit)
      • Unit - Increase level of Concentration (Elementalist Icon) for (Triggering unit)
      • Unit - Set level of Concentration (Elementalist) Mana Pool for (Triggering unit) to (Level of Concentration (Elementalist Icon) for (Triggering unit))

So this works just fine but It doesn't level up the Item Ability(Concentration Elementalist Mana Pool) - which is based on *Item Mana Bonus* with 4 levels and I tried lots of methods but none working.

What am I doing wrong and is it possible to level up a Item - by buying a certain item that levels up unit Ability?

Forgive me if i made this thread on a totally wrong section - I had to post it somewhere and it wont be repeated.

Thanks for reading best regards
 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,243
So you're trying to increase the unit's max mana?

There's a certain trick to it. Just setting the ability level won't work.

Create levels for postive and negative values. When you want to increase the mana, add the ability, set the level. You need to add a negative value to increase mana. Then remove the ability and mana will increase. To decrease max mana, use a positive value.

You can use search to find more detailed instructions or systems.
 
Level 2
Joined
Jul 26, 2011
Messages
12
Hello Maker:)
First of all I'm a huge fan of you and love all your educational posts.

Yes that's what I'm doing.

Alright I'll try that, but how about other Item Abilities? For instance Sobi mask, magic resistance etc.
same thing there?

I wanna be able to upgrade it - every time A Hero buys that certain item.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
No, this will only work when you want to change the max mana and max HP of a unit (due to a bug).
Here's a hint: do not create a lot of abilities with much ability levels. This will drastically increase your loading time (10 abilities with 1 level are much faster than 1 ability with 10 levels).

For other items, I can suggest you use the same method BonusMod uses. I'll explain it for Mana regen (Sobi Mask).

Copy/paste the ability "Sobi mask" a few times.
Set the mana regen to +0.01, +0.02, +0.04, +0.08, +0.16, +0.32 and +0.64.

Since this ability stacks, you can give any mana regen bonus between +0.01 and +1.27 (+1% to +127%) now
(E.g.: +0.50 would be: +0.32; +0.16; +0.02).

How to know which abilities to add is quite simple. I will call "the mana regen bonus you wish to add" "manaBonus" from now on.

If manaBonus >= 0.64 (the maximum amount), then add Sobi Mask +0.64
Set manaBonus = manaBonus - 0.64
If manaBonus >= 0.32 (the next in line), then add Sobi Mask +0.32
Set manaBonus = manaBonus - 0.32

-- and so on, until you reach +0.01.

This can be looped as well (so you don't have to create all these if-then-elses), because 64 is 2^6, 32 is 2^5, 16 is 2^4 etc (I guess you get the point).
If you're working with integers (which is the easiest) and want to add, say, +60% ("60" is the integer variable manaBonus), then:

set tempInt = 64
loop from 1 to 6
-> If manaBonus >= tempInt then - add Sobi Mask +0.64 to unit
-> set manaBonus = manaBonus - tempInt
-> set tempInt = tempInt/2

This will give the unit a mana regen bonus of +60% (+0.32; +0.16; +0.08; +0.04)

(I don't feel like creating actual triggers out of these at the moment, but it's fairly simple - at least: the idea is. I think it'll work though :p).
 
Status
Not open for further replies.
Top