AI Copying [Part 1] - 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: [1.9/1.9c] Exe Editing (https://lf-empire.de/forum/forumdisplay.php?fid=17) +---- Forum: Tutorials (https://lf-empire.de/forum/forumdisplay.php?fid=18) +---- Thread: AI Copying [Part 1] (/showthread.php?tid=489) |
AI Copying [Part 1] - Boop - 06-20-2008 In this tutorial I'll teach you how to copy the AI of one ID to another ID which has no AI. Requirements : *LF2 *OllyDbg *A half decent brain Do not attempt this if you lack a half decent brain. First thing is first, open up Olly and load LF2 up. After it finishes press CTRL+F and copy paste this command(make sure the "Entire block" checkbox is ticked): Code: CMP DWORD PTR DS:[ECX+6F4],X Code: CMP DWORD PTR DS:[ECX+6F4],04 You will then get to a point where you see these three lines: Code: 0040A0DD . 83B9 F4060000 >CMP DWORD PTR DS:[ECX+6F4],4 Now I'll try to explain what they mean. The first line is a compare(CMP) command, it checks if [ECX+6F4](the address where the character ID is stored) is equal to 4. The next line is "Jump if not equal"(or to be exact Jump if not Zero, but don't worry about that ), so that means if the CMP in the line above isn't true it will jump and skip all the AI code. For example if the character ID is 6 the jump is executed and all the AI stuff is skipped, if its 4 it isn't skipped and AI code is executed. So basically, if we want to "Copy" the AI functions to another ID we just have to make the jump NOT execute on 4 AND our new ID. There are a lot of ways of writing that code, but I'm going to teach the simplest, straight forward , no brainier way of doing it. Lets replace: Code: CMP DWORD PTR DS:[ECX+6F4],4 Code: JMP 00442612 First lets start by writing the original compare line. After that we will write a JE command(Jump if Equal) to 0040A0EA(this is the line after the JNZ, look up at the first block of code I copy pasted if you still don't know where the number came from). So your code should like like this: Code: 00442612 83B9 F4060000 >CMP DWORD PTR DS:[ECX+6F4],4 So lets say we want to copy ID 4 AI to ID 60(which is 3C in hex, remember everything is in hex), all we have to do is add another CMP and a JE. So now our code looks like this: Code: 00442612 83B9 F4060000 >CMP DWORD PTR DS:[ECX+6F4],4 To copy it to more ID's you just need to add another CMP and another JE after that. You can do this as much as you want. All thats left now is to add a JMP(Unconditional jump) at the end of all of that, this is to make sure that if its any other ID the code continues to work and the program doesn't crash. So we do JMP 0040A32E(this is where it would normally jump if the ID wasn't 4, look at the JNZ part in the first block of code if you don't understand where the number came from). Code: 00442612 83B9 F4060000 >CMP DWORD PTR DS:[ECX+6F4],4 In pseudo code the code means this: Code: IF ID = 4 OR ID = 60 { NOTE : Thanks to RUDOLF27 for finding out that ID's Quote:John - 2 (or 02)don't work. If you want to copy them, then just follow the tutorial normally and everytime you see ECX+6F4 replace it with EDX+6F4 . ---------------------------------------------------------- Tutorial end, don't copy this next bit if you want to copy this tutorial anywhere . I tried my best to explain everything as clearly as possible, if you still don't understand that means you aren't trying enough, or you lack one of the requirements (half decent brain). Don't PM me for help as that will just annoy me, post here if something isn't clear. RE: AI Copying - manxeater - 06-21-2008 Quote:there are 3 lines which two do you mean? RE: AI Copying - Boop - 06-21-2008 Changed two to three... It didn't really make a difference since I said "first line" and then "next line" which obviously means the first 2 >.<. RE: AI Copying - Hypermodder - 06-21-2008 Could you change the AI from Bandit into monk ones plz? My bandit can shoot energy-blasts with D>A, but the bandit-AI don't use D>A... ________________________________________________________________________ I V (not making a new post---) Well, I tried to, but all this numbers and letters confused meh--- I'm not kinda exe-editer Sry, I don't meant that you are our hex-editer-pico, I just wanna ask where to change this because I have ablolutely no clue about exe-editing! RE: AI Copying - Boop - 06-21-2008 Omg... I wrote this tutorial for a reason!!!! Just copy ID 35 to ID 30. I don't understand why people think I'm their personal b*tch and should help them when I wrote a very clear and descriptive tutorial on how to do it and they don't even try to follow it. RE: AI Copying - Silverthorn - 06-21-2008 Although I'm half braindead (which, btw, fulfills the half decent brain thingy ), I understood the tutorial And that with a debugging knowledge of about 0. Good job for making it that clear, Silva RE: AI Copying - RUDOLF27 - 06-30-2008 Silva Wrote:NOTE : Thanks to RUDOLF27 for finding out that ID'sWow, thanks, you're really an expert with hex!!! RE: AI Copying - KyuubiNaruto(FKN) - 07-10-2008 i am very smart but i look for like an hour and cant find whats up there RE: AI Copying - Boop - 07-10-2008 Right click > goto > 4093B5 . Double click CMP EAX, 2 and replace it with JMP 44280D. Goto 44280D and write the code I posted. The same code appears at 004094B2, do the same thing basically (just don't jump to 44280D, jump somewhere else like 44290D or something). Good luck , Rudolf27 figured it out so you should be able to as well (I'll clean up the tutorial later, I'm currently working on something). RE: AI Copying - KyuubiNaruto(FKN) - 07-10-2008 i have a problem,when i get the part where you tell use what the code say's in english i cant go any further...what should i doo? |