03-15-2009, 10:43 PM (This post was last modified: 03-15-2009, 10:48 PM by 1477.)
This is my final question. Three questions in a row seems kinda like thread spamming to me actually .
Anyways, In the following quote in another thread, Lord Silva once said:
(03-14-2009, 09:28 PM)Lord Silva from the thread LF 2.0 exe with Hidden Chars Changed' Wrote: Character selection system is easily manipulated now . Almost anything you could think of is possible. For example it is possible to make a character which is the only selectable character in stage mode and not available anywhere else. Or make the characters which are usable for stage mode not available in vs mode... etc etc.
I was wondering what the EXE solution for preventing certain IDs from being selectable in the Character Selection menu is. I know it's possible, since the 2.0 exe that prevented characters from being chosen twice and that prevented of 'id's under '20' from being chosen on stage mode was posted recently by Silva himself. In addition, in the above quote Silva says that he can easily manipulate the Character Selection Screen. However, I don't know how to do it myself since I have no idea how the coding on Olly Debugger works (nor do anyone in this forum with the exception of Silva, HKhmmm and Tomny).
I also don't like the old solution of using the 'back door method' of inputting an AI onto the 'id' of atype 3 object. It's kind of buggy, and the 'com' string doesn't appear underneath (since the object is 'type 3'). I know Silva has the solution, if only he would care to explain it (just in a simple step-by-step method, if he explains the logic behind it would be nice but it's not necessary) So finally...
Question:
How do I omit certain 'type 0' object/character 'id's from being selectable in the Character Selection Menu (in both Stage and all other modes)?
03-16-2009, 05:13 PM (This post was last modified: 03-16-2009, 08:11 PM by Boop.)
If you'd keep reading the thread, you'd see that there is a bug, and it only works on human characters.
I don't remember it very well, when I said "it can easily be manipulated", I meant I understood the code and do stuff with it... Now I'm pretty much back to step 2( understanding the code, step 1 is finding the code).
Code:
0042A715 . 83F8 05 CMP EAX,5 //id 50-59
0042A718 . 74 05 JE SHORT lf2_load.0042A71F
0042A71A . 83F8 03 CMP EAX,3 // ID 30-39
0042A71D . 75 09 JNZ SHORT lf2_load.0042A728
0042A71F > 833D 28844500 >CMP DWORD PTR DS:[458428],1 //check if lf2.net is enabled
0042A726 .^75 A8 JNZ SHORT lf2_load.0042A6D0 // if its not enabled then jump to 0042A6D0 , that is where u should jump to ignore ID's
0042A728 > 8B83 D4070000 MOV EAX,DWORD PTR DS:[EBX+7D4]
0042A72E . 8B94AB 9401000>MOV EDX,DWORD PTR DS:[EBX+EBP*4+194]
0042A735 . 8B0488 MOV EAX,DWORD PTR DS:[EAX+ECX*4]
0042A738 . 8982 68030000 MOV DWORD PTR DS:[EDX+368],EAX
0042A73E > C704AD 6812450>MOV DWORD PTR DS:[EBP*4+451268],1
0042A749 . E9 AB010000 JMP lf2_load.0042A8F9
0042A74E > C704AD 4812450>MOV DWORD PTR DS:[EBP*4+451248],-1
0042A759 . C704AD 6812450>MOV DWORD PTR DS:[EBP*4+451268],1
0042A764 . E9 90010000 JMP lf2_load.0042A8F9
0042A769 > 80B8 CF000000 >CMP BYTE PTR DS:[EAX+CF],0
0042A770 . 0F84 D0000000 JE lf2_load.0042A846
0042A776 . 833CAD 6812450>CMP DWORD PTR DS:[EBP*4+451268],0
0042A77E . 0F85 B2000000 JNZ lf2_load.0042A836
0042A784 . 83C8 FF OR EAX,FFFFFFFF
0042A787 . 0104AD 4812450>ADD DWORD PTR DS:[EBP*4+451248],EAX
0042A78E . 3904AD 4812450>CMP DWORD PTR DS:[EBP*4+451248],EAX
0042A795 . 0F84 9B000000 JE lf2_load.0042A836
0042A79B > 7D 16 JGE SHORT lf2_load.0042A7B3
0042A79D . 8B8B D4070000 MOV ECX,DWORD PTR DS:[EBX+7D4]
0042A7A3 . 8B91 8023D804 MOV EDX,DWORD PTR DS:[ECX+4D82380]
0042A7A9 . 83EA 01 SUB EDX,1
0042A7AC . 8914AD 4812450>MOV DWORD PTR DS:[EBP*4+451248],EDX
0042A7B3 > 8B04AD 4812450>MOV EAX,DWORD PTR DS:[EBP*4+451248]
0042A7BA . 8B8B D4070000 MOV ECX,DWORD PTR DS:[EBX+7D4]
0042A7C0 . 8B0481 MOV EAX,DWORD PTR DS:[ECX+EAX*4]
0042A7C3 . 83B8 F8060000 >CMP DWORD PTR DS:[EAX+6F8],0
0042A7CA . 75 2A JNZ SHORT lf2_load.0042A7F6
0042A7CC . 8B88 F4060000 MOV ECX,DWORD PTR DS:[EAX+6F4]
0042A7D2 . B8 67666666 MOV EAX,66666667
0042A7D7 . F7E9 IMUL ECX
0042A7D9 . C1FA 02 SAR EDX,2
0042A7DC . 8BC2 MOV EAX,EDX
0042A7DE . C1E8 1F SHR EAX,1F
0042A7E1 . 03C2 ADD EAX,EDX
0042A7E3 . 83F8 05 CMP EAX,5 // ID 50-59
0042A7E6 . 74 05 JE SHORT lf2_load.0042A7ED
0042A7E8 83F8 03 CMP EAX,3 // ID 30-39
0042A7EB . 75 2C JNZ SHORT lf2_load.0042A819
0042A7ED > 833D 28844500 >CMP DWORD PTR DS:[458428],1 //check if lf2.net is enabled
0042A7F4 . 74 23 JE SHORT lf2_load.0042A819 // If it IS!!! enabled jump to 0042A819
0042A7F6 > 83C8 FF OR EAX,FFFFFFFF //that means you should jump here when ignoring ID's
Basic commands:
CMP = compare, does works together with jumps
JE = jump if equal
JNZ = jump if not equal
JMP = unconditional jump
As you can see, it doesn't check individual ID's to do that you'd rewrite a large bit of the code(i'll probably do it for the dll).
If you wanted to make ID's 60-69 unselectable, you just jump from CMP EAX,5 to somewhere at the bottom of the exe.
And write which code which looks something like:
CMP EAX,5 (this is what we over wrote when we jumped from CMP EAX,5)
JE 0042A71F
CMP EAX,6
JE 0042A6D0
JMP 0042A71A (jumps back to CMP EAX,3 to the rest of the code)
Now you just have to do the same thing for the next time it appears(Just to clarrify , it appears 3 times, twice in the first chunk of code I copied, and once for the computer screen. It might appear more times, but I haven't found it ). Anyway like mentioned in the other thread, it only works for human characters.
03-17-2009, 10:40 PM (This post was last modified: 03-21-2009, 09:00 PM by 1477.)
Ok, here are the results of my work/experimentation. I followed Silva's above method completely and tacked on a couple of self-innovations using my limited knowledge of Olly Debugger Coding (without interfering with the original method, of course ).
EXE Info/Features:
1. IDs '30-69' are hidden.
2. IDs '70-79' are omitted.
3. Known Bugs: The hidden and omitted features for the additional IDs and omitted IDs (40-49, 60-69, 70-79) apply to Human Players only. Silva was wrong about his suspected string containing the code on the 'Computer Character Selection'. That string was simply another 'Human Character Selection' code sequence.
____________________________________________________________
Actually, that 'suspected' sequence Silva posted before made up the third and final 'Human C.S.' sequence. It wasn't an additional fourth one (I guess Silva either copied the wrong code, or simply was groggy and mistook the third repetition for another sequence ).
Anyways, LF2 program/EXE file is attached below and available for download and study (I labeled it LF1477 because I couldn't think of anything else to name it ). I would appreciate it if Silva or someone else looked into this more and figures out how to add this feature for the computer as well. Nowadays, there are stories in the stage mode in many people's mods. Allowing duplicates of characters would simply completely ruin the story . I guess this is why MH-Razen implemented his DC Multi-Lock method in Kingdom-LF2 (to prevent character duplicates) .
So, in conclusion, here are the results Silva asked for.....
03-21-2009, 09:10 PM (This post was last modified: 04-01-2009, 09:33 PM by 1477.)
Thanks! Problem solved. I'll fix it up and post the resulting final EXE file on this very post (that is, if Silva doesn't post it first).
________________________________________________________________________________________________________
Ok, I finished fixing up the program/EXE file. It is attached to this post labeled 'LF1477' (I didn't know what else to name it). Here are the features of the final program.
Features:
1. The 'ID's '30-69' are hidden. They are protected with the password 'LF2.net'.
2. The 'ID's '70-79' are omitted. They cannot be accessed at all no matter what you do (that is, in the game).
This program was tested and should be 100% free of any bugs, glitches, and other side effects.
Just download and copy to your 'Little Fighter 2' directory, and then you're good to go. Happy coding! b_(^_^)_d
Credits: Little Fighter 2 - Hidden 'ID's by xxtomnyxx (finding code),Silva (explaining code, finding other half of code), 1477 (creating EXE)
Thanks for Reading, Topic/Problem Solved...
~Solomon Leung
Added xxtomnyxx to the credits, he was the original finder of the code.. not me ~ Silva