Little Fighter Empire - Forums
'Random' Feature Manipulation - 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: [2.0] Exe Editing (https://lf-empire.de/forum/forumdisplay.php?fid=43)
+---- Forum: Solved Problems (https://lf-empire.de/forum/forumdisplay.php?fid=45)
+---- Thread: 'Random' Feature Manipulation (/showthread.php?tid=2429)



'Random' Feature Manipulation - 1477 - 03-22-2009

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


RE: 'Random' Feature Manipulation - Boop - 03-23-2009

    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.


RE: 'Random' Feature Manipulation - 1477 - 03-24-2009

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


RE: 'Random' Feature Manipulation - Boop - 03-24-2009

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.


RE: 'Random' Feature Manipulation - 1477 - 03-27-2009

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


RE: 'Random' Feature Manipulation - Boop - 03-28-2009

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.


RE: 'Random' Feature Manipulation - 1477 - 03-28-2009

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