Little Fighter Empire - Forums
Replace AI in v2.0a - Printable Version

+- Little Fighter Empire - Forums (https://lf-empire.de/forum)
+-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7)
+--- Forum: [2.0] Exe Editing (https://lf-empire.de/forum/forumdisplay.php?fid=43)
+--- Thread: Replace AI in v2.0a (/showthread.php?tid=9359)



Replace AI in v2.0a - nhatnamyugi - 08-18-2014

I've read the tutorial in forum for v1.9 and 1.9c but I don't see any in this forum.. Please make the tutorial for v2.0a. And can anyone tell me about LF2 that can load dll. I don't understand much.. Thanks so much:D


RE: Replace AI in v2.0a - o_g349 - 08-18-2014

Have you read this thread yet ? [14/08/09] LF2 DLL Framework


RE: Replace AI in v2.0a - nhatnamyugi - 08-18-2014

(08-18-2014, 08:15 AM)o_g349 Wrote:  Have you read this thread yet ? [14/08/09] LF2 DLL Framework

yes. But I really don't understand :3 . .. I have followed the tutorial of Silva but only ID: 34 (sorcerer) has AI , another ID (18 and 54) doesn't have AI.

my code:
CMP DWORD PTR DS:[ECX+6F4],12
JE 0040556A
CMP DWORD PTR DS:[ECX+6F4],22
JE 0040556A
CMP DWORD PTR DS:[ECX+6F4],36
JE 0040556A
JMP 00405761

I'm using v 2.0a

thank you


RE: Replace AI in v2.0a - o_g349 - 08-18-2014

Please use return, AI_SORCERER1 and AI_SORCERER2 label instead of absolute address 00405761 and 0040556A.
This is latest sorcerer AI code:
Code:
AI_Sorcerer proc

;##Somehow the D>J of Sorcerer is not here, only the D^J and the DvJ is contained below.
        CMP DWORD PTR DS:[ECX+6F4h],34
        JE short return
        ;CMP DWORD PTR DS:[ECX+6F4h],ID
        ;JE short return
        jmp  dword ptr [AI_SORCERER2]
return: jmp  dword ptr [AI_SORCERER1]
    
AI_Sorcerer endp



RE: Replace AI in v2.0a - nhatnamyugi - 08-18-2014

(08-18-2014, 09:14 AM)o_g349 Wrote:  Please use return, AI_SORCERER1 and AI_SORCERER2 label instead of absolute address 00405761 and 0040556A.
This is latest sorcerer AI code:
Code:
AI_Sorcerer proc

;##Somehow the D>J of Sorcerer is not here, only the D^J and the DvJ is contained below.
        CMP DWORD PTR DS:[ECX+6F4h],34
        JE short return
        ;CMP DWORD PTR DS:[ECX+6F4h],ID
        ;JE short return
        jmp  dword ptr [AI_SORCERER2]
return: jmp  dword ptr [AI_SORCERER1]
    
AI_Sorcerer endp

can you make some example. this is my first time using Olly


RE: Replace AI in v2.0a - YinYin - 08-18-2014

You could simply use the ddraw.dll on an unmodified lf2 2.0a to write custom AI. http://www.lf-empire.de/forum/showthread.php?tid=7927

You won't be able to stop already existing AI from using their D>A, but you can still easily write up any new behaviour you want for any id (whether it already has special move AI or not).


RE: Replace AI in v2.0a - o_g349 - 08-18-2014

Please let compiler calculate the absolute address for you. Please don't do it by hand.
Tutorial for setting up the compiler: http://www.lf-empire.de/forum/showthread.php?tid=2265


RE: Replace AI in v2.0a - nhatnamyugi - 08-18-2014

(08-18-2014, 09:26 AM)YinYin Wrote:  You could simply use the ddraw.dll on an unmodified lf2 2.0a to write custom AI. http://www.lf-empire.de/forum/showthread.php?tid=7927

You won't be able to stop already existing AI from using their D>A, but you can still easily write up any new behaviour you want for any id (whether it already has special move AI or not).

Thank YinYin.. I think I should start learning C now :)
(08-18-2014, 09:27 AM)o_g349 Wrote:  Please let compiler calculate the absolute address for you. Please don't do it by hand.
Tutorial for setting up the compiler: http://www.lf-empire.de/forum/showthread.php?tid=2265

Thank you so much ^^
(08-18-2014, 09:26 AM)YinYin Wrote:  You could simply use the ddraw.dll on an unmodified lf2 2.0a to write custom AI. http://www.lf-empire.de/forum/showthread.php?tid=7927

You won't be able to stop already existing AI from using their D>A, but you can still easily write up any new behaviour you want for any id (whether it already has special move AI or not).

Can you give me some AI for some IDs? so I can learn easily