DruidBear'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.

Moderator: Nizari

Post Reply
User avatar
Senior Moderator
Posts: 518
Joined: Thu Mar 10, 2016 8:31 am


DruidBear's AI Micro-Compendium

Post by Ogodei » Sat May 11, 2024 2:37 pm

Hi :)

I've been testing around with the Druid Bear's AI. Here's the mini-guide for it. It is rather a simple minion, but handles some nice features.

The leashing with this pet is strictly hardcoded, meaning you won't be able to alter it via AIParams like you'd do with the Shadow Warrior or the Shadow Master: the leash consists of 3 elements:

50 sub-tiles in order to warp at you
28 sub-tiles to disengage and run at you
16 sub-tiles to start following you when disengaged (no, the bear won't move as soon as you walk, but is lazy enough to wait for you to be further than 17 sub tiles).

The AIParams of the AI do the following

Code: Select all

AIParam1 : Difficulty dependant, Stall Time during attacks: This needs to match the A1 animation of your minion's dcc file, or it will produce odd results like attacking twice with a single skill.
AIParam2 : Difficulty dependant, Chance to gain a 40% speed boost while approaching.
AIParam3 : Difficulty dependant, Use Skill1 (and therefore Sk1Mode) instead of regular attack, which always uses A1.
AIParams 4 and 5 are set to 0 in monstats.txt, but they're unused, not even retrieved by the code.

NOTE 05/11/2024 : A joint test done with RandomOnions has shown that this AI requires the unit to use Skill1 through a sequence from MonSeq.txt. Default modes such as A1 will result in the unit to hang indefinitely after the skill is cast.

Happy modding!

Post Reply

Return to “General Mod Making”