Dave312
Censored for your safe viewing
- Reaction score
- 269
I have a levelable hero ability which I am trying to add the requirement to. The ability consists of 10 levels with the requirement that the hero level must be greater than or equal to the ability level times 2 plus 1.
Because I have so many ability levels, I'm trying to make the code simple for the requirement so I have used the equation above rather than a new equation for each level. As such, my requirement turns out like this:
This all works good. However my issue comes when trying to write the tooltip for the requirement. What I want it to say is - Hero Level X where it replaces X with the appropriate number given a certain level of the ability. I am using a <d ref=""</> command to perform the equation above but it seems to fail at retrieving the current ability level. This I what I have so far:
No matter what level the ability is it will always show X as being 1 (which is consistent of return 0 for the ability level). Any ideas on how to go about solving this issue? +rep for any help.
Code:
H >= 1 + A * 2
where:
H = Hero Level
A = Ability Level
Because I have so many ability levels, I'm trying to make the code simple for the requirement so I have used the equation above rather than a new equation for each level. As such, my requirement turns out like this:
- Use
- Greater Than or Equal To
- Count Hero Veterancy Completed at Unit (Returns Hero Level)
- Sum
- Constant 1
- Multiplication
- Count Ability Completed at Unit (Returns Ability Level)
- Constant 2
- Greater Than or Equal To
This all works good. However my issue comes when trying to write the tooltip for the requirement. What I want it to say is - Hero Level X where it replaces X with the appropriate number given a certain level of the ability. I am using a <d ref=""</> command to perform the equation above but it seems to fail at retrieving the current ability level. This I what I have so far:
Code:
Hero Level <d ref="1 + (CountAbil(AttributeBonus,CompleteOnlyAtUnit) * 2)"/>