Shadow Master's AI Micro-Compendium

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderators: GuyAskingQuestion, Doombreed-x, Nefarius, talonrage

Post Reply
User avatar
Ogodei
Hosted Forum Moderator
Champion of the Light
Posts: 321
Joined: Thu Mar 10, 2016 8:31 am
Italy

Hand-picked

Shadow Master's AI Micro-Compendium

Post by Ogodei » Mon Jan 15, 2018 12:34 pm

Hello guys :) ,

Here's a micro guide I wanted to share with the community about the Shadow Master's AI. By seeing this guide [viewtopic.php?f=122&t=56126&p=441323&hi ... ns#p441323] I've been inspired to study this AI in depth. Here are my findings :)

In Monstats.txt

- AIP1(H): it's the chance to perform a regular melee attack. Keep in mind, though, that this AI is hardcoded to perform it sometimes, regardless of this param.

- AIP2: handles the AIType 5 skills usage

- AIP2(N): Determines the unit's awareness radius. Therefore the unit will only engage enemies within AIP2(N).

- AIP2(H): Concerns the combat leashing. Should the distance from its owner exceed AIP2(H), the unit will disengage and run\warp back to him.

in Skills.txt

The Shadow Master's AI is coded to use every possible skill she has in her skill list. this means that your Shadow Master's AI using pets are actually able to use skills from MonStats, Skills.txt(see sumskill# columns), MonProp and MonEquip. There's only a requirement, though, which is setting the AIType column of each skill you want them to use with a specific value. Here is the list of all the avaliable AIType values. Passive skills work even without a proper AIType.
On a side note, keep in mind that the Shadow Master's AI gets every player class skill when the minion is summoned, so unless you plan to create a replica of your character, avoid AITyping your class skills and make cloned skills instead.


AIType 1: it is used for the skills you want your pet to cast while disengaged. In order to be used, you need to assign an AuraState to the skill. It also seems to check for the "group" column in States.txt, and this might be the reason for which the vanilla Shadow Master doesn't get stuck on casting burst of speed and fade all the time.

AIType 2: Skills of AIType 2 are the equivalent of AIType 1, but they are using in combat. There is one major difference, though, because these skills can be used to make your minions cast debuffs(i.e curses) against the enemies.
Self Buffs with AIType 2 require an AuraState, while Curses and debuffs require an AuraTargetState. The AI also checks the state applied upon the targeted enemy, and therefore will void casting the same spell twice on the same enemy.

AIType 3: used for traps and summons

AIType 4 and 5 : Used the former for melee skills and the latter for ranged skills, although they are sometimes used interchangeably

AIType 6: non-existent. In the code, it calls the "default case" (i.e use "Attack" skill).

AIType 7: it is used to make the unit cast the skill on self while under or at 66% health

AIType 8: non-existent. In the code, it calls the "default case" (i.e use "Attack" skill).

AIType 9: non-existent. In the code, it calls the "default case" (i.e use "Attack" skill).

AIType 10: used for Passive skills. This AIType is totally useless, because, as described above, the Shadow Master's AI will benefit from every kind of skills, even passives.

AIType 11: It is uses when fighting against mobs composed by 2 or more enemies.
*warning* it is meant for offensive skills, so avoid using it to set up your curse skills, or the pet will keep cursing the same enemies non-stop (for curses, refer to AIType 2)

AIType 12: In theory it casts these skills when low on health.

AIType 13: The minion will treat these spells as if they were AIType 4 or 5, but occasionally it will cast the skill against the closest monster to its owner.
Last edited by Volf on Mon Jan 15, 2018 2:42 pm, edited 1 time in total.
Reason: Fixed the link leading to d2mods.ulf-johan.info to d2mods.info

Post Reply

Return to “General Mod Making”