Tutorial Data Editor - Abilities and Effects

Monsterous

In the Shadows, Lurking.
Reaction score
99
..Abilities and Effects


~~~~~The Contents~~~~~
............Introduction
.....How do Abilities Work?
.........What are Effects?
....How do you make Abilities?
.............Using Effects!
..........Using Behaviors!
..........Finishing Effects!
......Linking Ability to Units.
...........Testing it out!
............Extra Notes.
.........Closing Thoughts.



Introduction

Hello, and welcome to my hopefully informative tutorial that will teach you all you need to know about how abilities and effects work, and how you can utilize them to create whatever ability you want! We'll even dip into how to link abilities to units, and also how to utilize behaviors to create buffs and debuffs. So, get your brains working and your data editor - as you learn, and I teach you, how to make abilities. If you need a reference, i have posted the map I used to create this ability at the bottom of this tutorial.


How Do Abilities Work?

Abilities are quite simple when laid out clearly - they are essentially a command that triggers a variety of actions.

The unit must have the ability allocated to it. The button (what you press) of the ability is inside the units command card, where all other abilities are stored and shown to the player. When the button is pressed, the ability activates - triggering off any effects (actions) allocated to it.


What are Effects?

Effects are the actions of an ability. This gives an ability vast amounts of control of what it can do; without needing the trigger editor. With effects, you can make an ability as complex and long as you want. Effects do not have to be directly linked to the ability, they can also be triggered by other effects. An example of effects in action:

All of these are effects. Ingame, you may notice the green effects - but you never notice the blue effects. All of this happens instantly.

Here's a brief summary of the commonly used effects:

[Effect Name:] [What it does]
Apply Behavior: This creates a behavior (kind of like a buff/debuff) which alters the target unit somehow temporarily or permanently.
Create Persistent: This is like a timer for abilities, and can repeat effects periodically (Every X seconds).
Create Unit: Creates a unit at a target location.
Damage: Damages the target unit.
Launch Missile: Launches a missle at a target unit/point. Triggers other effects when the missile hits the target.
Modify Unit: This alters a unit permanently in someway.
Search Area: This will search an area for a specific type of unit, whether friendly or foe - and will activate effects when it finds one.
Set: This will activate a variety of effects at once.


How do you make Abilities?

Now that you know how abilities function, and how effects work - it's time to learn how to actually make abilities! Huzzah!
When making abilities, its often a good idea to layout how the ability will work - so it saves you time fiddling about. We will attempt to create the previous example above. The ability we want has to damage the caster, search for targets around a location, and apply a random effect to each target.

First, before we do the actual actions of the ability - we have to create the base of the ability itself and its button.


The two most often used Ability Types are "Effect - Instant" and "Effect - Target". They both activate differently. The custom ability we're making requires a target - so we choose the "Effect - Target" Ability Type.

Now we have to edit the ability to suit our needs. First, we have to look at the Target Filters.

If left blank, then the ability will instead target a point - not a unit. If filled in, it will instead target a unit that meets the criteria of the Target Filters. Lets fill it in.
First, open up the Target Filters and hit Enter Value on the top right corner.

Hit Ok. At minimum, our ability needs to only target enemy units, so check the Enemy box below the Unit Types. The other three are unchecked, meaning that they cannot be targets for your ability. The Unit Types above is an extensive list of what can or cannot be targets. Each Unit Type comes under three states. Allowed, Required and Excluded. Allowed means that the unit type can be targetted. Required means the target MUST have this unit type, and Excluded means the unit type CANNOT have this unit type. Generally, you don't want your ability to target Missiles, Dead, Hidden Units or Self (The unit casting the ability), so exclude those, and you want the target to be visible when casting it, so require that.
To change the state of a Unit Type, double click the state.

Your box should look something like this.

You can also opt to exclude other unit types such as Massive units (like the Thor) or make it only able to target Ground Units (either excluding Air units or requiring Ground units.) Its your choice ultimately.

The ability can now target units!

Now, we have to fiddle with the ability's stats a bit more. We have to add...
The Range

Input whatever number you feel necessary. Under 1 is generally melee range.

The Cooldown

Your looking for the Cost - Cooldown - Time Use box. Add in however many seconds you'd like. When you've inputted it in, the cooldown area of the ability will automatically fill itself in.

The Button.
Making buttons is done outside of the ability part of the Data Editor. Instead, you do it in the Buttons portion of the Data Editor. When your there, create a new button. All buttons are the same, so you only have to worry about what your going to call it.
Once you've named it, look at the selection to the right.

