Infinite Mimiga Mask

May 14, 2011 at 3:15 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
So I made this hack a while ago, and it seems it has garnered enough interest that multiple people have asked how to do it. As I am fairly lazy (don't want to respond to everyone individually), and not everybody even knows that I did this, I feel like a thread will get it out to more people and thus help the hacking community.

Source:
Code:
[B]0x4154b8:[/B]  mov eax,[49e184]  shl eax,5  add [ebp-0C],eax  add [ebp-4],eax  jmp short 0x4154d4A1 84 E1 49 00 C1 E0 05 01 45 F4 01 45 FC EB 0C
Code:
[B]0x424eaf:[/B]  mov ecx,[4a5ad8]  add ecx,[4a5ae0]  movsx byte edx,[ecx+1]  cmp edx,4d  jne 0x4251fc  mov eax,[4a5ad8]  add eax,[4a5ae0]  movsx byte ecx,[eax+2]  cmp ecx,49  jne 0x4251fc  mov edx,[4a5ad8]  add edx,[4a5ae0]  movsx byte eax,[edx+3]  cmp eax,4d  jne short 0x4251fc  mov ecx,[4a5ae0]  add ecx,4  push ecx  call 421900  add esp,4  mov [49e184],eax  add dword [4a5ae0],8  jmp 0x4252a7A1 D8 5A 4A 00 03 05 E0 5A 4A 00 0F BE 48 01 83F9 4D 75 70 8B 15 D8 5A 4A 00 03 15 E0 5A 4A 000F BE 42 02 83 F8 49 75 5B 8B 0D D8 5A 4A 00 030D E0 5A 4A 00 0F BE 51 03 83 FA 4D 75 46 A1 E05A 4A 00 83 C0 04 50 E8 05 CA FF FF 83 C4 04 A384 E1 49 00 83 05 E0 5A 4A 00 08 E9 98 03 00 00
Implementation:
To make this hack work, you need to do three things:
1) Apply the hack to the exe (or download the patched version).
2) Modify MyChar.pbm to hold however many characters you want. New characters are simply appended to the bottom of the image.
3) Use the new TSC command <MIMXXXX to modify the character index. If XXXX is zero, then the first character will be shown, if XXXX is one, the the second character will be shown, etcetera.

Note that this uses a small bit of flag data in order to save what character you are currently using. High enough flags may screw shit up.
Here's a patched copy of the virgin exe that contains this hack.

Changelog:
13/5/11 - Released to public
14/5/11 - Fixed a few miscopied operand sizes
12/6/11 - Patched copy released, tsc portion changed from 0x425149 to 0x424eaf

Sorry I haven't given much explanation to how this works. If you feel like you need/want clarification on something just point it out.
 
May 14, 2011 at 4:20 AM
Hey.
"In Soviet Russia, graves keep YOU!"
Join Date: Oct 20, 2010
Location: Within the hearts of all
Posts: 691
Age: 101
Thanks for this Lace...
Oh, but it keeps making the game crash. I can't help but think I'm doing something wrong..
I've tried it twice, now. I used the Doukutsu Assembler, is that what you're supposed to use?
 
May 14, 2011 at 4:36 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
I just use Olly, but the assembler shouldn't matter in the least.
There's probably some stupid thing I forgot to type up or didn't generalize.
I'll check it out tomorrow if you can send me an exe.

(this has been confirmed to work, btw, I'm not just sending you into the wild with no previous experience)
 
May 14, 2011 at 6:37 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 29
Lace you've messed it up.

mov edx,[ecx+1] and the other ones like it should be MOVSX EDX,BYTE PTR DS:[ECX+1].

THIS IS WHAT HAPPENS WHEN WE DON'T SPECIFY OPERAND SIZES LACE.

EDIT: Paste this hex (425149-4251BA) if you want it to work.
Code:
8B 0D D8 5A 4A 00 03 0D E0 5A 4A 00 0F BE 51 01 83 FA 4D 0F 85 9A 00 00 00 A1 D8 5A 4A 00 03 05
E0 5A 4A 00 0F BE 48 02 83 F9 49 0F 85 82 00 00 00 8B 15 D8 5A 4A 00 03 15 E0 5A 4A 00 0F BE 42
03 83 F8 4D 75 6D 90 90 90 90 90 90 90 8B 0D E0 5A 4A 00 83 C1 04 51 E8 5B C7 FF FF 83 C4 04 A3
84 E1 49 00 83 05 E0 5A 4A 00 08 E9 EE 00 00 00 90
 
May 14, 2011 at 2:45 PM
Pirate Member
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Dec 26, 2007
Location: Lithuania
Posts: 1947
So, what exactly does this hack give us?
 
May 14, 2011 at 5:01 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 29
WoodenRat said:
So, what exactly does this hack give us?

You can now have an infinite number of mimiga masks in your inventory.

Wasn't that obvious?
 
May 14, 2011 at 6:01 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
well darn it if you aint right gir.
I'll update as soon as I'm sure nothing in the nontsc part is screwed up.
 
May 15, 2011 at 6:21 PM
Pirate Member
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Dec 26, 2007
Location: Lithuania
Posts: 1947
GIRakaCHEEZER said:
You can now have an infinite number of mimiga masks in your inventory.

Wasn't that obvious?

Okay, what good is that?
 
May 17, 2011 at 1:33 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
If you wish to have more than two pcs, is the reason most people would use it.
 
May 17, 2011 at 2:51 AM
Only Love, Maximum Love, Forever
"Life begins and ends with Nu."
Join Date: May 6, 2009
Location: somewhere new
Posts: 2138
Age: 27
GIRakaCHEEZER said:
You can now have an infinite number of mimiga masks in your inventory.

Wasn't that obvious?

Okay.
This is a joke people.
A joke.

Woodenrat, the hack allows you to have unlimited character spritesheets, so you can have multiple characters.

It could also be implemented to have a changing color pallet for the main character, such as in the Cave Story Beta version.
 
Jun 11, 2011 at 11:17 PM
The Preacher
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 20, 2011
Location: lost in translation
Posts: 337
Age: 29
Doesn't work for me. I copied and pasted the hex code from GIR into my .exe, and I created 2 entities. The first one activates the script <MIM0000, and the second one activates <MIM0001.

The only thing they do ingame is the sound of a message being wrote. Quote's skin doesn't change. I don't understand...
 
Jun 11, 2011 at 11:51 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
It is a two part hack. The code GIR gave is only for one part of the hack (Hence, it doesn't work).
If you have Olly, then try plugging in the codes yourself. I believe I fixed the error GIR pointed out, so that should be all good.
 
Jun 12, 2011 at 12:03 AM
The Preacher
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 20, 2011
Location: lost in translation
Posts: 337
Age: 29
In fact, I tried your code first, but it did the same.
But if you say that you fixed the error, I'll give it another try.

EDIT : FINALLY. It worked! Thank you very much Lace. I owe you one.
 
Jun 12, 2011 at 12:05 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Hmmmm.
Well if you tried recently, nothing would've changed.
If you can give me your exe, I can put it in for you.
 
Jun 12, 2011 at 11:15 AM
The Preacher
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 20, 2011
Location: lost in translation
Posts: 337
Age: 29
I don't know why it didn't work at first, but well, it doesn't matter since I managed to put the code in.
And one more time: thank you Lace. :orangebell:
 
Jun 12, 2011 at 2:57 PM
Bonds that separate us
Forum Administrator
"Life begins and ends with Nu."
Join Date: Aug 20, 2006
Location:
Posts: 2828
Age: 31
Yeah people have been after this hack for as long as I can remember.
 
Jun 12, 2011 at 4:13 PM
Only Love, Maximum Love, Forever
"Life begins and ends with Nu."
Join Date: May 6, 2009
Location: somewhere new
Posts: 2138
Age: 27
Thanks much, Lace.

Also I would just like request to modders that they upload a pre"patched" .exe file for those who have difficulty using the assembler.
That is to say, me.
 
Jun 12, 2011 at 7:00 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
:o
Thanks guys.
Cultr and anyone else who wanted it, I've updated the OP with a link to an already patched version.

I also did a small tweak which allows you to keep <XX1 (there is a useless duplicate of the <FAC command in the trad. exe. I just commandeered that.)
In the future, I may add infinite drown sprites, which I had just not reckoned on needing when I made this.
 
Jul 28, 2011 at 9:12 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
I already used FAC for something. Do you have the XX1 version?
 
Top