Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'Random' Feature Manipulation
#1
Sorry for going into a fourth question in a row, but I met up with this problem while attempting to solve my third (so this question is somewhat related). Ok, I'm pretty sure that this problem was approached before. However, I've searched both the mainsite and the forum, and there weren't any sufficient answers :D.

I downloaded the 'LF2 Character (Stage Mode)' file from the thread 'New Hidden Chars in LF2'. I played around with the 'ID' limits on stage mode, and they worked perfectly when I tested it, but the 'Random' feature stubbornly remains in the 'ID' range of '0-29' :D.

Question:

Is there a way to manipulate the 'ID' range of the 'Random' feature for stage mode only?

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:
#2
    ASM-Code:
0042E091   . B9 01000000    MOV ECX,1
0042E096   > 8B16           MOV EDX,DWORD PTR DS:[ESI]
0042E098   . 83BA F8060000 >CMP DWORD PTR DS:[EDX+6F8],0      ;if it is type 0 (a.k.a character)
0042E09F   . 75 14          JNZ SHORT lf2_load.0042E0B5
0042E0A1   . 85C9           TEST ECX,ECX
0042E0A3   . 75 10          JNZ SHORT lf2_load.0042E0B5
0042E0A5   . 83BA F4060000 >CMP DWORD PTR DS:[EDX+6F4],1E      ;check if it is above of equal to 30
0042E0AC   . 7D 07          JGE SHORT lf2_load.0042E0B5
0042E0AE   . 8944BC 44      MOV DWORD PTR SS:[ESP+EDI*4+44],EAX



Changing the lower limit is kinda a pain... I have a theory on how to do it, but it requires jumping and what not... can't be bothered :D.
[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:
#3
Is there a way to lock the IDs for the 'Random' feature just stage mode, though? The ID lock doesn't really matter at the moment. How would you change the 'Random' feature range just for stage mode (and allow the original 'Random' range to go on in VS. mode and the other modes)?

Sorry for the short post.

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
451160 , that is where the menu position is stored in memory ( it is a static address).

So you can jump from :

0042E0A5 . 83BA F4060000 >CMP DWORD PTR DS:[EDX+6F4],1E

Then write something like:

CMP BYTE [451160],1
jnz not stage mode
CMP DWORD PTR DS:[EDX+6F4],0A ; this only gets executed if it is stage mode, special conditions go here.
JGE 0042E0B5
jmp 0042E0AE
not stage mode:
CMP DWORD PTR DS:[EDX+6F4],1E
JGE 0042E0B5
jmp 0042E0AE


To exclude certain ID's then you can just add

CMP DWORD PTR DS:[EDX+6F4],0B
JE 00442E0B5
(that would exclude ID 11).

after the if greater or equal to 30 thingy.
Note(logical thingy): it's pretty pointless excluding ID 29, when you can just change the cmp ID , 1e with cmp id, 1d ... etc etc :p.
[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
Sorry for not replying for two days, but I've been trying to test Silva's way of solving this problem.

I realized that there were over five addresses that look exactly identical to the code Silva posted in his first reply:

Code:
0042E091   . B9 01000000    MOV ECX,1
0042E096   > 8B16           MOV EDX,DWORD PTR DS:[ESI]
0042E098   . 83BA F8060000 >CMP DWORD PTR DS:[EDX+6F8],0
0042E09F   . 75 14          JNZ SHORT lf2_load.0042E0B5
0042E0A1   . 85C9           TEST ECX,ECX
0042E0A3   . 75 10          JNZ SHORT lf2_load.0042E0B5
0042E0A5   . 83BA F4060000 >CMP DWORD PTR DS:[EDX+6F4],1E
0042E0AC   . 7D 07          JGE SHORT lf2_load.0042E0B5
0042E0AE   . 8944BC 44      MOV DWORD PTR SS:[ESP+EDI*4+44],EAX

Do I have to change every one of those five addresses and jump to five different addresses in the bottom of the program? If not, which one do I change?

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:
#6
Hmm, if there are five addresses there is a chance that there is a different random procedure for every mode and the one I posted only applies to VS(or stage mode) mode (meaning my code is stupid :p). Try experimenting.

Edit: You'll probably have to edit all 5 of them...

The code I gave you, only deals with reset random. Which means you can still get characters if you get random on the first try. Looks like you'll have to do all 5 :p.
[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: RenanDez
#7
Ok, I changed all five of the coding Silva posted in his last reply. The result worked perfectly. I was able to make it so that only in 'stage mode' the 'Random' feature has an 'randomization range' of IDs 20-29, and in 'VS. mode' and all others the 'randomization range' is set at IDs 1-29.

In other words, problem solved :D, and my custom EXE file/program is finally finished! No More Questions (for the moment, at least :D)!

Sorry for the short post.

Thanks again Silva!


~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:




Users browsing this thread: 2 Guest(s)