![]() |
|||||||||
|
Adding defense multiplier to ID. - 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: Adding defense multiplier to ID. (/showthread.php?tid=9210) Pages:
1
2
|
|||||||||
Adding defense multiplier to ID. - bashscrazy - 05-17-2014 In battle mode you can adjust the main characters defense by changing it from 1.0 to 1.5, 2.0, 2.5 and 3.0 Can you hex edit so a specific ID can have a specific defense multiplier all the time? That way they take less damage from attacks. So say I have 3 ID's ID 70, 71 and 72. I want ID 70 to have 2.5 defense by default. 71 to have 3.0 and 72 to have 3.5 So in a VS mode battle, character 70 vs 72, 72 would probably always win just cause of increased defense. Further on that, can you use 1.1, 1.2, 1.3, etc? aka does it have to be increased by 0.5 or can you increase it by smaller/different increments. I've seen this thread where Silva talks about armor multiplier being stored at object + 0x340 but I don't understand it that well. I have done some minor hex editing. Like extremely basic beginner things. Only editing values. Not adding anything. So any extra steps and information you can provide will be much more helpful in the process. Also, patience is required for my n00by mind when it comes to hex editing. Thanks! RE: Adding defense multiplier to ID. - ThrillerBeat - 05-17-2014 its for the dbz mod right RE: Adding defense multiplier to ID. - A-Man - 05-18-2014 I have no idea where you should place the code, but I think this should do what you want (didn't test :P).
add2.5armoraddress:
add3.0armoraddress:
add3.5armoraddress:
RE: Adding defense multiplier to ID. - Boop - 05-20-2014 A-MAN is pretty close. You should add the code in the function which creates the object. Code: 004064BE |. 899E 40030000 MOV DWORD PTR DS:[ESI+340],EBXHere. You don't need to get the pointer, it's already in ESI. So the following would compare ids: Code: cmp dword ptr ds:[esi+368h],46hYou should jump from 004064BE to somewhere, put your code and jump back. Or use the DLL. A-MAN: Can you give him the full details? RE: Adding defense multiplier to ID. - bashscrazy - 05-22-2014 (05-17-2014, 08:05 AM)TheKidd Wrote: its for the dbz mod right yes it is. I tried and failed lol The game crashed when it loaded all data files. I'm not cut out for this hex editing stuff haha RE: Adding defense multiplier to ID. - A-Man - 05-22-2014 Aah, didn't see this. Here is everything you should do in steps: 1-Ctrl+G: 004064BE 2-Replace the code with:
3-Ctrl+G: .someunoccupiedaddressatthebottom 4-there, copy this code:
add2.5armoraddress (another unoccupied address XD):
add3.0armoraddress (a third unoccupied address):
add3.5armoraddress (a 4th unoccupied address):
The idea is basically taking a detour from the original loading process and getting back on the track after you "inject" what you want. That's pretty much like when you go out to buy groceries, and on the way, you stop for sometime to get yourself some other stuff you wanted and wasn't originally planned for your trip. At the address where the object is loaded, you jump down to get some extra stuff, that is adding the multiplier, and after you're done you jump back to continue the original loading process. CMP is ASM's version of "if(){do stuff}", except that it "stacks" the result of the comparison until the next line; that is when you actually say "JE XXXX-> jump if the comparison was equal to XXXX" where XXXX is the address where the multiplier is to be changed (in other words, if (id == decimal(0x46)){mov or declare the new multiplier as the id's (which is then stored at ESI+368h)). RE: Adding defense multiplier to ID. - bashscrazy - 05-22-2014 Thanks A-Man! I appreciate the long detailed answer. I followed it to the best of my ability. Here's a pic of what I did, when I run the exe, it crashes like before. I'm not sure why. But again, thanks for all your help. I really appreciate it! RE: Adding defense multiplier to ID. - Ikran Ahiyìk - 05-23-2014 At 446BAE, shouldn't you jump back to 4064C4 instead of 4064BF? Now you are jumping into the middle of an instruction... RE: Adding defense multiplier to ID. - A-Man - 05-23-2014 What Ikran said. Instructions takes up some space too. I did also clearly say that next to the line :P : ![]() Now it should work. Good luck. RE: Adding defense multiplier to ID. - bashscrazy - 05-23-2014 Oh, oops! haha. Thanks Ikran and A-Man! The game runs now, but the armor doesn't appear to be working. ![]() It should be working for ID 70, 71 and 72 yes? Those are my 3 Vegeta characters. They are still taking normal damage
|