Creating some basic abilities/spell-types
In this tutorial i’ll show how to make some basic, well-known abilities. This is not a step-by-step tutorial, and is not made to beginners, so don’t ask how to use variables and such. I only show a way how to make them to avoid those repeatative threads in the forums.
I attach a map that contains a sample for all abilities that are included here.
Basics needed:
1. Knowledge of the Object Editor.
2. Knowledge of the spell ’Channel’.
3. Knowledge of triggers/Trigger Editor, variables, removing leaks.
Contents:
I. Deal damage based on hero’s attribute points (GUI) – easy
II. A simple blink-strike spell (GUI) – easy
III. Custom auras (GUI) – medium
IV. Only day/night passive abilities (GUI) – hard
V. A simple knockback spell (GUI) – medium
VI. Activateable passive abilities (GUI) – medium
VII. Passive Mirror Image (GUI) - medium
I. Deal damage based on hero’s attribute points
It’s pretty easy but many people do not know how to make it. You have to use the action:
Unit – Damage target
After you declare the units that deals and takes the damage, you have to set the damage value. We want this to be one of the hero’s attribute points.
In this example, I preset this value in a variable first to make it clearer to understand.

AttributeDamage
The only problem here can be that an attribute point is an integer, but the damage value must be a real number. This means, we have to convert the attribute point into a real.
Finally, you set the attack and damage types, and there you go.
II. A simple blink-strike spell
We want our hero to teleport to the target, and deal some damage to it. For teleporting, we use the action ‘Unit – Move Unit (Instantly)’.
Look at my trigger first:

BlinkStrike
First, we store the target unit’s position into a variable to avoid a location leak. We move the caster to the target and deal damage.
And here, I found a bug: if I tried the combination move-and-damage, it did not deal damage, but if I changed the order to damage-and-move, it worked. Strange…
After that, we order the caster to attack the target.
Finally, we remove the location (leak).
III. Custom auras
What about making an aura that gives a special skill for nearby friendly/enemy units? In this example we’ll make an aura that gives 4%/8%/12% chance for nearby friendly units to regenerate 15/30/45 hit points on each attack. The trigger is simple but it has a problem:

RegenAura
Maybe you already see the problem: we cannot detect the level of the aura! There’s no such an action to do so. This is the main issue why I included this type of ability in this tutorial. We have to make a trick.
Make separate buffs for each level!! That’s the key. This way, we can detect which buff the affected unit has, so we can get the exact level of the aura. Example:
Level 1 – Stats – Buffs Regen Aura (level 1)
Level 2 – Stats – Buffs Regen Aura (level 2)
Level 3 – Stats – Buffs Regen Aura (level 3)
The trigger must be modified this way:

