- Joined
- Dec 12, 2009
- Messages
- 1,027
Base Abilities for Custom Spells used by AI Casters
For getting the AI to cast custom spells, appropriate base spells must be used. Many users will argue that all custom spells should be based off of Channel-Special. While this is recommended for human users, the AI will never cast spells based on Channel-Special. It's also true that you can trigger the AI casting. This makes sense for Boss Fights in arena or RPG style formats, but it's not as useful for melee-like AI. It makes no sense to have additional code to try and determine when, where, and how randomly the AI should cast it's spells when there's already code 'running in the background' to do this. There is some information throughout the internet on this matter, but it's a pain to find and very spotty at best. So I decided to assemble this list to help make life easier for any searching for this information.
This tutorial/list is intended to provide a list of abilities AI casters can use and when they'll use them. The regular melee game will use all abilities on the standard Blizzard maps (except for transform abilities like Destroyer Form/Bear Form/Crow Form). This tutorial focuses on custom maps with custom units casting custom abilities when desired via using ideal base abilities.
-=|Base spells and when the AI decides to cast them|=-
~Acid Bomb -
~Aerial Shackles - Spammed immediately if allies are nearby. Casts if caster is under attack.
~Anti-magic Shell -
~Banish - Prefers casting on summoned units.
~Bladestorm - Used at random, appears to use immediately if many enemies nearby.
~Black Arrow & Parasite - The AI normally uses it when the target is dying, perhaps to spawn the unit faster giving that the target is almost dead. Parasite is always cast on the furthest target inside the range.
~Berserk - Used in combat, will not cast if outnumbered.
~Big Bad Voodoo -
~Blizzard/Rain of Fire - Will cast if there are at least 2 to 3 units in a group. Monsoon however never seems to cast.
~Bloodlust -
~Cannibalize - Spammed when a unit is injured, usually around 50% HP or less.
~Chain Lightning - Spammed at every cool down, appears to ignore stunned/disabled enemies.
~Charm - Spammed on anything that can be targeted; will not target things that can't attack (Though may target workers making buildings that attack)
~Cloud - Spams any defensive building (ranged and/or melee), usually when attacking towns
~Cold Arrows - PREFERRED over Searing Arrows in the case the hero/unit has both spells.
~Cripple -
~Curse - Spammed on engaged enemy units
~Dark Portal (Archimonde) - Uses whenever is available.
~Death Pact - Never
~Devour - Spammed on anything that can be targeted, may prefer units with higher levels.
~Defend - Activated in the same manner as Divine Shield, but only if the caster is being attacked by a unit with Piercing damage or Magic damage (If ability is set to shield against Magic damage as well).
~Dispel -
~Divine Shield - Casts when attacked, often just before the caster is dealt damage or hit by a non-friendly spell to avoid taking any damage. The health of the unit isn't a factor for it's casting.
~Drunken Haze -
~Finger of Death - Uses whenever is available
~Fan of Knives - Spams randomly if 2 to 3 enemies around, occasionally also uses on single targets if attacked.
~Faerie Fire - Spammed randomly on enemy units
~Farsight - Unused
~Fire Breath/Shockwave/Carrion Swarm/Impale - Will cast if there are at least 2 to 3 units in a cone.
~Flamestrike - May be cast if there are 2+ enemies standing in the AoE
~Forked Lightning - Spammed on enemy heroes and/or clusters of 2+ enemy units.
~Frost Nova - Spammed at every cool down
~Healing Wave/Heal/Rejuvenation - Used when caster or any nearby allies take significant/any/moderate damage.
~Holy Light/Death Coil - Spam on any nearby Undead units or friendly non-Undead units, prefers heroes. /Death Coil is same function as Holy Light but with opposite targets. It's been noticed while doing some Tank/Spank boss fights that if the hero is taken a LOT more damage then the heal, the healer or himself(if he has this spell) he STOPS casting it
~Hex - Spammed on non-heroes, may target a lone hero
~Immolation - Activates only if Immolation deals damage and there are viable targets present; it may favor use after losing hitpoints
~Inner Fire - Spammed randomly? May be a preference for high level units (e.g. Frost Wyrm or Tauren)
~Invisibility - Occasionally casts on retreating friendly heroes with moderate to low health
~Life Drain - Spammed at every cool down.
~Locust Swarm / Voodoo Spirits -
~Mana Burn - Spammed on anything with mana
~Mana Drain -
~Mana Flare -
~Mirror Image - Cast if the caster is attacked a certain number of times. Used immediately if the caster is about to be hit by a spell.
~Parasite - Always casts on the furthest target inside the range.
~Phase Shift -
~Purge -
~Raise Dead - Spammed at every cool down if nearby corpses are available; but only in combat
~Resurrection - Cast if there are friendly dead units nearby.
~Roar/Howl of Terror - Used when engaging enemies
~Searing Arrows - Uses it whenever the CD is off.
~Serpent Ward - Plants near enemies every cool down.
~Silence - Appears to spam on anything that has mana. [May target all units if it reduces the damage dealt of those targeted - needs confirmation.] Preference for units with at least 75 mana as well as player units and non-heroes over heroes.
~Sleep - Cast while in combat, seems to prefer non heroes.
~Slow - Spammed randomly? May be a preference for high level units (e.g. Frost Wyrm or Tauren)
~Soul Burn - Only activates on heroes.
~Shadow Strike - Spammed at every cool down unless victim is already afflicted with Shadow Strike (may prefer target that has less then 100% of his health. Never studied to determine the threshold, but a user has never seen it used on a 100% target)
~Spirit-Link - Casts on friendly units that are engaged
~Stasis Trap -
~Storm Bolt/Fire Bolt/Frost Bolt - Spammed at every cool down, has preference to target heroes.
~Starfall - Uses when there is 2 or more enemy units close.
~Thunderclap/Warstomp - Will cast if there are 2 to 3 units around the caster. May not be used if air units are present (despite being allowed to hit them to).
~Unholy Frenzy -
~Vengeance -
~Water Elemental - Casts when caster or nearby allies are engaging enemies.
~Wind Walk - Used when the AI-controlled units are near death
-=|Important things to note|=-
~When the AI casts customs spells, it may rapidly cast them and cause the SFX to display incorrectly - if at all. Some spells with lightning effects don't display properly, what causes this is still unknown.
~The AI only casts Forked Lightning/Chain Lightning if the damage dealt is greater than 0. When using this as a base spell set the damage dealt to 0.01 to ensure use. If it's set to 0, the AI will NOT cast it. This also applies to Immolation.
~Shockwave may lag due to its terrain deformation, use Carrionswarm or Breath of Fire instead.
If abilities aren't mentioned it's because none of the contributors have submitted the casting trends of the AI. Please submit your experiences working with custom AI base abilities. The more information I have the more useful others may find this tutorial.
Future Plans:
~See if AI has preference for casting certain spells over others. (e.g. I've noticed that the AI will spam Charm before it casts Forked Lightning)
~Determine if setting a damage spell's damage to zero 'prevents' casting (Confirmed with Forked Lightning and Chain Lightning).
Test Map
Attached is the current AI test map. Open it up in-game and watch which spells are used. There are a few MUI problems with the custom spells I'm using, but they don't interfere with the map. You can control red's units to see which spells are where and get an idea of what you can do. I'll be adding additional base spells (and IDing them) as I have time.
~Lightning Strike is based off of Blizzard
~Thunderwrath is based off of CarrionSwarm
~Lightning Speed is based off of Silence
Contributors:
~Boris_Spider
~kino
~mckill2009
~myronbeg
~Shyrony
~gjpaixao13
~Teuncreemers
~watermelon_1234
~Sephalo
~ngkn92
~Dark Axl
Last Updated: 8/16/2014
Related Tutorial:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/ai-editor-162687/ by VeljkoM
Attachments
Last edited: