Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Replace AI in v2.0a
#1
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
Reply
Thanks given by:
#2
Have you read this thread yet ? [14/08/09] LF2 DLL Framework
Decompiled functions: [documented] Functions decompiled
Decompile lf2.exe project for documentation: https://github.com/xsoameix/lf2
Decompile lf2.exe project for implementation: https://github.com/xsoameix/openlf2
Once any function fully engineer reversed in documentation project, then we implement it in implementation project.

lf2 data structure: Updated spreadsheet, many changes made by o_g349/xsoameix, I have two different nick names.

A old project: lf2-MS
Reply
Thanks given by: nhatnamyugi
#3
(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
Reply
Thanks given by:
#4
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
Decompiled functions: [documented] Functions decompiled
Decompile lf2.exe project for documentation: https://github.com/xsoameix/lf2
Decompile lf2.exe project for implementation: https://github.com/xsoameix/openlf2
Once any function fully engineer reversed in documentation project, then we implement it in implementation project.

lf2 data structure: Updated spreadsheet, many changes made by o_g349/xsoameix, I have two different nick names.

A old project: lf2-MS
Reply
Thanks given by: nhatnamyugi
#5
(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
Reply
Thanks given by:
#6
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).
Reply
Thanks given by: nhatnamyugi
#7
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
Decompiled functions: [documented] Functions decompiled
Decompile lf2.exe project for documentation: https://github.com/xsoameix/lf2
Decompile lf2.exe project for implementation: https://github.com/xsoameix/openlf2
Once any function fully engineer reversed in documentation project, then we implement it in implementation project.

lf2 data structure: Updated spreadsheet, many changes made by o_g349/xsoameix, I have two different nick names.

A old project: lf2-MS
Reply
Thanks given by: nhatnamyugi
#8
(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
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)