RegenAura
After detecting which buff the unit has, we set the variable (Level) to the appropriate value, and we can use it to calculate other values like the chance and the regen value to fit level-stats. And there you go!
IV. Only day/night passive abilities (not MUI!)
To those who don’t know what they are, these are passive abilities that have effects only at day (or at night).
In this example, we will make an aura that decreases nearby enemies’ armor by 1/2/3 at night!
The trigger part is not hard. The trick must be made in the object editor:
1. We need 2 (!) hero abilities. The first one will be a dummy “learning-ability” (based on Channel, and the second will make the effect (in this case, based on Devotion Aura).
2. The ability based on Channel is the main trick here. It has an option “Visible”, that makes its icon to appear if the hero learns the ability. If it’s not ticked, the icon will not appear, and will not take up space. Configure this ability (Icon - research, Hotkey - Learn, Tooltip – Learn (Extended) fields for sure), as it’ll be the ability that appears on the hero’s “learnable abilities” list. Make it look like a normal ability! Add THIS ability to the hero’s ability list (in the object editor of course).
3. Here it comes to the second ability, the one that appears on the hero’s “in-game ability-list”. This one must reduce armor, so we base it on Devotion Aura. Now for configuration:
If you want your ability to have N levels, make this ability to have N+1 levels, as it must have a level that does no effect (when it’s day). Let’s declare level 1 to be the one that makes no effect. In this example, our ability must look like this:
Level 1 – Data – Armor Bonus 0.00
Level 2 – Data – Armor Bonus -1.00
Level 3 – Data – Armor Bonus -2.00
Level 4 – Data – Armor Bonus -3.00
Set the icon, tooltip texts, targets allowed fields and such. An example:
Level 1 – Text – Tooltip – Normal – Extended It’s day! – No effect
Level 2 – Text – Tooltip – Normal – Extended Reduces armor by 1.
Level 3 – Text – Tooltip – Normal – Extended Reduces armor by 2.
Level 4 – Text – Tooltip – Normal – Extended Reduces armor by 3.
4. Now that we have both abilities, we arrived to the trigger part. We need 3 triggers. One for storing the learning hero into a variable, one for detecting day, and one for detecting night. When the hero learns the ability based on Channel (that disappears), we add the normal ability (with 4 levels) to the hero. At day, we want the ability to have no effect, so if it’s day, we set its level to 1. At night, we must set it back to its normal level. Here, the first ability will store the information about the exact level of the passive ability, as it was only learned by the hero, but its level hasn’t been modified. But remember, the passive ability has N+1 levels, because level 1 makes no effect, so we have to add 1 to the level of the “dummy-learning-ability”.
Here, ‘DayNight Passive’ is the ability based on Channel, and ‘DayNight Passive (for ability)’ is the normal one that makes the effect.

DayNightLearn
We store the learning hero, add the passive ability, check the day state and set the passive’s level to the apropriate value.
The trigger for detecting day:

Day
As you see, this trigger runs when night turns to day. We must remove the ability’s effect. We do this by setting its level to 1 (we set level 1 values to make no effect).
Trigger for detecting night:

Night
The level of the ability based on Channel remains normal all day, so we use it to set the passive ability’s level back to normal if it turns to night.
V. A simple knockback spell (not MUI!)
You need a unit-targeted spell only from the object editor, so I’ll describe the trigger part only.
We need two triggers for this:

Knockback
This trigger fires when the spell is cast, stores the two participants (caster, target) into a variable, and turns on the second trigger that moves the target away from the caster.
LoopCounter is an integer variable that counts how many times the “movement-trigger” runs. Be sure to set it to 0 in this trigger!

KnockbackMove
This may be confusing at first sight. As you see, this trigger runs every 0.02 seconds. It’ll move the target from point to point, so it will perform a smooth slide.
Line-by-line description:
1. line: We store the location of the caster.
2. line: We store the location of the target.
3. line: We calculate the point where the unit should be moved. For this, we use ‘Point With Polar Offset’. It declares a point from the following parameters: a base point, an offset value, a degree.
4. line: With that action, we move the target to the next point (TempLoc[2]) in the slide movement.
5/6/7. line: Removing location leaks.
8. line: Add 1 to the counter variable (LoopCounter)
9. line: Checks if LoopCounter reached the appropriate value (here 50) and disables the movement-trigger to stop the unit sliding.
Each time this trigger runs (50 times a second), the target is moved away from the caster with 5 units. So we must count how many times this trigger should run:
max distance of the move / move-range per one trigger-run
(In this case: 250/5 = 50)
VI. Activateable passive abilities
For this, we use an activatable ability, Immolation seems to be the best, because it leaves a buff on the caster, and drains mana while it’s active.
The buff should be based on „Immolation” and not „Immolation (Caster)”. You can even delete the second one, there’s no need for it (and i don’t see if it had any effect btw).
In my sample, i named both the ability and the buff „Boost”.
The second thing we need is the desired passive ability. For this, I use a custom item ability based on „Item Armor Bonus”.
Let’s see the trigger part:

Boost
As you see, we need only one trigger for this. To catch the event when the hero turns on Boost, we catch the order instead of the cast. Immolation has two orders, one for activation („immolation”), and one for deactivation („unimmolation”).
So when it’s activated, we add, when deactivated, we remove the passive ability.
But, there’s one thing that we must take care of. When the unit runs out of mana while the ability is active, the trigger does not fire, so the passive ability reamains on the hero. That’s why we have to include that buff-check. Tricky isn’t it?
VII. Passive Mirror Image
This ability allows our hero to passively create illusions of itself if it’s attacked.
We need:
-a pure passive ability (i used Evasion)
-a dummy spellcaster
-an item based on „Wand of Illusion” (it’s a charged item) - optional
-a modified item ability based on „Item Illusions” - optional
-a trigger
Unfortunately, a good „illusion-creating” unit ability does not exist, so we have to use an item (by a dummy unit) to create the illusion.
The new item is needed if you want to modify the normal Wand of Illusion’s stats. In my example, i used a custom item, because i want the illusions to deal damage, and i want them to have only a 20 second duration.
So modify the item, and its ability to fit your wishes.
We don’t have to do anything else in the object editor, so let’s go on to triggering. Here it is:

PassiveMirrorImage
The things to pay attention to:
-We want to limit the number of illusions to 5, that’s why we count their number first.
-Illusions also have the hero ability, so we have to check if the attacked unit is an illusion or not, and calculate the proper chances to create a new illusion. (The hero and the illusions have different chances to create illusions!)
-If the „chance-check” was done, we create the dummy spellcaster. We have to give him an inventory - Inventory (Hero) -, otherwise we couldn’t give him the „illusion-creating” item.
The actions ’Create item for unit’ and ’Order unit to use item’ are not under ’Unit’, but under ’Hero’!
-After it, we remove the leaks.