by Nefarius
Details:
Version 0.1: Idle, Skeleton, Zombie, BigHead, BloodHawk, Fallen, Brute, SandRaider, Wraith, CorruptRogue, Baboon, Goatman, FallenShaman and QuillRat AI scripts.
Version 0.2: SandMaggot, ClawViper, SandLeaper, Pantherwoman, Swarm, Scarab, Mummy and GreaterMummy AI scripts.
Version 0.3: Vulture, Mosquito, WillOWisp and Arach AI scripts.
Version 0.4: ThornHulk and Vampire AI scripts.
Version 0.5: BatDemon, Fetish, NpcOutOfTown, Npc, HellMeteor, Andariel, CorruptArcher, CorruptLancer, SkeletonBow, MaggotLarva, PinHead and MaggotEgg AI scripts.
Version 0.6: Towner, Vendor, FoulCrowNest, Duriel, Sarcophagus, ElementalBeast, FlyingScimitar, ZakarumZealot, ZakarumPriest, Mephisto, Diablo, FrogDemon, Summoner, NpcStationary, Izual, Tentacle, TentacleHead, Navi, Bloodraven, GoodNpcRanged, Hireable and TownRogue AI scripts.
Version 0.7: GargoyleTrap, SkeletonMage, FetishShaman, SandMaggotQueen, NecroPet, VileMother, VileDog, FingerMage, Regurgitator, DoomKnight, AbyssKnight, OblivionKnight, QuillMother, EvilHole, Trap-Missile (untested), Trap-RightArrow (untested), Trap-LeftArrow (untested), Trap-Poison (untested), Trap-Nova (untested), JarJar, InvisoSpawner, MosquitoNest, BoneWall, HighPriest, Hydra, Trap-Mele, 7TIllusion, MegaDemon, Griswold, DarkWanderer, ArcaneTower, DesertTurret, PantherJavelin, FetishBlowgun, Spirit, Smith, TrappedSoul and Buffy.
---
Base ID Guide - I thought that this might also help some people, trying to figure out what in monstats is used, or what stuff like seventombs and invisospawner are for.
NOTE: Sorry about the horrible typos in there.
------
LoD AIs
Note, I will finish all of the LoD AIs before adding them to the actual guide.
Code: Select all
AssassinSentry
BladeCreeper
InvisoPet
DeathSentry
ShadowWarrior
ShadowMaster
Raven
DruidWolf
Totem
Vines
CycleOfLife
DruidBear
SiegeTower
Don't know for sure, but the delay might control how many frames must ellapse between different imps using the tower as a turret. I.E. after imp A leaves the tower, par1 frames must pass before imp B can use the tower, this is just a guess though.
Delay (frames)
n/a
n/a
n/a
n/a
n/a
n/a
n/a
ReanimatedHorde
By default this AI does absolutely nothing (if all pars are zero it remains idle). Par5 and Par6 are essentially the same thing, I didn't notice a difference (maybe one is for running [5] and the other is for walking [6]?), par8 is rather unreliable, setting it to high values actually prevents self-resurrection. The charge behaviour is bugged, they are unable to properly charge up to the player at times, to avoid this set the par3-radius to a very small value.
Chance to attack (when within melee range)
Delay (frames) (par1 fails)
Radius (subtiles)
Chance to use SK2 (when within par3-range)
Chance to approach (when outside melee range)
Chance to approach (when outside melee range)
Delay (frames) (par5 and par6 fail)
Chance to use SK1 (after death)
Siegebeast
By defaul the siegebeast will approach the player. I assume the radius defined by par1 controls the radius in which the siegebeast commands imps to ride on it. Their speed is modified by the percentage specified by par7 when they use SK2.
Radius (subtiles)
Chance to attack (when within melee range)
Chance to use SK1 (when within melee range)
Delay (frames) (par2 and par3 fail)
Chance to use SK1 (when outside melee range)
Chance to use SK2 (when outside melee range)
Speed bonus
n/a
Minion
By default this AI is idle.
Chance to attack (when within melee range)
Delay (frames) (par1 fails)
Chance to approach (when outside melee range)
Delay (frames) (par3 fails)
Chance to use A2 rather then A1 (par1 succeeds)
n/a
n/a
n/a
SuicideMinion
When the player comes into melee range they will self-destruct after par2-frames (par1 is the same thing, but isn't used). Setting it to 0 makes them blow up immediately.
n/a
Delay (frames)
Chance to approach (when outside melee range)
Damage Radius
n/a
n/a
n/a
n/a
Succubus
Whenever they will use SK1/SK3 or SK2/SK4 depends on the amount of mana the targeted unit has, if it has more then, or exactly as much, mana as hp they will use SK2/SK4 (Blood Mana). [altering this behaviour should be simple via CE]. While they indeed properly use SK1 and SK2, this will make them ignore SK3 and SK4. I don't know if par7 reallt works like Duriel's aura level parameter, test for yourselves if you want absolute certainty. Finally, undocumented but functional, par8 controls the chance of them casting SK5 (Blood Star - wannabe skill).
Chance to attack (when within melee range)
Chance to approach (when outside melee range)
Chance to use SK1/SK3 or SK2/SK4 (when within par4-range)
Radius (subtiles)
Delay (frames) [par1 fails]
Delay (frames) [par2 fails]
n/a
Chance to use SK5
SuccubusWitch
When all parameters are 0, they will randomly walk and wander around. To me it doesn't seam as if par5 has any effect. When par3 succeeds, they will cast SK1. SK2, SK3 and SK4 are unused. Likewise par5 and par7 seams to serve no purpose. Finally, par8 does not control the chance to cast Weaken, it controls the chance to use Blood Star (SK5). - This AI is a perfect example why I initially said Blizzards documentation is horrible.
Chance to attack (when within melee range)
Chance to approach (when outside par4-range)
Chance to escape (when within par4-range)
Radius (subtiles)
n/a
Delay (frames) [par2 fails]
n/a
Chance to use SK5
Overseer
WARNING: Leaving all parameters blank will first cause the AI to hang once it comes into melee range, and afterwards lead to an assertion error (it is a hPath error, so I guess it attempts to walk into the tile occupied by the char...). Avoid at all cost. This error occurs when par4 is left blank. They will approach if outside of par4 range, and escape when within par4 range.
After being attacked, they will imediately start casting SK1 in the interval specified by par1. Cry Help works like attract, and is cast on the player attacking them, thus making it the primary target for all nearby monsters.
SK2 is used on injured units (when their HP plunges lower then 50%) and they have suffered that injury within par4-range. This is a indirect heal spell, it works like Holy Bolt, which leads to a problem, if the missile hits _another_ monster they will keep casting it over and over and over again not doing anything else (if par2 has a high chance). Par3 controls the chance to use SK3 on a nearby allied monster, this is what triggers Bloodlust (etc). I have no idea what exactly par5 is doing, but it seams to effect the range of par4 in some way. SK4 doesn't seam to be used at all. According to Blizzards original AI documentation (not the 1.10 one), par5 controls the chance to walk, but this is probably no longer valid.
Interval (frames)
Chance to use SK2.
Chance to use SK3.
Radius (subtiles)
Radius (subtiles)
Chance to attack (when within melee range)
Chance to use A2 rather then A1 (par6 succeeds)
n/a
MinionSpawner
This AI and the unit itself got fixed in 1.10. This is a more advanced version of the normal spawner AI, the usage counter as usual counts how often SK1 can be used. The two delays (par2 and par3) seam to control the interval between individual spawns being created. But par2 might not be used at all, since it will always use the skill (so it won't even fail). Par4 controls the activation radius, in which the unit will start using SK1. Par5 is unused (if it is supposed to do what I believe, but I might be wrong), use SparsePopulate instead.
Usage Counter
Delay (subtiles)
Delay (subtiles)
Radius (subtiles)
n/a
n/a
n/a
n/a
Imp
Yes blizzard, "refer to source" is a wonderful description of what this AI does.
This AI requires 16 parameters (divided into groups of 4), so it is multiline, par4-1 and par4-2 seam to be unused.
Par1-1 seams to controls the HP threshold that is used by the escape routine (when hp plunges below this value they will avoid melee range either by using SK1 or by running off, note that when HP is above this threshold they will approach), par1-2 controls the radius in which the imp will use SK1 (Teleport). The imps will use SK1 depending on the outcome of par1-3, if it succeeds, they pick a random subtile within par2-range and teleport to it. Par1-4 controls the chance to walk in a random direction (during and after approaching). Note that setting par1-2 to a value above about 2-screens radius they will teleport to the same spot they are standing on.
Par2-1 controls the distance, in subtiles, the imp can teleport into a siege tower/beast from. Par2-2 controls the radius in which the imp can cast spells (SK3 or SK5) at the player when on a siege tower/beast, par2-3 controls the chance of doing so. The radius defined by par2-4 is referred to as Error-Range, leave it untouched, this is probably releated to tower-detection.
Par3-1 controls the radius that triggers the escape behaviour (when the player comes into this radius it'll try to escape), the chance to escaping is controlled by par3-2.
1
HP threshold
Radius (subtiles)
Chance to use SK1
Chance to wander around
2
Radius (subtiles)
Radius (subtiles)
Chance to use a SK3 or SK5 (when within par2-2 range)
Radius (subtiles)
3
Radius (subtiles)
Chance to escape (when within par3-1 range)
Radius (subtiles)
Chance to use SK4 (when within par3-3 range)
4
n/a
n/a
Radius (subtiles)
Chance to use SK4 (when within par4-3 range)
Catapult
How this works: The catapult shoots the missile created by the catapult spotter, the catapult spotter is what actually controls the skills, this only controls how often they are fired.
Chance to shoot MSA1
n/a
n/a
n/a
n/a
n/a
n/a
n/a
FrozenHorror
A fully configureable AI, it does nothing if all pars are blank.
Chance to attack (when within melee range)
Chance to approach (when outside melee range)
Chance to use SK1 (when within melee range)
Delay (frames) [par1 fails, par2 fails]
n/a
n/a
n/a
n/a
BloodLord
Another fully configureable AI, it does nothing if all pars are blank. Note, the Frenzy behaviour of this monster doesn't seam to follow the rules of the Thornhulk.
Chance to attack (when within melee range)
Chance to approach (when outside melee range)
Chance to use SK1 rather then A1 (par1 succeeds)
Delay (frames) (par1 fails, par2 fails)
n/a
n/a
n/a
n/a
CatapultSpotter
This is the invisible stationary unit that actually does all the work when it comes to the catapult, the visual catapult is only there for the 'killing' and launch display. If all pars are blank it does nothing, so it is fully configureable.
So how exactly does this work, first the game will wait until the countdown specified by par2 hits 0, then it will roll par1, if par1 succeeds it will check if the player is within par3-radius, if he is, the AI will use a spell (see spell selection below), this spell will be targeted at the players x/y coordinates PLUS a random radius (0-par4), want the catapults to stop being so downright inaccurate? Set par4 to a very small value, and they will target the player, and not the rest of the screen.
The spell used is selected based on the par5-counter, after a spell has been used par5-times, they will use another spell, which is apparently randomly selected.
This AI is wonderful for ambient effects, with a high par4 radius, you can make it effect the whole screen ^^
Chance to use a spell (alternating between SK1, SK2, SK3, SK4 and SK5) [when within par3-range]
Delay (frames) (between rolls of par1)
Radius (subtiles)
Radius (subtiles)
Usage counter
n/a
n/a
n/a
NpcBarb
This AI is badly hardcoded, first of all, it casts a hardcoded attract on itself, to make monsters target it instead of the player (discovered by Vendanna), second of all, it will always walk in one direction. You can't use this AI for an enemy, as it will attempt to attack other monsters (despite being set to align = 0).
Interval (frames) [between attacks]
Chance to approach (when within par3-range)
Radius (subtiles)
n/a
n/a
n/a
n/a
n/a
Mihlathak
By default (automatic unchangeable behaviour) this AI will SK4 on the player, if he comes within skill-range.
When par1 succeeds this AI will use SK1 to teleport to a random subtile within par2-radius (similar to the imp AI). When the player comes within par5-radius he will escape. About 30 seconds after this AI is triggered, par6 is unlocked, this controls the chance to use SK5 (Minion Spawner), by default he won't summon anything, make sure to fill the spawn columns properly before enabling this undocumented and unused feature.
Chance to use SK1 (when within melee range)
Radius (subtiles)
Chance to use SK3 (on dead monsters)
Chance to use SK2 (on living monsters)
Radius (subtiles)
Chance to use SK5 (par unlocked after about 30 seconds ellapsed)
n/a
n/a
GenericSpawner
Works like any other spawner AI would, I doubt the radius parameter that should be controlled by par2 does anything, this was never coded I guess, use the Mosquito Nest AI instead, the only spawner AI that still uses the radius param properly (Minion Spawner AI is nice too).
Delay (frames) [between uses of SK1]
n/a
Usage counter
n/a
n/a
n/a
n/a
n/a
DeathMauler
Totally parameter controlled AI.
Chance to attack (when within melee range)
Chance to approach (when outside melee range)
Radius (subtiles)
Chance to use SK1 (when within par3-range)
n/a
n/a
n/a
n/a
Wussie
This is the AI used by the trapped barbs, this AI remains idle and plays the "help us" sound file over and over again, until the nearby door is shattered, then a portal is created to which these units will walk. They can actually die (making it harder to beat the quest), but in the normal game their HP is too high for that to happen.
n/a
n/a
n/a
n/a
n/a
n/a
n/a
n/a
AncientStatue
This AI remains idle until triggered by the hardcoded quest event, then it uses SK1 and self destructs to summon the assigned Ancient boss.
n/a
n/a
n/a
n/a
n/a
n/a
n/a
n/a
Ancient
These AIs are hardcoded, unless triggered by the quest event they will remain idle, furthermore, the same AI works differently depending on the unit ID.
Whirlwind Barbarian
Radius (subtiles)
Chance to use SK1 (when within par1-range)
Chance to attack (when within melee range)
Radius (subtiles) [the end point for WW, how many subtiles behind the player will it stop WW'ding]
n/a
n/a
n/a
n/a
Throwing Barbarian
Radius (subtiles)
Chance to shoot MSA1 (when within par1-range)
Chance to use SK1
Chance to escape (when within melee range)
Radius (subtiles) [distance to escape to]
n/a
n/a
n/a
Leap Barbarian
Radius (subtiles)
Chance to use SK1 (when within par1-range)
Chance to attack (when within melee range)
n/a
n/a
n/a
n/a
n/a
BaalThrone
After a boss wave has been slain, this A1 will use SK2 on the corpses. When exactly it uses SK3 and SK4 I can't say for sure. For reference, this is the baal that curses you in the Throne Room and summons the boss waves.
Chance to use SK1.
n/a
n/a
n/a
n/a
n/a
n/a
n/a
BaalCrab
This AI is totally hardcoded. When you come into spell range, he will either use SK1, SK2 or SK4. When further away, he might consider SK5 and SK6 (depending on the amount of mana you have), he also uses SK3 when you are far away (summons the tentacles), when he is under attack, he will either use SK5 to teleport away or summon the baal clone, which is not a skill but a hardcoded event. The problem with this AI is once again the map, not the AI itself, the Worldstone Chamber makes it too easy to cause the AI to get stuck in a position where it wont be able to hit you.
n/a
n/a
n/a
n/a
n/a
n/a
n/a
n/a
BaalTaunt
This is the 'baal laughing and killing you if you remain idle' effect that kills leechers. ;)
Basically, this thing will teleport to your char (this is ultra cool for a 'prison effect' if the enemies are not uncollideable) whenever you move, if you move away further then par1-subtiles, it'll walk to you again. If you are further away then par3-subtiles, it'll warp to you, rather then walk. After par2-seconds have ellapsed, it'll use SK1 (unless you moved).
Radius (subtiles)
Delay (seconds) [between uses of SK1]
Radius (subtiles)
n/a
n/a
n/a
n/a
n/a
PutridDefiler
This AI is hardcoded to a large extent, when there are allied units nearby, it'll cast SK1 on them. - What isn't hardcoded. It will escape once the player comes into par1-radius, it will escape to a distance of par2-subtiles. If it can't escape anymore it'll attack in melee.
Radius (subtiles)
Radius (subtiles)
n/a
n/a
n/a
n/a
n/a
n/a
BaalToStairs
This is the baal that appears after the final wave is killed, the one turning around and walking down the stairs, par1 controls the distance to the stairs, before it stops and vanishes.
Radius (subtiles)
n/a
n/a
n/a
n/a
n/a
n/a
n/a
BaalTentacle
The baal tentacle will self-destruct after par1-minutes have elapsed (don't know if it's in minutes, but 10 seconds seams too short...)
Chance to attack (when within melee range)
Delay (frames) [par1 fails]
Delay (minutes?)
n/a
n/a
n/a
n/a
n/a
BaalCrabClone
This hardcoded AI is exactly the same as the BaalCrab one, just that it doesn't create the clone, otherwise it's the same.
n/a
n/a
n/a
n/a
n/a
n/a
n/a
n/a
BaalMinion
Chance to attack (when within melee range)
Chance to approach (when outside melee range)
Chance to use SK1 (par1 succeeds)
Delay (frames) [par1 fails, par2 fails]
n/a
n/a
n/a
n/a
ClawViperEx
This AI was added in 1.10, it is like the ClawViper AI, it however has an added ranged-attack capability.
Chance to use SK1 (when within par2-range)
Radius (subtiles)
Chance to attack (when within melee range)
Chance to shoot MSA1 (when within par7-radius)
Delay (frames) [like for normal clawviper I think]
Color Parameter [like for normal clawviper]
Radius (subtiles)
Interval (frames) [between rolls of par4]
ShadowMasterNoInit