Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Omitting Characters from Character Selection
#1
This is my final question. Three questions in a row seems kinda like thread spamming to me actually :D.
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 :D (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)?

Thanks a Lot


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by: A-Man
#2
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:p ). Anyway like mentioned in the other thread, it only works for human characters.


The same code appears :

Code:
00432E0D   . 8B88 F4060000  MOV ECX,DWORD PTR DS:[EAX+6F4]
00432E13   . B8 67666666    MOV EAX,66666667
00432E18   . F7E9           IMUL ECX
00432E1A   . C1FA 02        SAR EDX,2
00432E1D   . 8BC2           MOV EAX,EDX
00432E1F   . C1E8 1F        SHR EAX,1F
00432E22   . 03C2           ADD EAX,EDX
00432E24   . 83F8 05        CMP EAX,5
00432E27   . 74 05          JE SHORT lf2_load.00432E2E
00432E29   . 83F8 03        CMP EAX,3
00432E2C   . 75 2A          JNZ SHORT lf2_load.00432E58
00432E2E   > 833D 28844500 >CMP DWORD PTR DS:[458428],1              ;  here
00432E35   . 74 21          JE SHORT lf2_load.00432E58

I'm guessing that is where it handles the cpu characters, didn't really have time to check. Feel free to post your results

PS: My addresses might be a bit off... I don't know why.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: A-Man
#3
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 :D). 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.....

Please Respond


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:
#4
Found the code for the computer:

Code:
0042C028   . 83F8 05        CMP EAX,5      // id 5x
0042C02B   . 74 05          JE SHORT LF1477.0042C032
0042C02D   . 83F8 03        CMP EAX,3      // id 3x
0042C030   . 75 05          JNZ SHORT LF1477.0042C037
0042C032   > 83FF 01        CMP EDI,1  // cheat check
0042C035   .^75 A9          JNZ SHORT LF1477.0042BFE0  // if cheat is disabled then jump to 0042BFE0 ... u get it
0042C037   > 8B93 D4070000  MOV EDX,DWORD PTR DS:[EBX+7D4]
0042C03D   . 8B84AB 9401000>MOV EAX,DWORD PTR DS:[EBX+EBP*4+194]
0042C044   . 8B0C8A         MOV ECX,DWORD PTR DS:[EDX+ECX*4]
0042C047   . 8988 68030000  MOV DWORD PTR DS:[EAX+368],ECX
0042C04D   . 8B3D 28844500  MOV EDI,DWORD PTR DS:[458428]
0042C053   > 837C24 28 00   CMP DWORD PTR SS:[ESP+28],0
0042C058   . 0F84 A6000000  JE LF1477.0042C104
0042C05E   . 0134AD 4812450>ADD DWORD PTR DS:[EBP*4+451248],ESI
0042C065   . 3934AD 4812450>CMP DWORD PTR DS:[EBP*4+451248],ESI
0042C06C   . 0F84 92000000  JE LF1477.0042C104
0042C072   > 7D 16          JGE SHORT LF1477.0042C08A
0042C074   . 8B93 D4070000  MOV EDX,DWORD PTR DS:[EBX+7D4]
0042C07A   . 8B82 8023D804  MOV EAX,DWORD PTR DS:[EDX+4D82380]
0042C080   . 83E8 01        SUB EAX,1
0042C083   . 8904AD 4812450>MOV DWORD PTR DS:[EBP*4+451248],EAX
0042C08A   > 8B0CAD 4812450>MOV ECX,DWORD PTR DS:[EBP*4+451248]
0042C091   . 8B93 D4070000  MOV EDX,DWORD PTR DS:[EBX+7D4]
0042C097   . 8B048A         MOV EAX,DWORD PTR DS:[EDX+ECX*4]
0042C09A   . 83B8 F8060000 >CMP DWORD PTR DS:[EAX+6F8],0
0042C0A1   . 75 26          JNZ SHORT LF1477.0042C0C9
0042C0A3   . 8B88 F4060000  MOV ECX,DWORD PTR DS:[EAX+6F4]
0042C0A9   . B8 67666666    MOV EAX,66666667
0042C0AE   . F7E9           IMUL ECX
0042C0B0   . C1FA 02        SAR EDX,2
0042C0B3   . 8BC2           MOV EAX,EDX
0042C0B5   . C1E8 1F        SHR EAX,1F
0042C0B8   . 03C2           ADD EAX,EDX
0042C0BA   . 83F8 05        CMP EAX,5  // id 5x
0042C0BD   . 74 05          JE SHORT LF1477.0042C0C4
0042C0BF   . 83F8 03        CMP EAX,3  // id 3x
0042C0C2   . 75 23          JNZ SHORT LF1477.0042C0E7
0042C0C4   > 83FF 01        CMP EDI,1  // cheat blablabla
0042C0C7   . 74 1E          JE SHORT LF1477.0042C0E7

I only found two, there might be a 3rd one...
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#5
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! :D 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


Attached Files
.zip   LF1477.zip (Size: 1.25 MB / Downloads: 248)
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by: Slash




Users browsing this thread: 1 Guest(s)