[Spell] Data mining "hidden" ability codes and using them in custom campaigns

Level 6
Joined
May 10, 2007
Messages
60
Semi-sequel to this thread by Retera.

You may know that abilities, like other "objects" in WC3, are represented by a unique 4 character ID, called the alias, functioning as its "primary key" in the database.

What is perhaps less obvious is that in addition to its alias, each ability has another field, simply named code. Take this excerpt from AbilityData.slk:
1770835586181.png

The highlighted cells indicate series of abilities that share the same code while having different aliases. Note in particular the Plague Aura abilities, which share an ability code that does not match any of their aliases. From this we can conclude that the code is actually completely separate from the alias.

This provides an explanation for some observed phenomena: When the "base ability" field for Rain of Chaos is changed, and some cases when Engineering Upgrade is used to replace abilities, the abilities seemingly transplant the data fields of the new abilities unto the behavior of the old abilities. In the framework presented here, we can say that the "code" is not changed, even though the alias and other fields are.

It also means that the game is referring to yet ANOTHER table when reading these codes to determine the abilities' behavior. Which codes does this hidden table contain?

By making changes to AbilityMetaData.slk, this field can be made modifiable in the World Editor. I have then gone through slks and text from the ROC and Frozen Throne Betas to try and find codes that haven't been removed (as of 1.30)

AIpi: Continous Passive Invisibility, no icon, supports an Art - Target effect, intended for a ring item.
ANgl: Exchange Gold for Lumber. NOT the same as Charge Gold and Lumber, that one is AAns.
Alea: Leash. Passive. Renders a unit unselectable like Locust, but NOT invulnerable or untargetable. Referred to in the FrozenBeta files as a night elf ability with a range of 1000. Maybe it was intended for the Avatar of Vengeance minions? I have not tested what happens if the unit is moved outside of the ability's range.
Amou: Mount. So far it only crashes the game when given to anybody. Files refer to it having "mount" and "dismount" order IDs, and tooltips reading "Morph" and "Unmorph".
AIca: Cure Area. Used by Staff of Purification in FrozenBeta, with range of 500 and AoE of 200. Testing so far reveals that it does not dispel, but CURES DISEASE CLOUD. I wonder if it removes other buffs that can't be dispelled?
Abar: Barkskin. Grants a unit DataA1 extra defense for its duration. Has Auto-cast.
Atpi: Pilot Tank. When a unit has this ability, the Load Pilot ability recognizes it as a valid target. However, the "tank" simply drives up to it and then does nothing, even if it has a Cargo Hold. Pilot Tank, inversely, still does not recognize the "tank" as an "armored transport".

What next?
From what I could gather from the old thread, some of yall have access to deeper in the WC3 codebase than the rest of us, and probably stand a better chance of finding any lost ability codes than most.
There's also the extra detail that the 4 character codes in WC3 are actually representative of 4 byte integers, with each character being a Windows-1252 representation of a byte. IDK if that helps with a search.
I include my test map attached, as well as my AbilityMetaData.slk. I use hero abilities for testing, because hero abilities with invalid ability codes, when learned, will retract skill points but remain at level 0 in the skill menu, making it easy to determine if the code is invalid and it's not just an ability with no ui presence.

Additional notes:
The Cargo Hold (Burrows) effect of removing the ability to attack is tied strictly to the Abun alias, so custom abilities do not inherit the effect. This also means that the code of Abun can be changed, and it will retain the effect of removing attack.

