Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ID Specfic MP Regeneration
#1
Alrighty then, the new forum is here so I decided to finally write this tutorial!! :P

First of all you have to decide if you want it to be one ID or a range of ID's.

For one ID use this CFG for the patcher: (For some reason, the forum auto adds a space in the cfg, I don't know why... Just remove it when you copy paste)
Code:
00021F6F,8B89F4060000,E96C0B020090
00042AE0,000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,8B89F406000083F9000F8586F4FDFFB9F40100002BC8B81F85EB51F7E9C1FA058BC2C1E81F03D08B86080300008D4C1004E990F4FDFF

For a range of ID's use this CFG for the patcher: (For some reason, the forum auto adds a space in the cfg, I don't know why... Just remove it when you copy paste)
Code:
00021F6F,8B89F4060000,E96C0B020090
00042AE0,000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,8B89F406000083F9000F8C86F4FDFF83F90A0F8F7DF4FDFFB9F40100002BC8B81F85EB51F7E9C1FA058BC2C1E81F03D08B86080300008D4C1004E987F4FDFF

Alright, so after you patched the exe with one of these thingies, open the the exe with olly and go to offset 00442AE0 (Press ctrl+g and write in 00442AE0).

Then you will see a bunch of code like this:
Code:
00442AE0   > 8B89 F4060000  MOV ECX,DWORD PTR DS:[ECX+6F4]
00442AE6   . 83F9 00        CMP ECX,0                                ;  First ID
00442AE9    ^0F8C 86F4FDFF  JL id_0.00421F75
00442AEF     83F9 0A        CMP ECX,0A                               ;  last ID
00442AF2    ^0F8F 7DF4FDFF  JG id_0.00421F75
00442AF8     B9 F4010000    MOV ECX,1F4
00442AFD     2BC8           SUB ECX,EAX
00442AFF     B8 1F85EB51    MOV EAX,51EB851F
00442B04     F7E9           IMUL ECX
00442B06     C1FA 05        SAR EDX,5
00442B09     8BC2           MOV EAX,EDX
00442B0B     C1E8 1F        SHR EAX,1F
00442B0E     03D0           ADD EDX,EAX
00442B10     8B86 08030000  MOV EAX,DWORD PTR DS:[ESI+308]
00442B16     8D4C10 04      LEA ECX,DWORD PTR DS:[EAX+EDX+4]         ;  MP Regen Rate
00442B1A    ^E9 87F4FDFF    JMP id_0.00421FA6

I took the time to label the important parts, as you can see you only have to edit the CMP ECX,0 (replace 0 with your start ID) and CMP ECX,0A (replace 0A with your end ID). By default all ID's between 0 and 10 get uber fast mana regeneration(Remember the numbers should be in hex, thats why 0A = 10).
*Note*If you want only 1 ID, it's basically the same, you only have to change the CMP ECX,0

To change the rate the mana regenerates you need to change this line : LEA ECX,DWORD PTR DS:[EAX+EDX+4] , I set it to +4, the original is +1. If you set it -1 he will lose mp, but when his HP is low he will start regenerating again, this has something to do with the other part of the code which I don't understand :D.

There you have it folks :), I might dig deeper into this to figure out the other code, but I don't think I'll be doing that any time soon :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:
#2
nice, silva, I've waited soooooo long for that!
Thanks for sharing :)
I think I'm gonna mess around with my exe now..........

Oh, btw, is it 1.9 or 1.9c?
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#3
1.9c.. I don't think it would be to hard to make a 1.9 version for it though :p. You should look at how my exe works and try to remake it for 1.9, you'll learn a lot that way :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:
#4
dang it, call me stupid, but I'm unable to get it done for 1.9 :(
What I don't get is how you find out, WHERE you can find these offsets in the cfg...........
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#5
Wow, XD i imagine a super fast regeneration when their HP becomes low lol. total mayhem.Twisted
im not sure if i will use it or not though, ill test this when i try out my dummy character.:8
"'~Nirvana Is Salvation Of Your Soul~'"
[Image: yurisignn.jpg]
[Image: yurisig2.jpg]
Reply
Thanks given by:
#6
NirvanaNeron (Travoisnero) Wrote:Wow, XD i imagine a super fast regeneration when their HP becomes low lol.

Unfortunately, the char will lose his mp as long as he has (I think) more than 33% or 50%... this would make a character quite bad, since he cannot do any special attacks first... except... you give him a negative mp-tag in the first frames...
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#7
Blue Phoenix Wrote:dang it, call me stupid, but I'm unable to get it done for 1.9 :(
What I don't get is how you find out, WHERE you can find these offsets in the cfg...........

00021F6F > 00421F6F
00042AE0 > 00442AE0

I don't really get the problem? Basically you just find the mp address, set a breakpoint on it to find the line that writes to the MP ( this is usually the regen one, unless the player does a move, then it will be a different line). Then jump from there, write some code to check if it is ID X, copy some code etc etc. I recommend opening olly up twice, once to look at my edited one, and one to look at the original. Then you can see my edits and easily transfer them to 1.9 (hopefully). I know it would be easier for my self to do it, but I want you to learn (and 1.9 runs really badly on my computer :p).

If you actually have specific questions about my code feel free to post here( or pm me, or contact me via msn).
[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:
#8
Heh, I know I'm posting really late, but this is pretty sweet!
Amazing work man!
Are you thinking about trying to find ways to set the IDs other ID specific elements? :P
Reply
Thanks given by:
#9
Gosh, I learn a lot here. Thanks for the tutorial, Silva!

+ Reputation

Regards,
RectumHoward
Founder of the Hoods.

Reply
Thanks given by:
#10
Sinow Rappy Wrote:Heh, I know I'm posting really late, but this is pretty sweet!
Amazing work man!
Are you thinking about trying to find ways to set the IDs other ID specific elements? :P


Well, as far as I know, RaMMicHaeL managed to do ID armor stuff for MH. So when MH releases the update for Little Fighter Kingdom I'll ninja the code (giving credits to RaMMicHaeL of course :D).

@RectumHoward:
Glad you learned some new stuff and thank you for the support :).
[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:




Users browsing this thread: 3 Guest(s)