System Unit Abilities Require Hero Level

wewso

New Member
Reaction score
11
I made this a while ago and now I decided to revive it. I find it very useful.

So, I was making my RPG map when I bumped into a problem. I had a hero with a spellbook which contained 11 spells. 5 were normal hero spells that originaly required hero level and 6 were unit spells that didn't reqire level. Ofcourse there was an ultimate that required 12th level. Everything was OK until I went in-game and saw that all the hero spells (including the ultimate) in the spellbook were already learned at level 1 even though i hadnt touched them. I was mad :mad: After a short coffee break I solved the problem.
I created an upgrade with 60 levels (max hero level in my map) that would change it's level each time my hero gained a level. So when the hero goes to level 34 the upgrade level for the owner of the hero will change to level 34. Then I made the unit abilities require this upgrade and a level of the upgrade, so that they wont show up as learned until the wanted level is gained. This way I also got my unit abilities require hero level.

There are 2 versions of the trigger in the system. One for RPG maps where you use unit abilities on your heroes and spellbooks. And one for maps with many heroes where you want the units to have hero level requireing abilities.

First Version (RPG) Trigger:

Code:
Level Up
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Player - Set the current research level of Hero level: 1  to (Hero level of (Triggering unit)) for (Owner of (Triggering unit))

Second Version (Mellee) Trigger:

Code:
Find Max Hero Level
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Set Max_Hero_Level = 0
        Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Max_Hero_Level Less than or equal to (Level of (Picked unit))
                    Then - Actions
                        Set Max_Hero_Level = (Level of (Picked unit))
                    Else - Actions
        Player - Set the current research level of Hero level: 1  to Max_Hero_Level for (Triggering player)

The upgrade is the same for both versions.

"Hero Level" Upgrade (Both Versions)

First you should set all the values of the upgrade to 0. Then set the
name to: "Hero level: 1" for level 1
"Hero level: 2" for level 2
"Hero level: 3" for level 3 ... and so on to the level you want Ofcourse you don't need to type "Hero level" 1000ds of times you can easely do this with "Auto Fill Levels" when you right-click on the value.

NOTE: The name should be "Hero level: <here you put the level>" in order to look like real requrements made by Blizzard.
And last you have to put the name of the Upgrade in "Techtree - Requirements" field and the level required in "Techtree - Requirements - Levels" field of the ability that requires level.


++Rep me if you like it :rolleyes:

Here is the map I made to show you.
 

Attachments

  • Unit Abilities Require Hero Level.w3x
    17.1 KB · Views: 210

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
> Is this really ussefull?
Sure it is. I didn't know that before... ^^ Gj, taught me a new thingy

off: плс потърси ме после по скайп :)
 

GooS

Azrael
Reaction score
154
Gj, taught me a new thingy
Thats what I thought to, theres no problem posting this, it's neat, not so hard to figure out but can make a whole lot of diffrence.
However I wouldn't consider it a system, more like a tutorial, or even just a small guide on how to make it.

Nonetheless It's worth having here on TH ;)

Good job!

Off-Topic: "плс потърси ме после по скайп" Man that language looks intresting to write, I wish I could ;)
 

wewso

New Member
Reaction score
11
Yea I was wondering how to classify it too.

@ GooS >> Its Bulgarian (if you know where Bulgaria is)
@ cr4xzZz >> Аднах те. Пиши ако се нуждаеш от нещо.
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Yeah, it does that for unit abilities, so you can do something like this.

Code:
Defend: <Defend's description>
Requirements: 
- Hero level 5

And then the footman couldn't use defend until your hero was level 5.
 

wewso

New Member
Reaction score
11
Well its made for heroes using multiple spells in spellbook but it can also work the way you said with the Footman Defent ability requireing hero level. You should just change the triggers a little bit to:

You need 1 non-array integer: Max_Hero_Level which is needed for the loop

Code:
Find Max Hero Level
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Set Max_Hero_Level = 0
        Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Max_Hero_Level Less than or equal to (Level of (Picked unit))
                    Then - Actions
                        Set Max_Hero_Level = (Level of (Picked unit))
                    Else - Actions
        Player - Set the current research level of Hero level: 1  to Max_Hero_Level for (Triggering player)

Added to main post
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top