Formulas & Help

Table of content

  1. Variables
  2. Requirements
    1. Level Requirements
    2. Disabling double learn
  3. Examples
    1. LevelRequirement with disabled double learn

Variables

  • HUHeroXPPlaceholder - refering to the units VeterancyBehavior (String)
  • Skill - refering to an ability used by unit(s) (String)
  • ^ - refers to a Link ( to Strings ) inside the editor itself (Operator)
  • # - refers to the amount of the followed string/variable (Operator)
  • LevelReq - refers to a Level Requirement for an abiltiy (Integer)

Requirements

Level requirements

Level requirement is simply easy, you can as of Patch13 use a Requirement to count a behavior - the returned value by CountBehavior will exactly match the value of level the unit has. ( unknown value yet for units without VeterancyBehavior - guessing 0 (zero) is returned)

CountBehavior(^HUHeroXPPlaceholder,CompleteOnlyAtUnit) >= LevelReq
Disabling double learn

To enable the WC3 feature, that you cannot learn an ability twice in a row (Skill X at Level1, and Skill X again at Level2) you have to adjust the following Requirement to the Learn ability.
Non Previous level requirements:

CountBehavior(^HUHeroXPPlaceholder,CompleteOnlyAtUnit) > ( CountAbility(^Skill, CompleteOnlyAtUnit) + CountAbility(^Skill, CompleteOnlyAtUnit) )

With previous level requirement:

CountBehavior(^HUHeroXPPlaceholder,CompleteOnlyAtUnit) >= LevelReq + ( CountAbility(^Skill, CompleteOnlyAtUnit) + CountAbility(^Skill, CompleteOnlyAtUnit) )

Examples

LevelRequirement with disabled double learn
CountBehavior(HeroXP,CompleteOnlyAtUnit) >= 6 + ( CountAbility(DoomsDay, CompleteOnlyAtUnit) + CountAbility(DoomsDay, CompleteOnlyAtUnit)  )

The Requirement counts the Level of the unit and compares it to the formula ( 6+('AbilityLevel of DoomsDay'*2) ) if this comparision is true, the ability is valid for learning ( the units is Level 6 or Higher AND has not learned recently (previous level) a next level of that Ability.