Tutorial Data Editor - AOE Effects: Splash Damage and Auras

Dave312

Censored for your safe viewing
Reaction score
269
INTRODUCTION
The purpose of this tutorial is go through the basics of AOE effects, including how to create splash damage and auras. This tutorial assumes you have a basic understanding of the Data Editor and you can navigate your way around.

There are two basic ways of creating AOE effects as described below:
Damage Effect: all damage effects have a Search - Area + property which allows them to apply additional damage over an area (splash damage).
Search Area Effect: the generic effect used for creating AOE's. You should use this option in all cases other than when creating splash damage.


DAMAGE EFFECT
You are probably familiar with using the Damage Effect to deal a set amount of damage to the targeted unit. However it is also capable of dealing 'splash' damage to nearby units. The main property that we need to look at in order to create splash damage is Search - Area +. Opening up this property (when in table view) shows the window below:

attachment.php


This window allows you to specify 'damage zones' which can be used to specify how the weapon will splash and the amount of damage dealt to units in each zone. To help you understand this concept, we will look at the example shown in the image above (from the Crucio Shock Cannon Blast damage effect). This damage effect has three damage zones defined as shown in the image below. Each zone is circular in shape with the center located at the target unit. When the damage effect is applied, the damage (as defined in the Combat - Amount property) is dealt to the target unit. Then, each damage zone is selected and the damage dealt to each unit in that zone.

attachment.php


Each 'damage zone' has the following properties:
Arc: Restricts the damage zone to to a particular angle. The axis from which the angle is based off is the line from the caster to the target starting from the far side of the target (see diagram above)
Bonus: The bonus damage dealt to the unit in this zone
Fraction: The fractional amount of damage (from the Combat - Amount property. The total damage dealt = Bonus + Fraction * (Combat - Amount property)
Maximum Count: The maximum number of units that the damage can be dealt to in this zone.
Radius: the size of the zone. The radius is extended from the previous damage zone.
Radius Bonus: the distance the unit is allowed to move out the zone by before the damage effect is applied. The default is 0.
Validator: The validator which must pass in order for the damage to be applied.

There are a couple other property's on the damage effect which relate to splash damage:
Search - Exclude +: Units that should be excluded from the search.
Search - Include +: Units that should be included in the search.
Search - Maximum Count: The maximum total number of units in the search.
Search - Minimum Count: The minimum number of units that can be in the search.
Search - Minimum Count Error: The error displayed when the minimum number of units is not met.
Search - Search Filters: The filter flags that define which units can be found in the search.
Search - Search Flags: A couple of additional settings which control the behaviour of the search. The notable ones are:
Call For Help: Determines whether allied units are automatically called to the location of the unit hit by the splash damage.
Extend By Unit Radius: Determines whether the radius of the search effect is extended by the radius of the target unit. Useful to ensure large units don't occupy the whole area of the splash effect.
Same Cliff Level: Determines if the splash damage can only be dealt to units on the same cliff level



SEARCH AREA EFFECT
For the general case when you are trying to create an area of effect, you should be using the Search area effect (the only exception is when trying to create damage which splashes onto nearby units). In this section, we will look at how to use the Search Area Effect to create AOE's.

When a Search Area Effect runs, it picks every unit which falls under it's search criteria and applies another effect to that unit (the basic concept of all AOE's). Here are the main properties to help you configure your search effect:
Effect - Chance: The chance of the search area effect to run. A value of 1 means it will run 100% of the time when the search effect is called.
Effect - Validators: Validators which must pass for the search area effect to run.
Search - Areas +: This property is similar to the Search - Areas + property on the damage effect (as described above) and defines where the search takes place. Like the damage effect you can specify multiple areas to search and each area can have a seperrate effect applied to them. Each area has the following properties:
Arc: Restricts the area to to a particular angle. See the Arc property on the Damage Effect (above) for a more detailed definition. Note that if the location for the search is on the caster, then the arc specified is based on the facing direction.
Effect: The effect that is applied to units found in this search area.
Maximum Count: The maximum number of units that can be found in this search area.
Radius: The size the of search area.
Radius Bonus: The distance the unit is allowed to move out the area by before the damage effect is applied. Typically should be left as 0.
Search - Exclude +: Units that should be excluded from the search.
Search - Include +: Units that should be included in the search.
Search - Maximum Count: The maximum total number of units in the search.
Search - Minimum Count: The minimum number of units that can be in the search.
Search - Minimum Count Error: The error displayed when the minimum number of units is not met.
Search - Search Filters: The filter flags that define which units can be found in the search.
Search - Search Flags: Additional settings which can control how the search function works. See the Search - Search Flags property on the Damage Effect for more information.
Search - Impact Location +: The is the center point for where the search takes place.


