[1.10] Fixing Shadow Master's AI

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

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

Hand-picked

[1.10] Fixing Shadow Master's AI

Post by Ogodei » Tue May 03, 2016 1:27 am

Hello guys,

[11.06.2016] I'm editing this post because the previous fix caused issues with pathing.
I'll quickly explain this bug. It consists of 2 elements:
1. If you have multiple pets using this AI, everyone tires to hit the same target
2. When you click an enemy to attack him or to cast a skill, your pet(s) switch target and tries to help you, no matter what's happening.

There are 4 steps to accomplish in order to fix the Shadow Master's AI.

a. Changing the unique target selection:

Code: Select all

6FCEB73E   ---> be sure it's "7F 09"
b. Changing the target switching via click:

Code: Select all

6FCEB63F   74 27            JE SHORT D2Game.6FCEB668
change to
6FCEB63F   EB 27            JMP SHORT D2Game.6FCEB668
c. Fixing the melee range (if you don't do this, your pets might choose another target when the closest monster reaches their melee radius)

Code: Select all

6FCEB7F1   0F84 11010000    JE D2Game.6FCEB908
change to:
6FCEB7F1   0F83 11010000    JNB D2Game.6FCEB908
d. Fixing a vanilla behavior that ruins archers and casters:
The Shadow Master's AI often tends to go in melee range and use the ''Attack'' skill, no matter if you remove it from your pets or whatsoever.
Cloning the Attack skill and nullify the default one could solve this fix, but there is a much better way to do this, 100% softcoded.

- In Monstats.txt
- find the row of your archer, caster or, well "ranged-only" pet;
- in one of the skill# columns, insert the Attack skill with a NU mode;

In Monstats2.txt
- find the row of your pet (the same one in the MonstatEx column in Monstats.txt)
- set the MeleeRng column to a high number (in my case, I put 999)

This will prevent your archers to decide that they have to literally hit the enemies with their bows :P

With all these modifications, you'll have an unbugged Shadow Master's AI which perfectly handles the skill usage.

I would like to thank Kingpin for indicating me the offsets of the AI table in 1.10 :) . Without his hint , the points a / b / c wouldn't have been possible.
Last edited by Ogodei on Thu Jan 18, 2018 12:16 pm, edited 6 times in total.

User avatar
devurandom
Forum Regular
Angel
Posts: 764
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.10] Fixing Shadow Master's AI

Post by devurandom » Tue May 03, 2016 6:07 am

I'm assuming this will help prevent the Shadow Master or other pets from always getting lost.

That is really nice to have. Thank You!
:)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1047
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

Re: [1.10] Fixing Shadow Master's AI

Post by weapon-x » Tue Jun 14, 2016 4:21 am

thanks for sharin' bro...

cheers !
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain


User avatar
Xaphan
Hosted Forum Moderator
Arch-Angel
Posts: 1113
Joined: Fri Oct 08, 2010 10:55 am
France

Re: [1.10] Fixing Shadow Master's AI

Post by Xaphan » Sat Aug 27, 2016 1:29 am

Hey,

Just saw that in your 1st post, a. and c. are the same code edit, so one of thems is wrong :)

Other than that, thanks, this helped me to successfully have working ranged minions !

User avatar
Ogodei
Senior Moderator
Champion of the Light
Posts: 465
Joined: Thu Mar 10, 2016 8:31 am
Italy

Hand-picked

Re: [1.10] Fixing Shadow Master's AI

Post by Ogodei » Sun Aug 28, 2016 5:39 pm

Xaphan" wrote:Hey,

Just saw that in your 1st post, a. and c. are the same code edit, so one of thems is wrong :)

Other than that, thanks, this helped me to successfully have working ranged minions !

Hello! :)

Thanks for highlighting that error, I will provide an edit to my first post as soon as I go home (sunday~monday)
I'm glad that my research on this AI has helped you: I will provide new update as soon as I discover new stuffs: My next work would be finding the coordinates of this AI warping-back function, in order to warp as close as possible to the player and not in a random part of the screen (this could help in preventing the pets from disappearing) :)

EDIT: Fixed the a. point :) thanks again Xaphan!

Theernestrain
Posts: 12
Joined: Mon Mar 12, 2018 9:39 am

Re: [1.10] Fixing Shadow Master's AI

Post by Theernestrain » Thu Mar 15, 2018 3:23 pm

Hey,

I appreciate all the tutorials you've made. You rock! I have a question about this topic though. Which .txt file do I apply the fixes? Will this fix also allow my uber diablo and uber mephisto summons to cast their skills with original animations?

User avatar
Ogodei
Senior Moderator
Champion of the Light
Posts: 465
Joined: Thu Mar 10, 2016 8:31 am
Italy

Hand-picked

Re: [1.10] Fixing Shadow Master's AI

Post by Ogodei » Thu Mar 15, 2018 3:59 pm

Hello,

It's not a TXT but rather a DLL. The only TXT you're going to touch is Monstats2.txt in order to raise the MeleeRange attribute of your purely ranged minions. And, I don't know about Diablo and Mephisto. It may be that you missed to assign a sequence, or the proper animation in either Monstats.txt (their row) or in the MonAnim of the skill

Theernestrain
Posts: 12
Joined: Mon Mar 12, 2018 9:39 am

Re: [1.10] Fixing Shadow Master's AI

Post by Theernestrain » Mon Jan 14, 2019 8:11 pm

I've been trying to search for the code 6FCEB73E in XVI32 D2game.dll. But I cannot seem to find it. Am I looking in wrong place? I find codes like 0F84 11010000 when I use hex search function. But, there are multiples of that code.

EDIT: I seem to have gotten a little closer. I decided to use ollydbg instead of XVI32. Not the format of coding is pretty similar. But, 6FCEB73E or any of the others you listen, are non existant it appears. I used search for expression button on latest ollydbg, copied and pasted. Yet, nothing. I scrolled down manually and still not there. Not sure what needs to be done.

Post Reply

Return to “Code Editing”