Gates of Arimyth
http://forum.arimyth.com/

khorlic AI
http://forum.arimyth.com/viewtopic.php?f=8&t=5226
Page 1 of 1

Author:  Imperial [ Sun Dec 04, 2011 6:39 pm ]
Post subject:  khorlic AI

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

Author:  Baerk [ Sun Dec 04, 2011 7:35 pm ]
Post subject:  Re: khorlic AI

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.

Author:  PureRage-DoD [ Sun Dec 04, 2011 8:02 pm ]
Post subject:  Re: khorlic AI

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.

Author:  Imperial [ Mon Dec 05, 2011 12:37 am ]
Post subject:  Re: khorlic AI

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

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/