You only need to worry about three things. The Hotkey, the Icon, and the Tooltip. The hotkey is the shortcut to the ability, rather than just clicking it. The Icon is what is displayed when the player is looking at the button, and the Tooltip is what the button says when the player's mouse is on the button. Input whatever you feel necessary.
Excellent Advice for Icon Hunting: When searching - in the search bar, type in "btn". This will display every icon used inside the game. If an icon you want is not here, then type in what you think your looking for in the search bar - you might get lucky!

With the button now created, return to your ability, and look for the "Commands - Default Button" box. Open it, and change the Execute part to the name of the button you just created. You don't have to do the same for the Cancel part, as that is used for channelled abilities.


The base of your ability is now complete! Now its time to get to the FUN stuff.


Using Effects!

It's time to create what the ability does. Lets take a look again at the ability we need to make:

Its important to plan out how your going to make the ability, so you know exactly how your going to do it. See if you can figure out how this ability would work in a list of effects. Try it; its good practice!

Anyway, how its going to be done is simple.
The ability activates two effects at the start at the same time: These two effects must be inside a Set Effect.
The first effect is a Damage effect, as it damages the caster.
The second effect is a Search Area effect, as it searches an area for targets.
The targets from the search area effect is given a random effect of three. This must be inside another Set Effect.
The effects inside the Set effect all do different things. One is a Damage effect, the other two are Apply Behavior effects, with buffs attached to them.

Why the need for Set effects? Effects will only activate one effect if given more than on effect. So if it activates a set effect - it will activate all inside that Set effect (Or a random one if you choose to)!

Lets begin the creating. In the effects part of the Data Editor, create a new effect, with effect type Damage. Name it something relevant and easy to find, like <Ability Name>Damage. Now, go to the right and do two things. One, change the "Combat: Amount". This is how much damage the effect will deal. Change it to a number you'd like. I set it to 20.
Next, scroll down to "Target: Impact Location - Value". This determines where the effect will "land". Seeing as the unit using the ability is getting damaged here, change the value to Caster Unit.
Heres what it should look like in these two fields:

The damage effect is done. Simple!
Extra Note from Dave312: "The target requirements of an ability doesn't just depend on the Target Filters property, but also the effect attached to the ability. For example, if I have an ability which has a Create Unit effect attached to it, and the Target Location property on this effect is set to Target Unit, then regardless of what has been set on the ability, you must target a unit (it will give you an error if you don't)."

Next up is the Search Area effect. Create a new effect with effect type Search Area. Don't forget to name it something relevant, preferably the same as the damage effect you just created so its easy to find each one as they will be together in a dropdown list of every effect in the game!
Look to the right. Its mostly greyed out and empty.

That will change! It will automatically fill itself in when you fill in a box. The Arc is the angle which the search area encompasses. 360 degrees will search in a circle, whilst 180 degrees will search in half a circle, and so on. Set it to 360 degrees.
The Maximum Count is how many units the search area can target. If its set to -1, then it will target ALL the units that meets its filters.
The Radius is how large the search is. One being really small, whilst ten being very huge. Set it to as big as you'd like, I set it to 8
Next, we have to say what targets the Search Area effect can target. This is the same as the Target Filters you set up earlier in the ability, so replicate the targets to the Search Area. Unfortunately, you can't copy+paste it.
Heres what your Search Area should look like:

The last thing we have to do later on is add an effect to it. But we'll get to that!


Currently, you've created a Damage effect, and a Search Area effect. The ability your making has to set both of these off at the same time. So now we have to create a Set effect. (Which is dead easy.)

Make a new effect, and label it something relevant (Have i stressed this enough?) Now, go to the right and inside the "Effect: Effects:" box, put in the two effects you just created. Heres why labelling is important. Go through until you eventually find the two effects, which should be next to eachother. For me, it will be; "AnAwesomeAbilityDamage" and "AnAwesomeAbilitySearchArea". It may be different for you.
Excellent Advice for Hunting Down Effects: Type in the first letters of the effect your searching for. You've now gone to the start of the list of the effects you've created - making effect hunting much easier!

Heres how mine looks:


The Set effect is now complete.


Time for your first test. Make a damage effect that deals 50 damage. Answers are inside.
It's essentially the same as the Damage effect you created earlier! Just change the "Combat: Amount" to 50! The "Target: Impact Location - Value:" is Target Unit instead, as the unit being targetted is getting damaged, unlike last time it was the casting unit!
No worries if you got it wrong, you'll have plenty to practice once your finished!


Using Behaviors!
For the next two effects, we have to slow the target, and also make the target unable to attack. Both of these affect the target temporarily, a "debuff" if you will. Behaviors, whilst they can be other things, are mainly used for being buffs/debuffs.
Go to the behaviors part of the Data Editor, and create a new behavior. Change the behavior type to "Buff".

