Login | Register


All times are UTC - 5 hours


It is currently Thu Mar 28, 2024 5:10 pm




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: khorlic AI
PostPosted: Sun Dec 04, 2011 6:39 pm 

Joined: Wed Aug 25, 2010 1:46 pm
Posts: 282
Ok heres the deal. I used to be able to predict him very well. This season though he has been unpredictable...(for me) or maybe I just missed the point every time we have done ancs in any difficulty.

What is Khorlic's AI? Did it change this season? What does he chase after every game? Just highest Level? And, do the other have a similar AI?

iMP

_________________
Lee is a fucking moron.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: khorlic AI
PostPosted: Sun Dec 04, 2011 7:35 pm 
Moderator
User avatar

Joined: Mon Nov 09, 2009 3:09 pm
Posts: 815
No changes have been made to the quest AI parameters passed to the ancients or for that matter their their overall AI type. What I do know for sure about the AI is that it tends to be a preferred target AI where they'll go after the preferred target heavily if they can. As for what particularly determines the preferred target I'm not sure... That's getting into really obscure AI mechanics that Phroezen Keep might be able to shed some light on.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: khorlic AI
PostPosted: Sun Dec 04, 2011 8:02 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
It's not controlled by monstats, the ancients AI is fully hardcoded (thats why it won't work on any other unit than those).
I just unlocked those AI's last week funnily enough so I could have enemies that use WW propperly.
Code:
Original Switch:

6FCEFBC0   . 85D2           TEST EDX,EDX
6FCEFBC2   . 75 05          JNZ SHORT D2Game.6FCEFBC9
6FCEFBC4   . 83C8 FF        OR EAX,FFFFFFFF
6FCEFBC7   . EB 03          JMP SHORT D2Game.6FCEFBCC
6FCEFBC9   > 8B42 04        MOV EAX,DWORD PTR DS:[EDX+4]
6FCEFBCC   > 2D 1C020000    SUB EAX,21C                              ;  Switch (cases 21C..21E)
6FCEFBD1     74 10          JE SHORT D2Game.6FCEFBE3
6FCEFBD3   . 48             DEC EAX
6FCEFBD4   . 74 08          JE SHORT D2Game.6FCEFBDE
6FCEFBD6   . 48             DEC EAX
6FCEFBD7     75 12          JNZ SHORT D2Game.6FCEFBE8                ;  Any unit other than ancients
6FCEFBD9   .^E9 32FEFFFF    JMP D2Game.6FCEFA10                      ;  Case 21E of switch 6FCEFBCC
6FCEFBDE   >^E9 BDFBFFFF    JMP D2Game.6FCEF7A0                      ;  Case 21D of switch 6FCEFBCC
6FCEFBE3   >^E9 08F8FFFF    JMP D2Game.6FCEF3F0                      ;  Case 21C of switch 6FCEFBCC
6FCEFBE8   > C2 0400        RETN 4                                   ;  Default case of switch 6FCEFBCC


Edited Switch

6FCEFBC0   . 85D2           TEST EDX,EDX
6FCEFBC2   . 75 05          JNZ SHORT D2Game.6FCEFBC9
6FCEFBC4   . 83C8 FF        OR EAX,FFFFFFFF
6FCEFBC7   . EB 03          JMP SHORT D2Game.6FCEFBCC
6FCEFBC9   > 8B42 04        MOV EAX,DWORD PTR DS:[EDX+4]
6FCEFBCC   > 2D 1C020000    SUB EAX,21C                              ;  Switch (cases 21C..21E) (Ancients ID's in monstats)
6FCEFBD1     74 10          JE SHORT D2Game.6FCEFBE3
6FCEFBD3   . 48             DEC EAX
6FCEFBD4   . 74 08          JE SHORT D2Game.6FCEFBDE
6FCEFBD6   . 48             DEC EAX
6FCEFBD7     75 12          JNZ SHORT D2Game.6FCEFBEB                ;any unit other than ancients jump further
6FCEFBD9   .^E9 32FEFFFF    JMP D2Game.6FCEFA10              ;  If Ancient 3, jump
6FCEFBDE   >^E9 BDFBFFFF    JMP D2Game.6FCEF7A0              ;  if Ancient 2, jump
FCEFBE3   >^E9 08F8FFFF    JMP D2Game.6FCEF3F0          ;  if ancient 1, jump
6FCEFBE8   > C2 0400        RETN 4                                   ;  Default case of switch 6FCEFBCC
6FCEFBEB    ^EB F6          JMP SHORT D2Game.6FCEFBE3                ; default to Ancient 1 AI if not an ancient


Ancient AI Questlock:


6FCEFA2B      85C0          TEST EAX,EAX                         ;NOP
6FCEFA2D      0F85 72010000 JNZ D2Game.6FCEFBA5          ;NOP

6FCEF40F      85C0          TEST EAX,EAX                         ;NOP
6FCEF411      0F85 F5020000 JNZ D2Game.6FCEF70C          ;NOP

6FCEF7B9     /74 15         JE SHORT D2Game.6FCEF7D0     ; Change to JMP


Korlic picks a target completely at random and sticks to it until you break his line of sight, manage to get out of range, get killed or kill him. Once he has picked a unit and lost it (without killing it), if the unit comes back into view, he might switch between current target and previous target.
You need to edit the stuff at 6FCEF7A0 in d2game to adjust his AI params.

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: khorlic AI
PostPosted: Mon Dec 05, 2011 12:37 am 

Joined: Wed Aug 25, 2010 1:46 pm
Posts: 282
hmm so he is completely random??? because ive never seen him chase the actual player chars until this ladder. figured it might of been a lvl or something because the times i have noticed he has chased the highlest lvl in the area. khorlic is a hoe anyway

_________________
Lee is a fucking moron.


Top
 Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 84 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron