1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Create a Hero with attributes!

Discussion in 'StarCraft II Tutorials' started by Khlox, May 22, 2010.

  1. Khlox

    Khlox

    Joined:
    Feb 24, 2010
    Messages:
    62
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    As known, many people want to make a map which has a hero as main unit for the player, but not just any hero, but a hero like in Warcraft 3, with attributes and spells that will level. And happy me I happened to stumble over it how to, so here I go...

    Have fun reading this wall of text! :O

    [Just for the record: my first tutorial, and so far I know, it meets the guidelines. :3]

    TABLE OF CONTENT:
    • Create your hero.
    • Veterancy: the level up system.
    • Attributes: Hell, it's about time!
    • XP sharing: so we learn from others now?!
    • Ability leveling: feeling stronger every time I press those buttons – again.

    CREATE YOUR HERO:

    So, we first need a hero unit. This doesn't necessarily have to be a new unit, but if you want, create a new one. I'm taking our beloved Zergling as an example unit, and the only thing I did, was rename it to Ling.



    Then, there's one small thing to do: go to 'Unit - Flags' (at the bottom), and open it. Check 'Hero' and you're done there for now.


    Visual help.

    The field:
    [​IMG]

    Checking 'Hero':
    [​IMG]


    VETERANCY: THE LEVEL UP SYSTEM.

    As shown in multiple tutorials, also this one uses the Veterancy behavior. Go to the Behavior tab, rightclick on any behavior, and select 'Add Object...', and do the following steps:

    1. Set 'Name' to Veterancy (or anything that suits you).
    2. For the ID', press 'Suggest', the easiest way, or set an ID yourself (can't override).
    3. Set 'Behavior Type' to 'Veterancy'.

    Visual help.

    Adding the object:
    [​IMG]

    Setting the values:
    [​IMG]


    Bam, done. Now make sure these five buttons (see image) are pressed like in the image.

    Visual help.

    Buttons:
    [​IMG]


    Once that is done, we now need to set the experience values which are needed for the next level. For this, find the field called 'Behavior - Veterancy Levels - Minimum Experience'. Double click to open it.

    Visual help.

    The field:
    [​IMG]


    At first sight, this is an empty field. So, we need to add some values. For the first level (which goes from level 0 to level 1), we'll need to do some steps:

    1. Press that tiny little green '+X' to add a new value. A new screen will open.
    2. In Warcraft 3, heroes start at level 1, while in SC2, they'll start at level 0. We also want them to start at level 1, and since this represent the first step (from 0 => 1), we'll set this to '0' (zero), so the unit will instantly start at level 1.

    Visual help.

    [​IMG]
    <IMAGE>

    Setting values:
    [​IMG]


    Now, these values are represented in a way that the one at the top represents the experience EXTRA needed to go from level 0 to level 1, and the second one is from level 1 to level 2.

    Also, the values add up: If the first value is 10, and the second one is 20, the TOTAL value to go from level 1 to level 2 is 30. (10 + 20 = 30, simple.) In other words: it shows how much XP you need to level again, from the level before.

    So lets say we need 10 experience to go from level 1 to level 2, you'll set the second field to '10'. And if you want to go from level 2 to level 3 with a need of 30 XP -TOTAL-, you'll set the value to 20.

    Example

    Example:
    [​IMG]


    For this tutorial, I'll use the following values:

    Level 0 -> Level 1: 0 XP. (Instant at level 1.)
    Level 1 -> Level 2: 10 XP. (10 XP total.)
    Level 2 -> Level 3: 20 XP. (30 XP total.)
    Level 3 -> Level 4: 30 XP. (60 XP total.)
    Level 4 -> Level 5: 40 XP. (100 XP total.)


    My values.

    [​IMG]


    So, now the only thing we'll still need to do, is add this Behavior to our Hero, for me, my Ling, and it will level up gradually.

    Go to your Hero, and find the field called 'Behavior - Behaviors - Behavior' (yeah, this is serious... 3x behavior...) Press the little green '+X' and search for your Veterancy behavior, and add it. Done! Your unit will now level up when killing units!

    Visual help.

    The field:
    [​IMG]


    The value:
    [​IMG]


    (Feel free to test it, place your unit in the terrain with some enemy workers around it, and watch them fall! Muahahahah!)

    *NOTE* Experience sharing isn’t there in default. I’ll show how to later on.

    And then now, the harder part:
    ATTRIBUTES: HELL, IT'S ABOUT TIME!

    But, before we do this, let’s make a list of what you want for attributes exactly, and keep in mind: it's a Zergling.

    This is what I had in mind:
    1. Strength:
      • Increases hit points / life by 5.
      • Increases damage by 1.
    2. Agility:
      • Increases attack speed by 5%.
      • Increases movement speed by 5%.

    Now your attributes are settled, go to Behavior tab. Our first attribute to create will be Strength, and to do so, follow the following steps:

    1. Rightclick any behavior, and select 'Add Object...'.
    2. Set 'Name' to your attribute name.
    3. Set 'ID' either by using 'Suggest' or setting it yourself.
    4. Keep 'Behavior Type' on 'Attribute'.
    5. Hit OK!

    Visual help.

    The fields.
    [​IMG]


    So, now you have your attribute... But it doesn't do anything yet! This is our Strength attribute, so it'll have to do the following things:
    • Increases hit points / life by 5.
    • Increases damage by 1.

    First, we'll set the damage. Find the field called 'Combat - Modification - Damage Dealt (Unscaled)', and double click it.
    It will show 4 fields: Melee, Ranged, Spell and Splash. Our Ling is a melee unit, so select 'Melee', and as it increases it 1 per attribute, we'll set it to 1.

    Visual help.

    The field:
    [​IMG]

    Setting the Melee damage:
    [​IMG]


    Secondly, we'll set the extra Life. Find the field called 'Unit - Modification - Vital Max Bonus', and double click it.
    Select the value called 'Life' and set it to 5.

    Visual help.

    The field:
    [​IMG]

    Setting the extra Life:
    [​IMG]


    Wham! Your first attribute is done! But, your unit doesn't have it yet. So go back to your unit, and once again to the field 'Behavior - Behaviors - Behavior', and add a new one. Find your attribute (for me, Strength) and add it. My Ling / your hero has now the attribute Strength!

    But wait! If your hero levels now, the attribute doesn't go up! So we'll need to settle that now.

    Go back to your Veterancy Behavior, and find the field called 'Behavior - Veterancy Levels - Modification - Attribute Changes - Attribute' (what a name...), and double click it.
    Then press the little, but most beloved green '+X', and find your attribute, or for me: Strength.

    Now as you see, there are also two other values: Index and, oh, surprise!, Index.

    Now, after some testing, I found out the first Index represent the level the unit will level FROM. So, if you level from level 0 to level 1, the first Index will be 0. However, this means, if you want to go from level 1 to level 2, you'll need to ANOTHER value. The first field will represent from level 0 to level 1, or in other words: your starting values, as our hero will instantly go to level 1.
    The second Index is used to make difference between different attributes, and as this is your first attribute, set it to 1.

    We'll also add the values for the next levels, so in the end, it will look like the last image in the hidden tags.

    Visual help.

    The field:
    [​IMG]

    The values:
    [​IMG]

    The ending values:
    [​IMG]


    However, this doesn't mean that the attributes will also rise when you level up. Go to the field below the field we were just at (''Behavior - Veterancy Levels - Modification - Attribute Changes - Points'), and double click it.

    We'll first want to set the starting values of our attribute, so press the little green '+X' again.
    Now, the first 'Index' once again represent the level which it will level FROM (as explained before), and, as we're setting the starting values, this must be 0.
    The second 'Index' represent the attribute, and the 'Index' for our Strength attribute is '1', so set it to '1'.
    The 'Value' represents the value of what the attribute is at when you’re on that level. So if you set it to 2, it’ll be 2. However, if you set the next level to 1, it will be reduced when you level! So keep that in mind.

    Visual help.

    Setting the fields:
    [​IMG]


    However, you need to set this for every single level, and every single attribute at a time: it'll take long.
    If the attribute rises with 1 every level, it should look like this in the end.

    Visual help.

    End result:
    [​IMG]


    And then, with this all FINALLY done, your attribute should now finally rise when leveling! Congratulations!

    XP SHARING: SO WE LEARN FROM OTHERS, NOW?!

    As I said, XP sharing isn’t turned on on default, so if a unit which is not the hero kills a unit, the hero won’t gain anything.

    Hero
    So, go back to your Veterancy behavior, and search for the field called ‘Stats – Shared Fraction’, and double click it. Select the ‘Kills’ type and set its value to 1. Or less, if you want to. This value determines how much XP is shared with the units around him, in which 1 represents 100% share, and 0.5 only 50%. Be careful with setting it too high! Above one means the killing unit receives NO XP, but LOOSES XP.

    Now the next field you need, is right under it. Double click the ‘Stats – Shared Radius’ field and select ‘Kills’again. Set the radius to whatever radius you want. I’ll set it to 7.5, an average radius, and, I think, near to similar in Warcraft 3.

    ’Visual help.’

    From this…
    [​IMG]

    To this!
    [​IMG]


    ’Optional.’

    If you want your hero to still ‘leech’ XP when a unit dies, and the hero is at a maximum level, then go to the field ‘Behavior – Flags’ and check ‘Maximum Level Leech’.


    Now, every unit with this behavior will share XP with other. However, a unit without this ability, won’t! So we need to make a ‘dummy’ behavior for non-hero units, so they’ll also share XP.

    Non-hero
    Make a new behavior by using ‘Add Object…’, and call it Veterancy (DUMMY). Once again, go to the field ‘Stats – Shared Fraction’ and do the same as above. The same counts for ‘Stats – Shared Radius’.
    Once that is done, select the field ‘Stats – Flags’, and, surprise surprise!, check the only field available there: ‘Hidden’. Now the XP-bar won’t show up when a unit has this behavior, but it will share experience! Add this behavior to EVERY unit that will be in your game, so your hero will gain experience when this unit kills someone.


    ABILITY LEVELING: FEELING STRONGER EVERY TIME I PRESS THOSE BUTTONS - AGAIN.

    ALSO: HUGE WALL OF TEXT INCOMING. ANY SIDE EFFECTS OF READING THIS ARE: BRAIN OVERFLOW: CAUSING EITHER A MINOR TO HUGE HEADACHE OR MAYBE EVEN A BRAIN EXPLOSION / IMPLOSION; HURTING EYES: THEY MIGHT JUST... STOP WORKING FOR A WHILE; BUT MOST IMPORTANT: LOSING THE DESIRE TO MAKE A FULLY FUNCTIONAL WARCRAFT 3 HERO IN STARCRAFT 2. YEAH, IT SUCKS. YOU HAVE BEEN WARNED.

    Oh yes, oh yes! After following a tutorial from Prancer at sc2mapter.com (Linky!) I managed to get it going. And thus, I’m adding it to my tutorial as well, in my own words of course. But first, a huge thanks to Prancer!

    The Hero ability
    So, sticking to the idea our little hero Ling is a Zergling, we need a suiting ability which fits with the unit. My thought were something like this:
    • Adrenaline Boost:
    • Temporarily increases movement speed and attack speed.
      Lasts 5 seconds.

      8 seconds cooldown.
      • Increases MS and AS by 25%.
      • Increases MS and AS by 50%.
      • Increases MS and AS by 75%.

    A pretty basic ability. So, now let’s get to making it. Go to the ability tab and duplicate the Marine – Stimpack ability. Duplicate the Actors, Behaviors, Buttons and Effects.

    Rename the duplicating things related to the ability to Adrenaline Boost, just to make it all a little more clear.

    Making the buttons

    Ability button
    Button for your ability
    Duplicate any button, and do the following things:
    • Set ‘Name’ to ‘Adrenaline Boost’.
    • Set ‘Tooltip’ to a descriptive text which explains what the ability does and what increases per level, e.g.: ‘Ling gets an energy shot and so has his movement and attack speed increased for 5 seconds.<n/><n/><c val="FFCC00"> Level 1 - 25% increase.<n/> Level 2 - 50% increase.<n/> Level 3 - 75% increase.<n/><n/>8 seconds cooldown.</c>’
    • Set the icon to a fitting icon, I chose: ‘Assets/Textures/btn-upgrade-zerg-metabolicboost.dds’
    • Setting a hotkey. I chose Q. (Yeah, QWERTY-keyboard. :eek:)

    Hero tab button
    This button will be the button to open the tab to the sheet where you can level your abilities, as in Warcraft 3.
    Once again, duplicate any button, and do the following:
    • Set a name, something like ‘Learning Tab’ or something.
    • Set a tooltip. I have: ‘Opens the ability learn tab.’
    • Set an icon that fits the button. I used the icon for the Unburrow ability of the Zerg, it suits him.
    • Set a hotkey. I used R.

    Cancel button
    The button for returning to the normal command sheet.
    Copy any cancel button and rename the tooltip to something useful, e.g.: ‘Returns to the normal command sheet.’

    Alright, the buttons are done now.

    Editing the effects of the ability
    Alright, first we’ll work on the effects of the ability. Open the ‘Effects’ tab and search for the related effect. (If renamed: search for ‘Adrenaline’, else for ‘Stimpack Copy’.)

    Duplicate this effect twice, including the Behaviors with it.
    Remove the ‘Copy’ out of the name, and set for each effect and behavior a suffix (field: ‘Editor – Editor Suffix’) regarding the level of the ability. So something similar like [1] for the effect when the ability is at level 1, [2] for 2, etc.
    Then go to the ‘Behavior’ tab. Find the behaviors related to the ability, and search for the field called ‘Combat – Modification – Attack Speed Multiplier’. For the level 1 behavior, set it to 1.25 (25% increase), for level 2 to 1.5 (50% increase) and for level 3 set it to 1.75 (75% increase).
    Do the same as above for the field called ‘Movement – Modification – Movement Speed Multiplier’.

    The field called ‘Stats – Duration’ is close under the ‘Movement’ fields, and must be set to 5 seconds, since that’s the time the effect will endure.

    Then go to the field ‘UI – Icon’ and set it to the icon you also used for the buttons (‘Assets/Textures/btn-upgrade-zerg-metabolicboost.dds’).
    Then double click the field below it (‘UI – Tooltip’) and set it to something that suits the ability. I set it to ‘This unit has an Adrenaline Boost; it moves and attacks faster.‘ Do this for every level of the ability.

    ’Visual help.’
    The effects and name…
    [​IMG]

    The behaviors and name…
    [​IMG]
    (As you can see, this map has more custom units / effects / behaviors. :p)

    Where to find the fields…
    [​IMG]

    [​IMG]


    Editing the ability itself
    You’re now done working on the effects and everything, let’s move on to the ability itself. Go to the ‘Ability’ tab, and go to your ability.

    Go to the field ‘Effect – Effect’ and double click it. Right now, there should be either one of the following effects in the list:

    1. Adrenaline Boost (Apply Buff) [1]
    2. Adrenaline Boost (Apply Buff) [2]
    3. Adrenaline Boost (Apply Buff) [3]

    In order to make the ability have more than one level, we need to add more effects. In order to do this, press the little green ‘+X’, and find the other two effects. Arrange them in the level order, and you’re done at this field. There are a few more fields to change and add extra values to for the levels, which are:

    • ’Cost – Cost – Cooldown – Time Use’: set it to the cooldown of the ability (8 seconds). Add two extra values for the levels.
    • ’Cost – Cost – Cooldown – Location’: keep it at ability. Add two extra values for the levels.
    • ’Cost – Cost – Cooldown – Link’: keep it at the current link. Add two extra values for the levels and set both to the link the original one has. If you have more abilities on your hero, make sure this field doesn’t overlap with each other (same values), because then the abilities will have a shared cooldown.

    One final thing to do: remove the requirement in the field ‘Ability – Commands – Requirements’. Now, the ability itself is done, but now we need to do the leveling part, which is not too hard once you know how to do it.

    ’Visual help.’
    ’Effect – Effect’ settings…
    [​IMG]

    Cooldown fields…
    [​IMG]

    Settings…
    [​IMG]


    The learning ability
    Alright, stick to the ‘Ability’ tab and add a new object. Set his name to something like ‘Ling Learn’ and use suggest ID. Set the ‘Ability Type’ to ‘Learn’ and set a race if you want. Hit OK.

    ’Visual help.’

    Settings…
    [​IMG]


    First, we’ll edit some of the basic things, such as the points you receive per level you gain. Go to the field ‘Ability – Points Per Level’ and set it to 1 if you want 1 point per level, 2 if you want 2 per level, etc. The field ‘Ability – Points’ sets the value of starting points, but as our hero already starts at level 1, it’ll already gain a point from the ‘Ability – Points Per Level’ field.
    For any non-Warcraft 3 players: with each point, you can level one of your abilities once.

    ’Optional.’
    Setting a sound for when you level an ability: go to the field ‘UI – Error Alert’, and set a sound to your liking. It’ll play when you level an ability.
    <IMG>


    Now, make sure the button ‘Combine Structure Values’ is pressed/checked!
    ’BUTTON!’
    THIS IS THE SPOT!!!!!
    [​IMG]


    When that is done, double click the field ‘Ability – Info +’, and press on the value (at the top) which has the Index ‘Learn 1’. Now there are a few things to do in these fields, which are:

    • Check ‘Hide Count’ so it’s Enabled. (Near the top.)
    • Set ‘Default Button’ to the button you made for the ability. (Near the bottom.)
    • Set ‘Ability’ to ‘Adrenaline Boost’. (Near the bottom.)

    Alright, the learning ability is done – for now! If you want to add more abilities, use the other Indexes ‘Learn #’ to add them. (With a maximum of 20 abilties! Nice.)

    ’Visual help.’
    The settings…
    [​IMG]

    [​IMG]


    Adding the abilities to your unit
    Back to the ‘Unit’ tab and select your hero.

    Double click the field ‘Ability – Abilities +’ and make sure the only abilities available are the abilities ‘Stop’, ‘Attack’ and ‘Move’. Now press our beloved, little green ‘+X’ and search for the learning ability (the ability we just worked on). Add it. Do the same for the ability that needs to be taught, so in my case: Adrenaline Boost. Hit OK, you’re done there.

    Next stop is the field ‘Ability – Command Card +’, double click it. There, remove all the buttons except the 5 buttons at the top row.

    Then select the button position at the bottom row and at the first column. Press the little green ‘+X’ and choose the button you made for the ability itself. Hit OK. Set the ‘Command Type’ to ‘Ability Command’, keep ‘Requirements’ at none, set the ‘Ability’ to your ability and then the ‘Ability Command’ also to your ability.
    Now, you’d think, you can already use the ability while you didn’t even level it! Q.Q, that ain’t no fun! But, no, that’s not what will happen, because the SC2 engine is smart, and detected your learning ability which contains the ability that will be taught, and will only show the ability once you have leveled it. So no worries.

    ’Visual help.’
    Abilities field… (Should be anything like this.)
    [​IMG]

    Settings of the button…
    [​IMG]


    Now, as in Warcraft 3 the hero learning tab has an own tab, we’ll do the same here: select the button position at the bottom row, last column and press the little green ‘+X’. Pick the button you made to go from this tab to the hero learning tab (the ‘Hero tab button’ we made earlier). Now set its ‘Command Type’ to ‘Submenu’, keep ‘Requirements’ at none, set ‘Command Card’ to 2 (currently we’re working at sheet 1) and set ‘Learn Ability’ to our learning ability. This button is done now.

    ’Visual help.’

    Settings of the button…
    [​IMG]


    Now make your way to sheet 2. First of all, we need to make a button to return to our normal sheet. Once again, select the button position at the bottom row, last column and now pick your ‘Cancel’ button, and set the ‘Command Type’ to ‘Cancel Submenu’.

    Next, we’ll add the button to make your hero actually learn the ability. Select the button position at the top row, first column and press that little green ‘+X’ and pick the button for your ability. Set the ‘Command Type’ to ‘Ability Command’, keep ‘Requirements’ at none, set ‘Ability’ to your learning ability and then set ‘Ability Command’ to the ability you want to learn with your button.

    ’Visual help.’
    Settings of the buttons at card…
    [​IMG]

    [​IMG]


    Congratulations! Your hero will now be able to learn an ability. If you want, feel free to test and do whatever you want with your hero.
    But, while doing so, you’ll find out that when you’re at level 1, you can level your ability, which is good. But when you hit level 2, you can level it again! And that isn’t good, because it shouldn’t be able to level until you hit level 3. So what’s the problem? Indeed, requirements, which we’ll add now. What you also might’ve noticed, is that the ability button to learn the ability won’t go away once the ability reached the maximum level.

    The requirement
    Making it
    Go to the ‘Requirements’ tab and add a completely new requirement, and then name it a proper way.
    (NOTE: for each ability you’ll want to learn, you need to make AT LEAST ONE requirement, but once you know it, it isn’t really hard.)

    ’Visual help.’
    Yeah, not really needed, but hell.
    [​IMG]


    Adding it to your ability
    There are two ways to do this: add the requirement at the Command Sheet and then at the learning button for the ability (less preferred to me), or by adding it at the learning ability in the learning tab (preferred by me). We’ll do it by my preferred way. (Also the way in which it will bug out less easily. :eek: )

    Go back to your learning ability, and go to the field ‘Ability – Info +’, and select the value with Index ‘Learn 1’. There, find the requirement field, and then find your requirement (use search if needed). Add it. You’re done here now.
    However, the requirement doesn’t do anything yet, so we’ll have to modify it.

    ’Visual help.’
    The place!
    [​IMG]


    Modifying the requirement
    Now back to your requirement.
    Double click the field ‘Requirement +’, and at first sight, you’ll think something like ‘what the bloody..!’, but don’t worry, it really isn’t that hard. I’ll guide you guys through this one.

    First, we’ll make the button disappear once the ability reaches level 3. (Or, the maximum level.) The way we’ll do this, is making a ‘condition’ to it: if the ability level of the ability you want to learn less than the maximum level, show it, else hide it.

    Right click on the folder ‘Show’ and click ‘Add Requirement Node’. An ‘And’ will now appear, which is a node. Press this node and change its ‘Type’ to ‘Less than’. Then right click that node and add two more requirement nodes.
    Change the first added node ‘Type’ into ‘Count Ability’. Some more fields will appear. Set ‘Alias’ to your ability you want to learn and ‘State’ to ‘Completed at Unit’, so this requirement only works on this single unit, so to say.
    Then to the second added node. Change ‘Type’ into ‘Constant’, and set its ‘Value’ to 3.
    Now, the button will disappear when it will reach it maximum level, which is 3. If you want, test it.

    ’Visual help.’
    This is how it should look like…
    [​IMG]


    ’”Expression code.”’
    If it doesn’t work out for you by using these nodes, set the tab to ‘Expression’, and add this line of code:
    Code (Text):
     CountAbil(StimPack2,CompleteOnlyAtUnit) < 3
    Once that is done, go back to the ‘Tree’ tab, and make sure the ‘Alias’ is set to the right ability. Woosh, done.


    So now to the ‘Use’ folder. The button may only be pressed once the level of the hero is equal to or greater than ((Ability level * 2) + 1) [do the maths, it’s this way: level 0 -> level 1: hero should be at level 1; level 1 -> level 2: hero should be at level 3, etc.].

    Add a new node, and set his type to ‘Greater Than or Equal To’. Add two new nodes to this field.

    The first node’s ‘Type’ will be set to ‘Count Behavior’, the ‘Alias’ to your VETERANCY behavior and the ‘State’ to ‘Completed at Unit’.
    The second node must be set to ‘Sum’. Then add THREE new nodes to that field.

    Both the FIRST and the SECOND node must be set to the following: ‘Type’ to ‘Count Ability’, ‘Alias’ to the ability you want to learn and ‘State’ to ‘Completed at Unit’. Since there is no multiply in this, you’ll just need to add it twice, which are the first and second node.
    The THIRD node must be set to ‘Constant’, and its value to ‘1’.

    Now there’s one more thing to do, and that is enter what the requirement will say when it’s not reached. (E.g.: you don’t have a Tech Lab on your Barracks, but you want to train a Marauder, and the button says: Tech Lab required! Muahahahah!)
    So, press the ‘Greater Than or Equal To’ node and select the ‘tooltip’ field. Anything you enter in here, will be the ‘warning’ (Tech Lab required!), I entered ‘Hero at corresponding level’.
    NOTE: you can’t enter values for each level of the ability, so it won’t be like in WC3. That’s why I chose for my sentence.

    ’Visual help.’
    This is how it should look like…
    [​IMG]


    ’”Expression code.”
    Once again, it doesn’t work out? Go to the ‘Expression’ tab and this line of code:
    Code (Text):
    CountBehavior(Veterancy,CompleteOnlyAtUnit) >= {Hero at corresponding level}(CountAbil(StimPack2,CompleteOnlyAtUnit) + CountAbil(StimPack2,CompleteOnlyAtUnit) + 1)
    Again, make sure the ‘Alias’ of the first two nodes are set to the ability you want to learn.


    Now, you’re done! The ability should level properly now and disappear when it reaches the maximum level. Happy me, happy you. It’s wonderful and actually so easy once you understand how it works.




    Yeah, still no agility attribute… I’m just too… lazy do to it right now. Besides, aren’t you happy you already have a working hero?! Pfff.

    Interesting stuff about the tutorial.
    • 12 pages worth of text in Microsoft Word.
    • Currently 4642 words. This includes these words and any code lines.
    • OVER 9000 IMAGES!!!!! Just a joke. But it comes close to 50 soon, I bet. (45, Actually.)


    The attached map is the full tutorial so far. Place the map in 'My Documents/Starcraft II Beta/Maps' to be able to open it with the editor.
     

    Attached Files:

    Last edited: Jun 13, 2010
  2. Hiruty

    Hiruty

    Joined:
    Mar 14, 2009
    Messages:
    291
    Resources:
    3
    Icons:
    1
    StarCraft II Resources:
    1
    Tutorials:
    1
    Resources:
    3
    Omg awsome luv yah plus rep :3
     
  3. ElegantPro

    ElegantPro

    Joined:
    Apr 24, 2010
    Messages:
    16
    Resources:
    0
    Resources:
    0
    I have a question. If you teach a hero an ability, say Psionic Storm:
    1. Can it be leveled to deal more damage?
    2. Can you make like in WC3, where you can chose to learn it in order (along with other skills)?

    ALSO: Awesome tutorial. Definitely useful :)
     
  4. Khlox

    Khlox

    Joined:
    Feb 24, 2010
    Messages:
    62
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    There should be a way to do so, but I have absolutely no clue how to do so at the moment, so I can't help you with that.

    EDIT: Right now, I'm working on expanding the tutorial with leveling abilities. For the people who want to see how I learned it, follow this link. It certainly helped me, and it works!

    For anyone who read this tutorial already, I'm also adding the Requirements for the leveling like in Warcraft 3. (Like: level 1 hero required for level 1 ability, level 3 hero required for level 2 ability, level 5 hero required for level 3 ability, etc.)
     
    Last edited: Jun 5, 2010
  5. Khlox

    Khlox

    Joined:
    Feb 24, 2010
    Messages:
    62
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Shamelessly bumping my own thread for the greater good. Or so. Oh well, highlighting it is fun.

    Also, I'm planning to add a fully functional Ghost hero (with the standard abilities) to the tutorial map later on. Yarrr!
     
  6. Tleno

    Tleno

    Joined:
    Jul 6, 2008
    Messages:
    4,783
    Resources:
    2
    StarCraft II Resources:
    2
    Resources:
    2
    Great Tutorial and I hope it will be approved. Lots of people want to know how to make their heroes for their crappy Dota clones to enjoy their crappy mapping skills.
    When are you gonna post ability making screenshots? Texe it not enough to understand.
     
  7. Khlox

    Khlox

    Joined:
    Feb 24, 2010
    Messages:
    62
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    I'll post the screenshots tomorrow or wednesday, as I didn't really had time to do it today.

    Anyways, glad you liked the tutorial, and I might just add some other things related to heroes later on.
     
  8. Tleno

    Tleno

    Joined:
    Jul 6, 2008
    Messages:
    4,783
    Resources:
    2
    StarCraft II Resources:
    2
    Resources:
    2
    I recommend adding other WC3-like info, like items.
     
  9. Khlox

    Khlox

    Joined:
    Feb 24, 2010
    Messages:
    62
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Currently working on creating the screenshots, I'll either add them right after or tomorrow.

    Items, I don't know. I mean, I know how to add them (or at least, I knew - followed a tutorial AGES ago), but I might. I'll probably first look after properly reviving your hero. :< (It be via triggers or the data editor.)
     
  10. Br3akth3w1nd

    Br3akth3w1nd

    Joined:
    Aug 27, 2008
    Messages:
    124
    Resources:
    0
    Resources:
    0
    Ok.. I made my hero, but I wont continue with sharing cuz I opened the editor 2 hours ago. You sure learn fast, I mean I am a true master of warcraft 3 editor.. but when I open the galaxy editor I feel like watching a brick wall. I mean come on, for a whole hour Ive been trying to add an attack to the ultralisk but what I did is delete all his attacks (somehow?!) :D Good job dude.. for the skills and for the tutorial.
     
  11. Br3akth3w1nd

    Br3akth3w1nd

    Joined:
    Aug 27, 2008
    Messages:
    124
    Resources:
    0
    Resources:
    0
    Hmm I cant seem to find out how to make this with the Barrage ability. Can someone help me?
     
  12. gaby-boy

    gaby-boy

    Joined:
    Jun 14, 2009
    Messages:
    114
    Resources:
    5
    Spells:
    4
    Tutorials:
    1
    Resources:
    5
    Nice Tutorial! +REP

    This help me a lot!

    EDIT : I have a question, how can i revive the hero?
     
    Last edited: Aug 10, 2010
  13. DarkPost

    DarkPost

    Joined:
    Jun 22, 2008
    Messages:
    61
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Hey man, I've got a question.
    Some abilities like Cloak, Blink, Stimpack and Concussive Grenades allready existing require researching in order to use, right?
    I find that the requirement field on the data editor has no requirement to remove (I expected the research for respective ability to be listed in said ability's requirement field), so my question is: How do I make the abilities non-research-required?
     
  14. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,807
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Potentially useful cause heroes are not precreated like in WC3.

    Approved.

    DarkPost, its eithor a requirement or a validator.
     
  15. malkavian.vision

    malkavian.vision

    Joined:
    Apr 30, 2010
    Messages:
    6
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The button for the ability can be removed ( invisible) once you reach maximum level by setting the appropriate flag on the Learn ability itself. Go to Abilities tab in data editor>>select the "Learn" type ability for your unit/hero and double click the "Stats - Flags" field. Check the "Hide Maximum Level". Now if your ability has 3 levels and you train it to level 3 you will no longer see that ability inside the learn command card.
     
  16. ubran

    ubran

    Joined:
    Sep 29, 2008
    Messages:
    164
    Resources:
    0
    Resources:
    0
    There's a unit that's already in the campagin called testhero or something like that. It contains the leveling system and abilities, but the example is an scv with like yamato. Earlier tonight tried making a hero just cuz I was wondering how someone else did it, and crap that data editor is a brick wall compared to WC3. So, seing your tut, may finally get it to work tomorrow and make a demo map to see if you guys think I did it right.
     
  17. Ascartes

    Ascartes

    Joined:
    Oct 3, 2009
    Messages:
    91
    Resources:
    0
    Resources:
    0
    I was wondering what is going on:
    I followed all of this, its awesome, but my question is
    The adrenaline skill uses a skill point, but when I made another skill, it doesn't take any skill points to learn. Anything I can do about this?
     
  18. gaby-boy

    gaby-boy

    Joined:
    Jun 14, 2009
    Messages:
    114
    Resources:
    5
    Spells:
    4
    Tutorials:
    1
    Resources:
    5
    I don't know I create another spell and its work perfecly!

    If a had your map with your spell I could check the prob.
     
    Last edited: Jan 26, 2011
  19. plumsy460

    plumsy460

    Joined:
    Oct 2, 2013
    Messages:
    272
    Resources:
    0
    Resources:
    0
    +rep

    How do I find the value of Strength of a unit in triggers?

    For instance, if I want to create "Variable = Strength of Unit"
     
  20. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,807
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I think it might just be the stack number of the attribute behaviour. If not then try the charge number.