On the right, theres a MASSIVE list of things. Don't worry, they are all easy to explain - they're in their own seperate groups. I'll explain what each group of boxes do.

Ability: Modification - These change abilities used by the affected unit.
Behavior: Modification - These change what behaviors that can be applied to the affected unit.
Combat: Damage Response - These will trigger when the unit that has the behavior applied takes any damage.
Combat: Modification - These will affect the unit on how it performs combat. For example, attack speed or damage are under here.
Combat: Death Response - These will trigger when the unit is killed.
Effect: Effect: - These are used during the timeframe of a behavior's life, such as when it spawns, during its life, and when it is removed.
Movement: Modifcation: - These affect how the unit moves, for example movement speed and acceleration.
Stats: - This determines the data of the behavior, such as how long it is applied for, and if it has any periodic timers.
UI: - This is what the player sees when the behavior is applied. This is kind of like a button for abilities. (Except you dont press these.)
Unit: Modification - This changes the unit itself, such as the units height, and sight range.
Weapon: Modifcation - This changes the stats on the weapons the unit is using, and can enable/disable weapons.

Its a little complicated at first, but its easy to settle in. The first behavior we're going to create is slowing the target by 75%. Looking at the group of modifcations above, we have to go to the "Movement: Modifcation" area, since the modification we want is a movement speed reduction.

We want to reduce the movement speed by 75%, so we want to multiply the movement speed by 0.25. (Example: 75% of 100 is 25. So a 75% reduction is 25, which is the same as 100*0.25)
Now, we have to adjust two things. The UI of the behavior (like its icon and tooltip) and the duration of the behavior. The duration can be found in the "Stats" part of the Behavior. Set it to 5 seconds.


Next, go to the behavior, and change the icon and tooltip to whatever you like! For me, I used the Corvid Reactor icon, and for the tooltip, put: "This unit has been slowed by 75%!"
Extra Tip: Behavior's can also appear invisible to players. Go to the "Stats - Flags" and check the "Hidden" option. This is a very useful feature!
Extra Tip #2: Behavior's can be tinted Red (Negative) or Green (Positive) to indicate whether the behavior they've received is good or bad in the "Behavior: Alignment" box! Another useful feature!
Extra Tip #3: Its best to name Behaviors to what the player is going to see, as the Behavior when shown uses the name you've given it. Instead, add in the rest to the Editor Prefix area, so in the editor, it looks the same, but ingame, it shows what its doing!

The first behavior is complete. Now it's time to do the second one!

The second behavior needs to prevent the unit from attacking for 5 seconds. Create a new behavior, and fill in the "Stats - Duration" to 5 seconds like the last behavior. Now, the main part is preventing the unit from attacking. There are several ways we could do this...

We could disable the weapon of the unit, but then we would have to add in every possible weapon, as it doesn't specify disabling whatever weapon the unit is holding.
We could also completely remove its attack speed, but it only goes to 0.01, not 0, so it can still attack, just incredibly slowly.

The other, efficient, simpler method is to remove the Attack ability altogether from the unit in the "Abilities - Modifcation" area of the behavior.

Now that you've put that in, fill in the icon and tooltip of the behavior - and this behavior is done! Simple!

Your two behaviors are now finished. All you need to do is link them up to an "Apply Behavior" effect.

Finishing Effects!

Time for your second test. Create two Apply Behavior Effects and link one of the behaviors you created to each.
Return back to the effects part of the Data Editor, and create an effect with the Apply Behavior effect type. All you need to do for this effect is to put the behavior you've created in the "Behavior: Behavior" box. Its that simple!
How to make the Effect:

(Its already there by default!)
Apply Behavior Effect One:

Apply Behavior Effect Two:
Good job if you got it right! If you didn't, no worries - you've gained good practice!

Now, the final effect you have to create to finally make this ability become reality.


Create a Set effect, and apply the three previous effects you created to it in the "Effect: Effects" box. The 50 damage one, and the two apply behaviors, and then enable the "Effect: Random" box. Finally, set the "Effect: Maximum Count" to 1, so it will only trigger one effect at random. causing the set to randomly activate one of the effects! Once you've done that, look to bottom left of the Data Editor.

It shows that you've successfully linked most of your ability! The Behaviors have been linked to the Apply Behavior effects, which have been linked to the Set effect alongside the Damage effect.

All the effects are in place! Now, the final step to finishing this ability! Linking everything together!


Return back to your Search Area effect, and in the "Search: Areas - Effect" box, put in the Set Effect you've just created.