CREATING AURAS
Now that you have a basic understanding of what all the properties mean, we are going to put that into use and try make an aura. Aura's are typically passive abilities (although they can be active i.e. require a button press to activate) which applies a buff to nearby units. This buff can be anything from increased move speed on allied units to reduced armor on enemy units. The example I will be demonstrating will be creating an aura that will increase the attack speed of nearby friendly units by 50%. The concept behind creating the aura is that we need to search for friendly units near our caster and apply a behaviour which grants the attack speed increase. Now the main point to remember when creating auras is that you want units to lose the buff when they are too far away from the caster. The simple method to achieve this is to make the buff only last for a short duration and get the search effect to run periodically. This way, units that are still close to the caster will have buff reapplied before they lose it, such that it appears that they never lost it in the first place.

You have probably noticed there are certain terms that are in bold in paragraph above. The reason for this is because they are key terms which will help you identify what you need to create. So let us begin. First we need to create the buff which grants us the attack speed bonus. So go across to the Behaviour data type and create a new behaviour as follows:

attachment.php


Now set these properties:
  • Open up the Behaviour - Modification + and select the Combat tab and set the Attack Speed Multiplier to 1.5 and click ok.
  • Now find the Stats - Duration property and set that to 0.5
  • Go to the UI - Icon property and set it to the icon you want displayed when the unit has this buff. I'm using Assets\Textures\btn-ability-protoss-protoncharge-color.dds
  • And finally set the UI - Tooltip property to the tooltip that should be displayed when the buff icon is highlighted. I'm setting mine to "This units attack speed has been increased by 50%."

Now we need to go and create the effect that will apply our buff. So go to the Effect data type and create a new effect as follows:

attachment.php


Now the only thing we need to modify on the effect is to set the Behaviour - Behaviour property to the behaviour we just created.

Now we need to create the search area effect. So create a new effect as follows:

attachment.php


Now set these properties:
  • Open up the Search - Areas + and create a new area with radius 8 and set the effect to Attack Speed Bonus (Apply) (the apply behaviour effect we just created). Leave everything else as it is.
  • Now go to the Search - Search Filters property and uncheck Enemy and Neutral and Exclude Dead, Destructible, Item, Missile and Structure.
  • Go to the Target - Impact Location and set the value to Caster Unit/Point.

Now finally we need to create the aura behaviour. Go across to the Behaviour data type and create a new behaviour as follows:

attachment.php


