Can't Make Level Requirements for WC3-Like Ability System

DeepThought

New Member
Reaction score
1
I'm trying to create an hero system very similar to the one in Warcraft 3. I've been doing pretty well. However, I've encountered a snag that I can't seem to figure out. I want to try to emulate Warcraft 3's level requirements for leveled abilities. In Warcraft 3, each level of the ability required your hero to be on a specific level. For level one of the ability, your hero needed to be on level one, for level 2 of the ability your hero needed to be on level three, and for level 3 of the ability your hero needed to be on level 5. I want to emulate this using Starcraft's "Learn" Ability Type. I'm assuming the only way for this to be possible is by making a Requirement for learning the ability, but I don't know where to begin when it comes to making a Requirement that would work in this situation. Does anyone out there with more knowledge know how I would approach this?
 

MissKerrigan

Active Member
Reaction score
23
Do you using a morph ability on your hero?
I assume that your first ability don't needs any requirement because your hero is already on level 1?

For the other requirements you have to make this:

- Create new requirement and call it 'Learn (your) hero 3'
- Right click on use and 'add requirement node'
- Set the type to 'count unit'
- Select your hero in the 'Alias' dropbox
- At last set the state to 'completed'
- Now go to your ability 'cost' and add the requirement you just created

Do the same for the other levels you want
 

Dave312

Censored for your safe viewing
Reaction score
269
You need to create a Requirement for each ability which your hero uses. Then for the Requirement + property, set it to something like this:
Code:
USE
  Greater Than or Equal To
      Count Behaviour [Your_Veterancy_Behaviour] Completed at Unit
      Sum
        Constant 1
        Multiplication
            Count Ability [Your_Hero_Ability] Completed at Unit
            Constant 2
SHOW

[Your_Veterancy_Behaviour] is a behaviour of the type veterancy that you are using to level up your hero.
[Your_Hero_Ability] is the ability that you are using this requirement for.

The way this works is that it checks that the current level for your hero is at least equal to 1+2*Current_Ability_Level. So if you are learning the first level, the requirement is that the hero at at least level 1 (1+2*0=1), To learn level 2 of the ability, your hero needs to be at least level 3 (1+2*1=3). To learn level 3 the requirement is level 5 (1+2*2=5) and so on.

Now to apply this requirement to your ability, you need to go to your Learn ability, open up the Ability: Info + property, select the learn index for your ability and add the requirement to the Requirements field.
 

DeepThought

New Member
Reaction score
1
You need to create a Requirement for each ability which your hero uses. Then for the Requirement + property, set it to something like this:
Code:
USE
  Greater Than or Equal To
      Count Behaviour [Your_Veterancy_Behaviour] Completed at Unit
      Sum
        Constant 1
        Multiplication
            Count Ability [Your_Hero_Ability] Completed at Unit
            Constant 2
SHOW

[Your_Veterancy_Behaviour] is a behaviour of the type veterancy that you are using to level up your hero.
[Your_Hero_Ability] is the ability that you are using this requirement for.

The way this works is that it checks that the current level for your hero is at least equal to 1+2*Current_Ability_Level. So if you are learning the first level, the requirement is that the hero at at least level 1 (1+2*0=1), To learn level 2 of the ability, your hero needs to be at least level 3 (1+2*1=3). To learn level 3 the requirement is level 5 (1+2*2=5) and so on.

Now to apply this requirement to your ability, you need to go to your Learn ability, open up the Ability: Info + property, select the learn index for your ability and add the requirement to the Requirements field.

Thanks for the help. That works, although I wish I didn't have to add a new behavior for each ability, but it must be done :p. Thanks again.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
it may be easier to present a text version that he could just copy and paste in:
Code:
CountBehavior([Id of your veterancy ability],CompleteOnlyAtUnit) >= (1 + (CountBehavior([Id of your hero spell ability],CompleteOnlyAtUnit) * 2))

To just paste that in when editing the requirement click the "Expression" marker, and put that in the disable field, to make it unable to be clicked, then this to show it properly in the show section:

Code:
CountBehavior([Id of your hero spell ability],CompleteOnlyAtUnit) == [level - 1]

also properly adjust everything inside the []'s (brackets)
 

MissKerrigan

Active Member
Reaction score
23
lol I just noticed my solution ownt work :)

Because when he have hero level 3, then the ability level 1 wont work anymore with my solution
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top