![]() |
||
|
Battle mode: troop limit change - 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) +--- Thread: Battle mode: troop limit change (/showthread.php?tid=9217) |
||
Battle mode: troop limit change - Ikran Ahiyìk - 05-23-2014 Hello I'm new here, but let's get started. It's about the 10 and 30 limit of troops in Battle mode. I've read this thread and tried, > http://www.lf-empire.de/forum/showthread.php?tid=2364 using Cheat Engine successfully (temporarily - I didn't patch it) removed the limit, and found some addresses. However, what I really want is to change it rather than remove it, since I don't want the numbers ever reach 3 digits, or keep the convenient way to change the troop numbers back to 0, or whatever. Following the address and open with Olly I see something close...
I'd guess the two lines marked "<<<<", 4395EE and 439618, are what I'm looking for. Now I want 10/30 to be changed to 60/90, so I edit the two numbers to 3C and 5A. However, in executing this edited LF2, the limits are still 10/30. I don't know why, and this is the reason why I post here. Could anybody help checking it out please...? P.S. I've tried to edit something other that that: line 43962B, 1 into 2, and then it worked for being 2 troops added every time I press A, for all troops on the screen. SOLVED OK. Problem solved. Details below: I don't know why exactly, but it worked. There are 6 limits totally. 4 of them are for the 4 rows in the preparation screen, i.e. Bandits to Marks "In Screen" as Row 1, their Reserve as Row 2, Monks to milks (not beers!) "In Screen" as Row 3 and their Reserve as Row 4. The addresses of the 4 rows are 4395AA, 4395C5, 4395E2 and 43960C. Another 2 are... my originally marked lines... beers - the remaining, at 4395EE and 439618. It's obvious for how to edit the beer limits. Let's move on to the other boxes, the 4 Rows. The trickier part (just addition in fact...) is that they do not record the number directly, but added the value of EDX, which is 1, 2, 3 or 4 at the positions. To change the limits basically just have to take care of this EDX too. For "In Screen" refers to below, if I want it to be 99, I should actually note down 98 which is 62 in hex, and so on for the others. A better organized view: 4395AA - Default: 9 (9) - "In Screen" limits subtracted by 1, for id: 30-34, 39 (Bandit, Hunter, Jack, Sorcerer, Justin, Mark) 4395C5 - Default: 1C (28) - Reserve limits subtracted by 2, for entities same as above 4395E2 - Default: 7 (7) - "In Screen" limits subtracted by 3, for id: 35-37, 122 (Monk, Jan, Knight, milk) 4395EE - Default: 0A (10) - "In Screen" limits, for id: 123 (beer) 43960C - Default: 1A (26) - Reserve limits subtracted by 4, for entities same as 4395E2 439618 - Default: 1E (30) - Reserve limits, for id: 123 (beer)
RE: Battle mode: troop limit change - A-Man - 05-23-2014 Open that exe again and try adding troops by fives (I think it was by pressing jump Defend). Does the limit change? The snippet you posted seems to direct you to 00439637 where what ECX points to (which is probably the number of troops) is added by 5. If I was right, then there might be another part with similar numbers you should change. Edit: V: Oh yeah thanks. RE: Battle mode: troop limit change - AmadisLFE - 05-23-2014 @^ Anytime ![]() A-Man pressing Defend makes Army + by 5 not Jump, Jump - army by 1. RE: Battle mode: troop limit change - Ikran Ahiyìk - 05-23-2014 Thanks for help. No, even both the 10/30 are changed, when I come across the limit by pressing D, J or A they're still 10/30. I guess you're right there MUST be some other values... but as a newbie it's very hard for me to find them out... Use Cheat Engine maybe? I find that it allows me to edit the assembly codes too as Olly, what different is CE realize my assembles right after they are done with LF2 running... amazing. I've edited the first post: includes more related instructions, and describes three processes related to the limit. Edit: It seems that the two lines I marked do nothing to the limits actually, or because ESI is loaded from somewhere else. I've tried to change its value, or even delete the MOV ESI,0A thing, but Cheat Engine still reports the value of ESI is 0A (10) or 1E (30). OK when it's up to loading data from other address, I surrender... I think there should be an alternative way to achieve, if I change my demand into 99/99 instead of 60/90. With a single value I could just change all the ESI's into 63 (99), as the process of pressing D, J and A are all found. However, I still want to know what's ESI really doing there, so I wouldn't implement this. Solved. Thanks for attention... (I still have a brunch of questions to be came up with haha) This would be archived and you could take the solution as a reference. RE: Battle mode: troop limit change - A-Man - 05-25-2014 The solution is very interesting indeed .(05-23-2014, 10:59 AM)Ikran Ahiyìk Wrote: Edit: It seems that the two lines I marked do nothing to the limits actually, or because ESI is loaded from somewhere else. I've tried to change its value, or even delete the MOV ESI,0A thing, but Cheat Engine still reports the value of ESI is 0A (10) or 1E (30). OK when it's up to loading data from other address, I surrender...That's probably because LEA works quite differently from MOV. While MOV would've copied the fixed constant value from [EDX+9] to ESI, LEA only stores a reference to the value in that address; in other words, any changes that happens to the address [EDX+9] after the LEA operation did affect the value of ESI as well. The process is kinda complex with all that LEAs going again and again. Good job finding that out XD. |