DracoL1ch suggested that the tank system was reworked into Devour Cargo, but the Demo and FrozenBeta files indicate to me that at least just before it was scrapped, it was to function more like Hippogryph Taming (Would've been cool if we could have used it like Starcraft Bunkers though):
"Use this ability on a Rifleman to become a War Wagon that can attack enemy units, but not buildings. Use this ability on a Mortar Team to become a Steam Tank that can siege enemy buildings."
- Load Pilot tooltip
Armored Transport had the alias hstt, War Wagon was hrtt (was recycled for Barrage Siege Engines in Frozen Throne) and Steam Tank had hmtt, which it retained when brought to retail.
 

Attachments

Last edited:
Better Documentation & Testing of Leash:
Unit does not show up on minimap, and is not selectable by any player, but is targetable (similar to destructibles).
Unit is "leashed" to location it had when it received ability. Leash has range equal to ability AoE. Approx. every quarter second (on 100% game speed), game checks if unit is outside of leash range. If this is true, the unit is ordered to move to the leash center (with orderid "attack").

Better Documentation & Testing of Staff of Purification/Cure Area:
Similar effect to Area Dispel abilities like Dispel Magic and Staff of Negation, but does not deal damage to summoned units or drain mana, and does not generally dispel buffs that normal dispel abilities work on. Removes certain ability buffs from units in the targeted area. So far, I have determined that it removes Disease, Poison Arrows, Poison Sting (not orb version), Parasite and Envenomed Weapons, but does not remove Shadow Strike, Orb of Venom, Slow Poison, Doom, Incinerate, Soul Burn, Acid Bomb, Black Arrow, Web, Ensnare or Aerial Shackles.

EDIT: Our best documentation of damage in Warcraft 3 shows that Slow Poison has a separate damage type from Poison and Disease:
Enhanced Physical (Enhanced, Poison, Disease, Acid, Demolition, Slow Poison): Physical damage type which ignores Defense Value.
DAMAGE_TYPE_ENHANCED,
DAMAGE_TYPE_POISON,
DAMAGE_TYPE_DISEASE,
DAMAGE_TYPE_ACID,
DAMAGE_TYPE_DEMOLITION,
DAMAGE_TYPE_SLOWPOISON
- Universal (Unknown, Universal): Universal damage type which ignores Defense Value.
DAMAGE_TYPE_UNKNOWN,
DAMAGE_TYPE_UNIVERSAL
It has been shown that at least for some abilities, changing the hero level requirement to 6 or more changes its damage type to Universal, but it does not seem that doing this for Disease Cloud makes it "uncurable". Nonetheless, there may be a general correspondence between which abilities are curable and which damage types they have been given.

EDIT: Okay, after decompiling Game.dll with Ghidra and going through it, it seems I had already found most of the unused ability codes. There are two promising ones that have shown up: ANth (possibly just a copy of Spiked Carapace) and AIfc, which was the code of the Flying Carpet from the FrozenBeta, which certainly sounds promising. Other than that there seems to be a bunch of hardcoded summons.

Edit: Flying Carpet has clickable button, but nothing seems to happen when it is pressed. ANth is indeed just a copy of Spiked Carapace.

But Ghidra might also help check if there are additional Research effects...

Edit: There aren't
 
Last edited:
The ability code check is a big chunk of if-statements comparing the numerical value of a code, and as a result they are mostly checked in alphabetical order. I have made this table of them as I could find them in the decomp of 1.30. Only the 17 I put in the top are completely unused. There are obviously more in Reforged, but unlikely to be any new unused ones.


Order in decomp
code
description
49
AIca
Cure Area
63
AIfc
Flying Carpet
64
AIfd
FigurineRedDrake
66
AIff
FigurineFurbolg
67
AIfg
FigurineGrunt
73
AIfr
FigurineRockGolem
75
AIfu
FigurineDoomGuard
90
AImn
permanent mana bonus
97
AIpi
continuous invisibility (ring)
121
AIte
Teleport
151
ANgl
ExchangeGoldLumber
181
ANth
Thorny Shield
237
Abar
Barkskin
273
Adta
Reveal
314
Alea
Leash
332
Amou
Mount
356
Arem
Regen Mana?
1
AAns
Neutral Spell
2
ACad
Animate Dead (creep)
3
ACbf
Breath of Frost
4
ACdv
Devour (Dragon Creep)
5
ACrn
Reincarnation (creep)
6
ACtb
Thunder Bolt (Creep)
7
ACtc
Thunder Clap (Creep)
8
AEah
Aura – Thorns
9
AEar
Aura – Trueshot
10
AEbl
Blink
11
AEer
Entangling Roots
12
AEev
Evasion
13
AEfk
Fan of Knives
14
AEfn
Force of Nature
15
AEim
Immolation
16
AEmb
Mana Burn
17
AEme
Metamorphosis
18
AEpa
Poison Arrows
19
AEsf
Starfall
20
AEsh
Shadow Strike
21
AEst
Scout
22
AEsv
Spirit of Vengeance
23
AEtq
Tranquility
24
AHab
Brilliance Aura
25
AHad
Aura – Devotion
26
AHav
Avatar
27
AHbh
Bash
28
AHbn
Banish
29
AHbz
Blizzard
30
AHca
Cold Arrows
31
AHdr
Siphon Mana
32
AHds
Divine Shield
33
AHfa
Searing Arrows
34
AHfs
Flame Strike
35
AHhb
Holy Light
36
AHmt
Mass Teleport
37
AHpx
Summon Phoenix
38
AHre
Resurrection
39
AHtb
Thunder Bolt
40
AHtc
Thunder Clap
41
AHwe
Water Elemental
42
AIaa
AttackMod
43
AIab
StatBonus
44
AIam
AgilityMod
45
AIan
Animate Dead (item)
46
AIas
Attack Speed Increase
47
AIat
AttackBonus
48
AIbl
Build Tiny
50
AIcb
Orb of Corruption
51
AIcf
CloakOfFlames
52
AIco
Command
53
AIct
ChangeTOD
54
AIda
DefenseAoe
55
AIdc
Chain Dispel
56
AIdd
Defend (Passive)
57
AIde
DefenseBonus
58
AIdi
DispelAoe
59
AIdm
DamageAoe
60
AIem
ExperienceMod
61
AIfa
FlareGun
62
AIfb
Orb of Fire
65
AIfe
Flag (Undead)
68
AIfh
FigurineFelHound
69
AIfl
Flag
70
AIfm
Flag (Human)
71
AIfn
Flag (Night Elf)
72
AIfo
Flag (Orc)
74
AIfs
FigurineSkeleton
76
AIgl
Glyph
77
AIgo
GiveGold
78
AIha
HealAoe
79
AIhe
Heal (Potion)
80
AIil
Illusion
81
AIim
IntelligenceMod
82
AIlb
Orb of Lightning(old)
83
AIlm
LevelMod
84
AIlp
LightningPurge
85
AIlu
GiveLumber
86
AIma
ManaRestore
87
AImi
Permanent Hit point Bonus
88
AIml
MaxLifeBonus
89
AImm
MaxManaBonus
91
AImo
MonsterLure
92
AImr
ManaRestoreAoe
93
AIms
MoveSpeedBonus
94
AInv
Inventory
95
AIob
Orb of Frost
96
AIpb
Orb of Venom
98
AIpm
PlaceMine
99
AIpv
VampirismPotion
100
AIra
RestoreAoe
101
AIrb
Rune of Rebirth
102
AIrc
Reincarnation (Ankh)
103
AIrd
Raise Dead (Item)
104
AIre
Restore
105
AIrg
Regen
106
AIri
Random
107
AIrm
RegenMana
108
AIrs
Resurrection (Item)
109
AIrt
Recall
110
AIrv
RevealMap
111
AIsa
SpeedAoe
112
AIsb
Orb of Spells
113
AIsh
Summon Headhunter
114
AIsi
SightBonus
115
AIsm
StrengthMod
116
AIso
SoulTrap
117
AIsp
Speed
118
AIsr
Runed Bracers
119
AIta
DetectAoe
120
AItb
Dust of Appearance
122
AItp
TownPortal
123
AIva
Vampiric attack
124
AIvi
Invis (Potion)
125
AIvu
Invul (Potion)
126
AIwb
Web (Item)
127
AIxm
Permanent All
128
AIzb
Orb of Freezing
129
ANab
Acid Bomb
130
ANba
Black Arrow
131
ANbf
Breath of Fire
132
ANbr
Battle Roar
133
ANbs
Orb of Darkness (Black Arrow)
134
ANca
Cleaving Attack
135
ANch
Charm
136
ANcl
Channel
137
ANcr
Chemical Rage
138
ANcs
Cluster Rockets
139
ANdb
Drunken Brawler
140
ANdc
Dark Conversion
141
ANde
Demolish
142
ANdh
Drunken Haze
143
ANdo
Doom
144
ANdp
Dark Portal
145
ANef
Storm, Earth and Fire
146
ANeg
Engineering Upgrade
147
ANfb
Fire Bolt
148
ANfd
Finger of Death
149
ANfl
Forked Lightning
150
ANfy
Factory
152
ANhs
Healing Spray
153
ANht
Howl of Terror
154
Ania
Incinerate (Arrow)
155
ANic
Incinerate
156
ANin
Inferno (Warlock)
157
ANlm
Summon Lava Spawn
158
ANmo
Monsoon
159
ANmr
Mind Rot
160
ANms
Mana Shield
161
ANpa
Parasite
162
ANpi
Permanent Immolation
163
ANpr
Preservation
164
ANrc
Rain of Chaos
165
ANre
Neutral Regen
166
ANrf
Rain of Fire
167
ANrg
Robo-Goblin
168
ANsa
Sanctuary
169
ANse
Spell Shield AOE
170
ANsg
Summon Bear
171
ANsi
Silence
172
ANsl
Soul Preservation
173
ANso
Soul Burn
174
ANsp
Neutral Spies
175
ANsq
Summon Quilbeast
176
ANss
Spell Shield
177
ANst
Stampede
178
ANsu
Submerge
179
ANsw
Summon Hawk
180
ANsy
Summon Factory
182
ANtm
Transmute
183
ANto
Tornado
184
ANvc
Volcano
185
ANwm
Watery Minion
186
AOac
Aura – Command
187
AOae
Endurance Aura
188
AOcl
Chain Lightning
189
AOcr
Critical Strike
190
AOeq
Earthquake
191
AOfs
Far Sight
192
AOhw
Healing Wave
193
AOhx
Hex
194
AOmi
Mirror Image
195
AOre
Reincarnation
196
AOsf
Feral Spirit
197
AOsh
Shock Wave
198
AOvd
Voodooo
199
AOwd
Serpent Ward
200
AOwk
Wind Walk
201
AOws
War Stomp
202
AOww
Bladestorm
203
ARal
Rally
204
AUan
Animate Dead
205
AUau
Unholy Aura
206
AUav
Vampiric Aura
207
AUcb
Carrion Scarabs
208
AUcs
Carrion Swarm
209
AUdc
Death Coil
210
AUdd
Death and Decay
211
AUdp
Death Pact
212
AUdr
Dark Ritual
213
AUds
Dark Summoning
214
AUfa
Frost Armor
215
AUfn
Frost Nova
216
AUfu
Frost Armor (Autocast)
217
AUim
Impale
218
AUin
Inferno
219
AUls
Locust Swarm
220
AUsl
Sleep
221
AUts
Spiked Carapace
222
Aabr
Aura - Regeneration (Statue)
223
Aabs
Absorb Mana
224
Aadm
Abolish Magic
225
Aaha
Acolyte Harvest
226
Aakb
Aura - War Drums
227
Aall
Allied Building
228
Aami
Anti-magic Shield (item)
229
Aamk
Attribute Modifier Skill
230
Aams
Anti-magic Shield
231
Aapl
Aura – Plague
232
Aarm
Neutral Regen (mana only)
233
Aasl
Aura - Slow
234
Aast
Ancestral Spirit
235
Aave
Avenger Form
236
Aawa
Awaken
238
Abdt
Burrow Detection (Flyers)
239
Abgm
Blighted Gold mine
240
Abli
Blight
241
Ablo
Bloodlust
242
Ablp
BlightPlacement
243
Abof
Balls of Fire
244
Abrf
Bearform
245
Absk
Beserk
246
Abtl
Battlestations
247
Abun
Cargo Hold (Burrow)
248
Abur
Burrow
249
Acan
Cannibalize
250
Acar
Cargo Hold
251
Acha
Chaos Upgrade
252
Achd
Cargo Hold Death
253
Achl
Chaos Cargo Load
254
Aclf
Cloud of Fog
255
Acmg
Control Magic
256
Acoa
Couple (Archer)
257
Acoh
Couple (Hippogryph)
258
Acoi
Couple Instant
259
Acor
Corrosive Breath
260
Acpf
Corporeal Form
261
Acri
Cripple
262
Acrs
Curse
263
Acyc
Cyclone
264
Adch
Disenchant(old)
265
Adda
Death Damage
266
Adec
Decouple
267
Adef
Defend
268
Adet
Detect
269
Adev
Devour
270
Adis
Dispel Magic
271
Adri
Drop Instant
272
Adro
Drop
274
Adtn
Detonate
275
Adts
Detect (Magic Sentinel)
276
Advc
Cargo Hold (Devour)
277
Advm
Devour Magic
278
Aeat
Eat Tree
279
Aegm
Entangled Gold Mine
280
Aenc
Cargo Hold (Gold Mine)
281
Aens
Ensnare
282
Aent
Entangle
283
Aesn
Sentinel
284
Aetf
Ethereal Form
285
Aeth
Ghost (Visible)
286
Aetl
Ethereal
287
Aexh
Exhume
288
Aeye
Sentry Ward
289
Afae
Faerie Fire
290
Afak
Orb of Annihilation
291
Afbk
Feedback
292
Afla
Flare
293
Aflk
Flak Cannon
294
Afra
Frost Attack
295
Afrb
Frost Breath
296
Afrz
Freezing Breath
297
Afsh
Frag Shards
298
Afzy
Frenzy
299
Agho
Ghost
300
Agld
Gold Mine
301
Agra
Grab Tree
302
Agyb
Gyrocopter Bombs
303
Agyd
Graveyard
304
Agyv
Detect (Gyrocopter)
305
Ahar
Harvest
306
Ahea
Heal
307
Ahid
Shadow Meld (Akama)
308
Ahrl
Harvest Lumber
309
Ahwd
Healing Ward
310
Aimp
Impaling Bolt
311
Ainf
Inner Fire
312
Aivs
Invisibility
313
Alam
Sacrifice (Acolyte)
315
Aliq
Liquid Fire
316
Alit
Lightning Attack
317
Aloa
Load
318
Aloc
Locust
319
Alsh
Lightning Shield
320
Ambt
Mana Battery
321
Amdf
Magic Defense
322
Amec
MechanicalCritter
323
Amed
Meat Drop
324
Amel
Meat Load
325
Amfl
Mana Flare
326
Amgl
Moon Glaive
327
Amic
Militia Conversion
328
Amil
Militia
329
Amim
Magic Immunity
330
Amin
Mine
331
Amls
Aerial Shackles
333
Amtc
Cargo Hold (Meat Wagon)
334
Andt
Neutral Detection (Reveal ability)
335
Aneu
Neutral Building
336
Anhe
Heal (Creep)
337
Aoar
Aura – Regeneration
338
Aphx
Phoenix
339
Apig
Permanent Immolation (graphic)
340
Apit
Purchase Item
341
Apiv
Permanent Invisibility
342
Aply
Polymorph
343
Apo2
Orb of Venom (Poison Attack)
344
Apoi
Poison Attack
345
Apos
Possession
346
Aprg
Purge
347
Aps2
Possession (Channeling)
348
Apsh
Phase Shift
349
Apts
Plague Toss
350
Apxf
PhoenixFire
351
Arai
Raise Dead
352
Arav
Raven Form
353
Arbr
Reinforced Burrows
354
Arej
Rejuvination
355
Arel
Regen Life
357
Aren
Renew
358
Arep
Repair
359
Aret
Retrain
360
Arev
Revive
361
Arng
Revenge
362
Aroa
Roar
363
Aroc
Rocket Attack
364
Aroo
Root
365
Arpb
Replenish (Life & Mana)
366
Arpl
Replenish (Life)
367
Arpm
Replenish (Mana)
368
Arsk
Resistant Skin
369
Arst
Restoration
370
Artn
Return Resource
371
Asac
Sacrifice (Sacrificial Pit)
372
Asal
Pillage
373
Asds
Self Destruct
374
Ashm
Shadow Meld
375
Ashs
ShadowSight
376
Asid
Sell Item
377
Asla
Sleep Always
378
Aslo
Slow
379
Asod
Spawn Skeleton
380
Aspa
Spider Attack
381
Aspb
Spell Book
382
Aspd
Spawn Spider
383
Asph
Sphere
384
Aspi
Spiked Barricades
385
Aspl
Spirit Link
386
Aspo
Slow Poison
387
Asps
Spell Steal
388
Assk
Hardened Skin
389
Assp
Spawn Spiderling
390
Asta
Stasis Trap
391
Astd
Stand Down
392
Aste
ManaSteal
393
Asth
Storm Hammers
394
Astn
Stone Form
395
Asud
Sell Unit
396
Atau
Taunt
397
Atdg
TornadoDamage
398
Atdp
Drop Pilot
399
Atlp
Load Pilot
400
Atol
Tree of life (for attaching art)
401
Atpi
Pilot Tank
402
Atru
True Sight
403
Atsp
TornadoSpin
404
Attu
Tank Turret
405
Atwa
TornadoWander
406
Auco
Unstable Concoction
407
Auhf
Unholy Frenzy
408
Ault
Ultravision
409
Auns
Unsummon
410
Aven
Venom Spears
411
Avng
Vengeance
412
Avul
Invulnerable
413
Awan
Wander
414
Awar
Pulverize
415
Aweb
Web
416
Awha
Wisp Harvest
417
Awrp
Warp
 
Is there anyway for a standard world editor user to recover these abilities? The dispel for Disease Cloud sounds really useful for mission designs for Undead themed campaigns
Depends on how discerning you are. Unfortunately it does not seem to be possible without at least a tiny bit of editing or adding files to your Warcraft install. Retera can probably answer this more confidently, if you dare to ask :ogre_hurrhurr:

Longer answer:
"AbilityMetaData.slk" determines both what you can do with an ability in the world editor, as well as how the game reads custom ability data. That means that for any custom data fields you have added to work, anybody else who plays the map has to have a matching AbilityMetaData.slk.

I did a quick test where I tried to import the correct AbilityMetaData.slk into the map itself, but the ability code does not seem to be read correctly and the ability does not show up. Don't know if it works for later versions of Warcraft 3, or if smarter people have found ways to get this to work, or if I made a mistake I haven't realized.

What I know works for sure is to have a custom AbilityMetaData.slk as a local override. Then in order for people to play your map or campaign, they will have to have the same AbilityMetaData.slk in their Warcraft install.

I can explain the process of extracting and editing AbilityMetaData.slk in detail if you want.
Or if you want to get right into playing with cure aoe, you can follow the tutorial for enabling local files, then download the AbilityMetaData.slk from the first post, put it in a folder named Units in your Warcraft III install folder, and try out the map I attach to this post.
 

Attachments

Last edited:
I see, interesting, so it wouldn't work for single player campaigns either without a local file override?

That's disappointing. But thanks for the in depth response it's a shame these abilities couldn't be added by blizz to give us more options.
 
I see, interesting, so it wouldn't work for single player campaigns either without a local file override?

That's disappointing. But thanks for the in depth response it's a shame these abilities couldn't be added by blizz to give us more options.
Correct (See my post below). Local file override is not a big deal in my opinion though, the original files are still there if you ever want to reverse it. It can just be a bit confusing for some end users to set it up properly, and it requires coordination with other creators to avoid mods using it conflicting with one another.

Another thing that is possible with Local Files is to add additional unit responses to the game without having to override or import existing sounds. Given how quickly sound file sizes blow up, this can save a lot of file space if you're creative. The Unit Sound Sets are read from the file UI/SoundInfo/UnitAckSounds.slk.
 
Last edited:
I see, interesting, so it wouldn't work for single player campaigns either without a local file override?

That's disappointing. But thanks for the in depth response it's a shame these abilities couldn't be added by blizz to give us more options.
Good news Footman16!!!! I was biking home drunk from my parents when I remembered that custom campaigns have their own imports, independent of the map. And since these can contain the mission select background, it must follow that they are loaded before entering the map. Which opens the possibility that the "metadata" slk files are reloaded before entering the map.

To make a long story short, I put AbilityMetaData.slk as an import in a campaign with my test map, and it seems to work just like we wanted it to. But I have only tested it on my own pre-Reforged version. I am attaching the campaign to this post so that people can test if it works on the recent reimplementation of custom campaigns.

EDIT: Further testing reveals that this does not apply to UI/SoundInfo/UnitAckSounds.slk or UI/war3skins.txt, which just makes it feel even more lucky that it works for this most significant case...

Also, this still means that the campaign creator has to use the Local Files method when editing and testing their maps, and it's prob still a mess to use in multiplayer, but it makes campaigns using these abilities easily distributable at least.

EDIT: Does work for upgradedata.slk
 

Attachments

Last edited:
Back
Top