Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _articles/abilities/ability-keyvalues.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TODO: Some categories are missing:
[![Cast Animation](https://i.imgur.com/ewEWcom.png)](##animation "Animation when the spell starts casting")
[![General Stats](https://i.imgur.com/5mO6j4Z.png)](##stats "General numeric values")
[![Others](https://i.imgur.com/z73NEKo.png)](##others "Other less common values")
[![Ability Special](https://i.imgur.com/3ynaE40.png)](##special "AbilitySpecial block, used for variables")
[![Ability Special](https://i.imgur.com/3ynaE40.png)](##special "AbilityValues block, used for variables")
[![precache](https://i.imgur.com/qKW3Xs4.png)](##precache "Precache block, used to preload assets")
[![Ability Events](https://i.imgur.com/6IFhMIu.png)](##abilityevents "Triggers on the ability to perform Actions")
[![Modifiers](https://i.imgur.com/XEFsYCD.png)](##modifiers "Effects that can be applied on units")
Expand Down
17 changes: 6 additions & 11 deletions _articles/abilities/abilityduration-tooltips.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steamId: '76561198046984233'
date: 15.12.2014
---

**TL;DR:** AbilityDuration is a fairly useless keyvalue because whoever coded it forgot to make an automatic tooltip like with `AbilityDamage`. Use a "duration" AbilitySpecial and connect it with lua instead.
**TL;DR:** AbilityDuration is a fairly useless keyvalue because whoever coded it forgot to make an automatic tooltip like with `AbilityDamage`. Use a "duration" AbilityValue and connect it with lua instead.

Imagine you want to have an ability apply a modifier for some seconds, duration changing with levels.

Expand All @@ -19,24 +19,20 @@ And then have your modifier refer to %AbilityDuration in the "Duration" modifier

But when when you want to indicate that your ability lasts for said duration, this AbilityDuration doesn't generate a **"DURATION:"** tooltip by itself, so you have 3 options:

**Option 1.** Write "Last 3 seconds at level 1 and then 2 at level 2 and 3" in the _Description.
**Option 1.** Write "Last 3 seconds at level 1 and then 2 at level 2 and 3" in the _Description.

This is bad for the reasons explained before.

**Option 2*.** Have a "duration" AbilitySpecial in addition to the "AbilityDuration" and keep both values syncronized.
**Option 2*.** Have a "duration" AbilityValue in addition to the "AbilityDuration" and keep both values syncronized.

Suboptimal but decent solution, as it allows you to use ability:GetAbilityDuration() which takes takes its value from AbilityDuration.

**Option 3.** Remove AbilityDuration, only keep the AbilitySpecial. Best way as far as I can tell.
**Option 3.** Remove AbilityDuration, only keep the AbilityValue. Best way as far as I can tell.

```
"AbilitySpecial"
"AbilityValues"
{
"01"
{
"var_type" "FIELD_INTEGER"
"duration" "3 2 2"
}
"duration" "3 2 2"
}
```

Expand All @@ -51,4 +47,3 @@ end
```

Has the same results and works for every scenario.

21 changes: 10 additions & 11 deletions _articles/abilities/datadriven/all-about-the-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@ Event | Target
--|--
OnCreated | CASTER, TARGET
OnDestroy | CASTER, TARGET
OnIntervalThink | CASTER, TARGET
OnIntervalThink | CASTER, TARGET
OnProjectileDodge | CASTER, TARGET

### Damage

In these events we can send an extra parameter, referenced as %attack_damage

Note that this is not a value taken from an AbilitySpecial, instead it is generated by the system to be used in very particular events.
Note that this is not a value taken from an AbilityValues, instead it is generated by the system to be used in very particular events.

Event | Target | %attack_damage value
--|--|--
OnTakeDamage | CASTER, UNIT, ATTACKER | post reduction
OnDealDamage | CASTER, UNIT, ATTACKER | post reduction
OnTakeDamage | CASTER, UNIT, ATTACKER | post reduction
OnDealDamage | CASTER, UNIT, ATTACKER | post reduction

### Attacks

Expand All @@ -114,16 +114,16 @@ Event | Target | %attack_damage value
OnAttack | CASTER, TARGET, ATTACKER | 0
OnAttackStart | CASTER, TARGET, ATTACKER | 0
OnAttackAllied | CASTER, TARGET, ATTACKER | 0
OnAttacked | CASTER, TARGET, ATTACKER | post reduction
OnAttackLanded | CASTER, TARGET, ATTACKER | **before** reduction, the real attack value
OnAttacked | CASTER, TARGET, ATTACKER | post reduction
OnAttackLanded | CASTER, TARGET, ATTACKER | **before** reduction, the real attack value
OnAttackFailed | CASTER, TARGET, ATTACKER | **before** reduction, the real attack value

### Killing

Event | Target
--|--
OnDeath | CASTER, UNIT, ATTACKER
OnKill | CASTER, UNIT, ATTACKER
OnKill | CASTER, UNIT, ATTACKER
OnHeroKilled | CASTER, TARGET, ATTACKER

### Caster-Unit
Expand All @@ -132,18 +132,17 @@ Event | Target | Extra
--|--|--
OnAbilityEndChannel | CASTER, UNIT | TARGET if the ability isn't NO_TARGET
OnAbilityExecuted | CASTER, UNIT | TARGET if the ability isn't NO_TARGET
OnOrder | CASTER, UNIT | TARGET if the Order is an ability with target
OnOrder | CASTER, UNIT | TARGET if the Order is an ability with target
OnRespawn | CASTER, UNIT | needs "Attributes" "PERMANENT" on its modifier
OnManaGained | CASTER, UNIT |
OnSpentMana | CASTER, UNIT |
OnStateChanged | CASTER, UNIT |
OnStateChanged | CASTER, UNIT |
OnTeleporting | CASTER, UNIT |
OnTeleported | CASTER, UNIT |
OnUnitMoved | CASTER, UNIT |
OnHealReceived | CASTER, UNIT |
OnHealthGained | CASTER, UNIT |


### Never Triggered

OnAbilityStart - Broken?
Expand All @@ -154,6 +153,6 @@ Please report if you find any inconsistencies.

<br />

On the next post you'll find the random rambling analyzed to get the results.
On the next post you'll find the random rambling analyzed to get the results.

Then we'll move to Multiple Targets, acting over different entities, Flags, etc.
18 changes: 7 additions & 11 deletions _articles/abilities/datadriven/channeling-animations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steamId: '76561198046984233'
date: 18.01.2015
---

### Short Version:
### Short Version:

ApplyModifier with short duration in a OnThinkInterval, channeling modifier has an OverrideAnimation with a ACT_ from the [Action List](https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Actions_List) or with the method explained later.

Expand All @@ -26,7 +26,7 @@ ApplyModifier with short duration in a OnThinkInterval, channeling modifier has
}
}
}

"channelling_animation"
{
"IsHidden" "1"
Expand Down Expand Up @@ -78,14 +78,10 @@ After this, you can select any animation and it will animate the white blocks at
"particle" "particles/units/heroes/hero_pugna/pugna_life_drain.vpcf"
"soundfile" "soundevents/game_sounds_heroes/game_sounds_pugna.vsndevts"
}
"AbilitySpecial"

"AbilityValues"
{
"01"
{
"var_type" "FIELD_INTEGER"
"hp_drain_per_second" "25 40 55"
}
"hp_drain_per_second" "25 40 55"
}

"OnSpellStart"
Expand Down Expand Up @@ -130,7 +126,7 @@ After this, you can select any animation and it will animate the white blocks at
"CASTER" "attach_hitloc"
"TARGET" "attach_hitloc"
}

}
}

Expand All @@ -141,7 +137,7 @@ After this, you can select any animation and it will animate the white blocks at
"Damage"
{
"Type" "DAMAGE_TYPE_MAGICAL"
"Target" "TARGET"
"Target" "TARGET"
"Damage" "%hp_drain_per_second"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ There's a complete (for the most part) [list of Events in the Workshop Tools Wik

In the process I'm also going to make use of different [Actions](https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Abilities_Data_Driven#Actions), inside the Events, some are self explanatory and some require some in-depth explanation on how to use them.

There are 2 types, **Ability Events** and **Modifier Events**.
There are 2 types, **Ability Events** and **Modifier Events**.

Ability Events go on the "first level" of the ability. Modifier Events need to be inside a modifier block.

Basic Skeleton looks like this:
```
```
"ability_custom"
{
// AbilityBehavior and General values
// AbilitySpecial block
// AbilityValues block
// precache block

// Ability Events
Expand All @@ -58,7 +58,7 @@ Basic Skeleton looks like this:

"Modifiers"
{
"modifier_custom"
"modifier_custom"
{
// Modifier Events
"OnCreated"
Expand All @@ -80,7 +80,7 @@ To test if your Event is actually happening when you expect, you can add the fol
}
```

`RunScript` is one of the most common and potent Actions you'll use for creating complex abilities. For it to work, you need to have a Script File, in this case *utilities.lua*, inside the vscripts folder.
`RunScript` is one of the most common and potent Actions you'll use for creating complex abilities. For it to work, you need to have a Script File, in this case *utilities.lua*, inside the vscripts folder.

The Function called can have this:

Expand Down
Loading