Skip to content

Commit 6cdad47

Browse files
fix: replace AbilitySpecial with AbilityValues (#168)
1 parent a50f7bf commit 6cdad47

18 files changed

+258
-436
lines changed

_articles/abilities/ability-keyvalues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TODO: Some categories are missing:
1111
[![Cast Animation](https://i.imgur.com/ewEWcom.png)](##animation "Animation when the spell starts casting")
1212
[![General Stats](https://i.imgur.com/5mO6j4Z.png)](##stats "General numeric values")
1313
[![Others](https://i.imgur.com/z73NEKo.png)](##others "Other less common values")
14-
[![Ability Special](https://i.imgur.com/3ynaE40.png)](##special "AbilitySpecial block, used for variables")
14+
[![Ability Special](https://i.imgur.com/3ynaE40.png)](##special "AbilityValues block, used for variables")
1515
[![precache](https://i.imgur.com/qKW3Xs4.png)](##precache "Precache block, used to preload assets")
1616
[![Ability Events](https://i.imgur.com/6IFhMIu.png)](##abilityevents "Triggers on the ability to perform Actions")
1717
[![Modifiers](https://i.imgur.com/XEFsYCD.png)](##modifiers "Effects that can be applied on units")

_articles/abilities/abilityduration-tooltips.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steamId: '76561198046984233'
55
date: 15.12.2014
66
---
77

8-
**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.
8+
**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.
99

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

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

2020
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:
2121

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

2424
This is bad for the reasons explained before.
2525

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

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

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

3232
```
33-
"AbilitySpecial"
33+
"AbilityValues"
3434
{
35-
"01"
36-
{
37-
"var_type" "FIELD_INTEGER"
38-
"duration" "3 2 2"
39-
}
35+
"duration" "3 2 2"
4036
}
4137
```
4238

@@ -51,4 +47,3 @@ end
5147
```
5248

5349
Has the same results and works for every scenario.
54-

_articles/abilities/datadriven/all-about-the-target.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,19 @@ Event | Target
9191
--|--
9292
OnCreated | CASTER, TARGET
9393
OnDestroy | CASTER, TARGET
94-
OnIntervalThink | CASTER, TARGET
94+
OnIntervalThink | CASTER, TARGET
9595
OnProjectileDodge | CASTER, TARGET
9696

9797
### Damage
9898

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

101-
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.
101+
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.
102102

103103
Event | Target | %attack_damage value
104104
--|--|--
105-
OnTakeDamage | CASTER, UNIT, ATTACKER | post reduction
106-
OnDealDamage | CASTER, UNIT, ATTACKER | post reduction
105+
OnTakeDamage | CASTER, UNIT, ATTACKER | post reduction
106+
OnDealDamage | CASTER, UNIT, ATTACKER | post reduction
107107

108108
### Attacks
109109

@@ -114,16 +114,16 @@ Event | Target | %attack_damage value
114114
OnAttack | CASTER, TARGET, ATTACKER | 0
115115
OnAttackStart | CASTER, TARGET, ATTACKER | 0
116116
OnAttackAllied | CASTER, TARGET, ATTACKER | 0
117-
OnAttacked | CASTER, TARGET, ATTACKER | post reduction
118-
OnAttackLanded | CASTER, TARGET, ATTACKER | **before** reduction, the real attack value
117+
OnAttacked | CASTER, TARGET, ATTACKER | post reduction
118+
OnAttackLanded | CASTER, TARGET, ATTACKER | **before** reduction, the real attack value
119119
OnAttackFailed | CASTER, TARGET, ATTACKER | **before** reduction, the real attack value
120120

121121
### Killing
122122

123123
Event | Target
124124
--|--
125125
OnDeath | CASTER, UNIT, ATTACKER
126-
OnKill | CASTER, UNIT, ATTACKER
126+
OnKill | CASTER, UNIT, ATTACKER
127127
OnHeroKilled | CASTER, TARGET, ATTACKER
128128

129129
### Caster-Unit
@@ -132,18 +132,17 @@ Event | Target | Extra
132132
--|--|--
133133
OnAbilityEndChannel | CASTER, UNIT | TARGET if the ability isn't NO_TARGET
134134
OnAbilityExecuted | CASTER, UNIT | TARGET if the ability isn't NO_TARGET
135-
OnOrder | CASTER, UNIT | TARGET if the Order is an ability with target
135+
OnOrder | CASTER, UNIT | TARGET if the Order is an ability with target
136136
OnRespawn | CASTER, UNIT | needs "Attributes" "PERMANENT" on its modifier
137137
OnManaGained | CASTER, UNIT |
138138
OnSpentMana | CASTER, UNIT |
139-
OnStateChanged | CASTER, UNIT |
139+
OnStateChanged | CASTER, UNIT |
140140
OnTeleporting | CASTER, UNIT |
141141
OnTeleported | CASTER, UNIT |
142142
OnUnitMoved | CASTER, UNIT |
143143
OnHealReceived | CASTER, UNIT |
144144
OnHealthGained | CASTER, UNIT |
145145

146-
147146
### Never Triggered
148147

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

155154
<br />
156155

157-
On the next post you'll find the random rambling analyzed to get the results.
156+
On the next post you'll find the random rambling analyzed to get the results.
158157

159158
Then we'll move to Multiple Targets, acting over different entities, Flags, etc.

_articles/abilities/datadriven/channeling-animations.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steamId: '76561198046984233'
55
date: 18.01.2015
66
---
77

8-
### Short Version:
8+
### Short Version:
99

1010
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.
1111

@@ -26,7 +26,7 @@ ApplyModifier with short duration in a OnThinkInterval, channeling modifier has
2626
}
2727
}
2828
}
29-
29+
3030
"channelling_animation"
3131
{
3232
"IsHidden" "1"
@@ -78,14 +78,10 @@ After this, you can select any animation and it will animate the white blocks at
7878
"particle" "particles/units/heroes/hero_pugna/pugna_life_drain.vpcf"
7979
"soundfile" "soundevents/game_sounds_heroes/game_sounds_pugna.vsndevts"
8080
}
81-
82-
"AbilitySpecial"
81+
82+
"AbilityValues"
8383
{
84-
"01"
85-
{
86-
"var_type" "FIELD_INTEGER"
87-
"hp_drain_per_second" "25 40 55"
88-
}
84+
"hp_drain_per_second" "25 40 55"
8985
}
9086
9187
"OnSpellStart"
@@ -130,7 +126,7 @@ After this, you can select any animation and it will animate the white blocks at
130126
"CASTER" "attach_hitloc"
131127
"TARGET" "attach_hitloc"
132128
}
133-
129+
134130
}
135131
}
136132
@@ -141,7 +137,7 @@ After this, you can select any animation and it will animate the white blocks at
141137
"Damage"
142138
{
143139
"Type" "DAMAGE_TYPE_MAGICAL"
144-
"Target" "TARGET"
140+
"Target" "TARGET"
145141
"Damage" "%hp_drain_per_second"
146142
}
147143

_articles/abilities/datadriven/datadriven-ability-events-modifiers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ There's a complete (for the most part) [list of Events in the Workshop Tools Wik
4040

4141
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.
4242

43-
There are 2 types, **Ability Events** and **Modifier Events**.
43+
There are 2 types, **Ability Events** and **Modifier Events**.
4444

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

4747
Basic Skeleton looks like this:
48-
```
48+
```
4949
"ability_custom"
5050
{
5151
// AbilityBehavior and General values
52-
// AbilitySpecial block
52+
// AbilityValues block
5353
// precache block
5454
5555
// Ability Events
@@ -58,7 +58,7 @@ Basic Skeleton looks like this:
5858
5959
"Modifiers"
6060
{
61-
"modifier_custom"
61+
"modifier_custom"
6262
{
6363
// Modifier Events
6464
"OnCreated"
@@ -80,7 +80,7 @@ To test if your Event is actually happening when you expect, you can add the fol
8080
}
8181
```
8282

83-
`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.
83+
`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.
8484

8585
The Function called can have this:
8686

0 commit comments

Comments
 (0)