And finally. Return to your Ability. Link the first Set Effect you created at the start to your Ability in the "Effect: Effect" box.


Congratulations! You've SUCCESSFULLY created a rather complicated ability! Heres how it should look...


But thats not the end. Oh no, you have one final step!

Linking Abilities to Units.

Linking abilities to units is a simple process. Go to the Units part of the Data Editor. First, grab any unit you want. For example, I chose the marine. At the top of the boxes on the right, is the "Ability: Abilities - Ability" box. Enter it, and add the ability you just created to it.

Next, enter the box below it - the "Ability: Command Card - Buttons - Ability Command" box. What will come up is a very easy to use interface on the Command UI of units.

The fifteen squares represent the areas where buttons can be placed for abilities. Choose a location where you want your ability to be shown, then click on the green X to the right, then find the button you created for your ability.
Once placed, change the Command Type to "Ability Command", since the button is linked to an ability. Then, change the Ability to the Ability you created. The Ability Command will automatically fill itself in. Heres how mine looks like:


Then, hit Ok.

Congratulations. Your ability is fully operational and ready to be tested.

Testing it out!
Place your unit into the map (give it a high amount of health so it can withstand attacks, and to deal with the self-damage of the ability), and create some units ready to be tested on.
When testing this ability - we need to look at if the ability works.

Are the units getting damaged?


Are the units getting slowed?


Are the units unable to attack?


Is the caster getting damaged?


Do the behaviors show up on the target units?
(Yes, as seen in the pictures)

Are the effects applied randomly?
(Yes, as the units do not have two behaviors applied to them, also not all of them died at once. (Their health was below 50))


It all works! Excellent! If yours works, then thats amazing! You've created a complicated ability certainly, and you've gained good practice with abilities, effects and behaviors.

Extra Notes.
If you want to learn how to make your abilities look good, and to utilize unit animations and other special effects to show snares, stuns and such, check out my other tutorial on how to use Actors and linking them to Abilities.
http://www.thehelper.net/forums/showthread.php/167071-Actor-Events-Making-your-abilities-look-good!

Closing Thoughts.
I hope you've learned immensely from this. Congratulations on learning, and making your way through this arduous journey! I hope i've been helpful, and if you have any questions on Abilities, Effects, or Behaviors, then post them here.

Cheerio!
 

Attachments

  • Abilities and Effects Tutorial.SC2Map
    170.7 KB · Views: 703

Dave312

Censored for your safe viewing
Reaction score
269
Very nice tutorial. Excellent work :thup:

Just a couple of points to note:

The target requirements of an ability doesn't just depend on the Target Filters property, but also the effect attached to the ability. For example, if I have an ability which has a Create Unit effect attached to it, and the Target Location property on this effect is set to Target Unit, then regardless of what has been set on the ability, you must target a unit (it will give you an error if you don't).


Excellent Advice for Hunting Down Effects: Press the first letter of the effect your searching for. You've now gone to the start of the list which starts with the letter you pressed - making effect hunting much easier!
It doesn't just work with the first letter. If you start typing the first few letters of your ability it will keep scrolling down to match the series of letters you have typed.
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
The target requirements of an ability doesn't just depend on the Target Filters property, but also the effect attached to the ability. For example, if I have an ability which has a Create Unit effect attached to it, and the Target Location property on this effect is set to Target Unit, then regardless of what has been set on the ability, you must target a unit (it will give you an error if you don't).

Ah true, i forgot about that. I'll add that in.

It doesn't just work with the first letter. If you start typing the first few letters of your ability it will keep scrolling down to match the series of letters you have typed.

Ah, awesome - I think i remember trying this once and it didnt work, might have typed it wrong.

Very nice tutorial. Excellent work :thup:

Many thanks :D
 

Bloodcount

Starcraft II Moderator
Reaction score
297
I haven't read it yet, but lookin' good ! (By the amount of pictures lol)
 

tommerbob

Minecraft. :D
Reaction score
110
As a new SC2 modder who is trying to get the hang of the Data editor, I want to say that this tutorial is awesome. It is clear, concise and articulate. It was easy to follow and very informative! I wish there were more tutorials like this one. :thup:
 

Vega

New Member
Reaction score
0
Echo the statements above. This has been incredibly helpful for me as a new modder. THANKS A TON!
 

Migrax

New Member
Reaction score
0
Hi. I did everything exactly like the tutorial said and it simply says "no units can carry out this command" when I try to use the ability. Any ideas? Thanks.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
It could be that this tutorial has become outdated in the 2½ years since it was written, but it is not very likely. It's hard to know exactly what went wrong, but you could always upload it here and let us have a look at it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top