And set these properties:
  • Set Editor - Editor Suffix to "(Aura)"
  • Set Effect - Effect - Initial to the search area effect we just created.
  • Set Effect - Effect - Periodic to the search area effect we just created.
  • Open up Stats - Flags and check hidden (we don't want to see this as a buff on the caster).
  • Set Stats - Period to 0.4 (this should be less than the duration of the buff created in the first step to ensure there is an overlap between the old buff being removed and the new buff being applied).

Now the last step is to add the behaviour to the unit. To do this, select your unit and open up the Behaviour - Behaviours + property and add the 'aura' behaviour we just created (Attack Speed Bonus (Aura)). You can also add a passive icon to the units command card but I'm not going to worry about doing that. Now test it out so see it working in action.


That brings us to the end of this tutorial. If you happen to get stuck or have any questions or comments, please feel free to post below and I'll do what I can to assist.
 

Attachments

  • SC2Tutorial-AOE-1.png
    SC2Tutorial-AOE-1.png
    32.2 KB · Views: 5,701
  • SC2Tutorial-AOE-2.png
    SC2Tutorial-AOE-2.png
    25.7 KB · Views: 5,899
  • SC2Tutorial-AOE-3.png
    SC2Tutorial-AOE-3.png
    22.1 KB · Views: 5,376
  • SC2Tutorial-AOE-5.png
    SC2Tutorial-AOE-5.png
    25.4 KB · Views: 5,362
  • SC2Tutorial-AOE-6.png
    SC2Tutorial-AOE-6.png
    22.9 KB · Views: 5,335
  • SC2Tutorial-AOE-4.png
    SC2Tutorial-AOE-4.png
    23.6 KB · Views: 5,379

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I'm assuming the search areas does not stack? Since units in the middle are technically in all the damage zones they should take damage from all the areas but I am assuming this is not the case?

Anyway, great guide. I didn't know how to do this although I could probably find it with some tinkering around. It's nice with a well-made write up though.
 

celerisk

When Zerg floweth, life is good
Reaction score
62
> I'm assuming the search areas do not stack?

Actually, they do.

So, if, for example, you want 30 damage in the center, 20 in the "middle" and 10 "outside":
- use 10 damage on each one, the stacking will do the rest
- use the expected damage and put the "inner" effects in the exclude+ list of the "outer" effects(*)





(*) for a Blizzard example, do a search on "kaiser" in the effects tab.
 

X-maul

AKA: Demtrod
Reaction score
201
Good tutorial, gets acros the subject pretty well, the only thing I would like to know is; how do you make the aura an ability? (preferably a passive ability (which you do not need to turn on))
 

Dave312

Censored for your safe viewing
Reaction score
269
A passive ability is a behaviour (there is no ability type that is passive). Behaviour's that are passive are added to the Behaviour - Behaviours + property on the unit. An icon is then added to the unit's command card and the command type should be set to passive.

@Siretu
I didn't think about stacking Search Area Effects. Splash damage zones do not stack.

@Celerisk
Thanks, I'll add that in.
 

X-maul

AKA: Demtrod
Reaction score
201
hm, okay - so I will have to trigger it if I want a unit to learn the aura through a learn ability?
 

celerisk

When Zerg floweth, life is good
Reaction score
62
Feels a bit off topic here...


There are abilities of type "behavior".
Usually, they are only turn-on-able, but you can add a second button / command to toggle.
It's what, for example, Ghosts use for cloaking.

You can also have it without button, and order it on when learned. Along with a passive button that only shows once it's learned.

Well, plenty of options.
 

Dave312

Censored for your safe viewing
Reaction score
269
There are abilities of type "behavior".
Yes but as you said, they are all active abilities.

hm, okay - so I will have to trigger it if I want a unit to learn the aura through a learn ability?
I have used the method the Celerisk mentioned and believe that is your best option. The only issue is that you need to attach a new button to the command card for each level of the ability, and since there is a limit of 32 buttons per command card, you are limited in the number of levels you can have. Take a look at this tutorial for more details on how to set this up. Essentially you need to create a separate behaviour for each level of the ability, and give your unit every behaviour. Then use a dummy ability which you level up. Finally just use requirements and validators which check the level of the dummy ability to determine which aura is applied to the unit and which button for the ability is shown.

Also, the PTR that is currently available has increased the number of buttons on a command card to 64.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
For the record, the limit of 32 buttons on a command card is increased to 64 next patch. This means that you can fill all 4 submenus of a command card with one button on each slot and still have 4 left.
 
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