News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Paper Mario 64 - General Hacking Tool  (Read 19875 times)

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Paper Mario 64 - General Hacking Tool
« on: April 05, 2014, 10:02:19 pm »
Hi everyone. I want to show you a WIP of my tool to hack Paper Mario 64. Before you read the suite, I want to say I'm a french speaker, so forgive me for my mistakes. I began to seek many valuable data on the EUR version and I found some interesting things : enemies stats, chest content, item price and also the loaded area from a loading zone. Although I just focus on the stats, it would be easy and fun to find the other things. I made it with Qt and it works to change HP and defense, the others things doesn't depend of the file game.



I am probably going to search the data in the USA version since it would be more convenient for the community, but I just wanted to say that I'm in the process to create a tool for change many things in this game  :D

Lenophis

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 939
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: Paper Mario 64 - General Hacking Tool
« Reply #1 on: April 06, 2014, 12:26:19 am »
Without being a total creeper, the only thing I can say is I love you. :o Love Paper Mario.


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

Raccoon Sam

  • Jr. Member
  • **
  • Posts: 56
  • Left is Right and Right is Wrong
    • View Profile
    • Twitter
Re: Paper Mario 64 - General Hacking Tool
« Reply #2 on: April 07, 2014, 02:22:39 am »
Retriever II has done a lot of work regarding Paper Mario and its sequels.. years ago. For some reason he never made a big fuss about it, but his documents (and a some kind of viewer?) are in his personal server.
Here's a useful text doc, and all of his stuff is here. Everything with a pm-prefix is Paper Mario related.
I don't know how to contact him these days, but if you get a hold of him, he might have some previously unknown valuable PM data.

Either way, looks nice!!

katage

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #3 on: April 07, 2014, 04:44:58 pm »
Retriever's work appears to focus on viewing image files, not on editing stats. Being able to edit stats is a big innovation. I've looked at Retriever's files and it's not clear to me they enable hacking; only viewing.

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #4 on: April 11, 2014, 09:26:27 pm »
Hello guys! Sorry for the delay, but I began my stage a bit after, it seems I posted my news at the wrong time  :(.  Anyways I found HP data for the half of ennemies, I should share it when I will have finished, but if you want it althought I can post it  :).  It was fast because I already mess the game and I knew its operation and the data distance between PAL and US are pretty similar so it's easy to do the same things in the US version. It's also crashless in PJ64 (there was 4 spots of crash issues on PAL), so I could take the middle boss Magikoopa data in the Prologue  :thumbsup:. Also thank you for the post, it could be useful because the text chart is already done (althought I'm not ready to modify the texts in the game).

Find HP, DEF and ATT aren't a really big deal (except 1 HP ennemies), but a thing that I don't understand yet and you could enjoy to test is the attribued status of each attack. I find it by mistake, I think the attack's status is settled before the amount of damages. Example : Pokey Mummy has 2 attacks, hit by a bullet or with his head, each do 2 damages. Before both we have [02 80 28 03 00 00] [02] and [02 80 64 03 00 00] [02]. Both of them poison Mario and if you recall well, the poison with head has an accuracy of 100% so [64], the first one has [28] so it's 40%. It's fun to know, but we can do better by changing the status, I did it with Pokey Mummy and King Crystal and I was happy that it was so easy to do. The condition of the ice beam is [00 00 FE 42 00 00] [06], I exchange both data and we have these results.  8)

         

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #5 on: April 20, 2014, 02:00:40 pm »
- Small Update -

I made a main screen since I want modify items in the shops too. I didn't made a screen for them, but I will work on that for sure.

I was wrong about the time to find values for stats. I found out that there were many occurrences on some ennemies. Ex : Paragoomba is stored 3 times in the game : when you are with Goompa, when you are in Goomba Road later and when you are at East from Toad Town. That makes harder the collect of data so it will be a bit longer to find all of them.

I am also going to share my finds even if that's not much. My program's management is not optimal, but maybe soon I could finish my WIP and ask for feedback with will.
https://docs.google.com/file/d/0BzSek_0oxKC-b1c0bXlzMkVWOTg/edit?pli=1

April 22, 2014, 05:59:18 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Good new guys, a Paper Mario 64 editing tool has releashed today under the name of Origami 64  :crazy:. With advanced data on his side, he has surely a better tool than mine. Since there is someone to handle the project to hack Paper Mario 64, I don't have any reasons to continue besides help to its conception.  8)

EDIT
Sorry for no updating correctly my topic because I cannot post until the next week. I hope people will rewatch this because there's a new, the rom used in the tool is bitswitched, so my data are 1 byte aside. I'm less disappointed and maybe I could post some finds in this game even if I won't do a tool anymore.

I will contribuate to this tool, but I don't see any reasons to continue my tool, that's just the point.

I don't think it's the right place for it but I would like to ask someone if I could change the name of the topic and if yes it must be for the current project or both. I always wanted to change the spaces from Mario Party game by clicking on the rounds over a displayed map on a screen. :) I hope I could start it even if mod don't allow to have nothing to show, we will see folks. ;)
« Last Edit: April 23, 2014, 05:34:17 pm by luigi1er »

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #6 on: May 04, 2014, 08:36:42 pm »
Hi guys! Sorry for not replying but I was a little busy these times... Anyways, I just want to say I get all data from shops (including the badge shop) even if there's a problem with the last. In my document I defined 6 slots in each item shop (16 for the badge), each slot has 3 informations of 2 bytes : the object, the cost and the description (because they didn't change along with object). You just have to do +0x4 to see the next one. After +0x12, you get immediately the next slot.

It's the same with the badge shop, however the cost didn't work even if it would be obviously it. Example : Speedy Spin has a cost data of 50, but if I change it to 51 it doesn't change anything. Someone else should figure it out a way to resolve it because the game seems to manage it in a way I cannot understand.

Also, I begin to search the range of data of each area. There's nothing of interesting to say now, I will probably try to have many of them before I do some tests.

 

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #7 on: May 19, 2014, 05:21:25 pm »
Hi guys  :D

I just found out something of very interesting (not what I wanted but whatever).
By testing area data range I discover that at the end there are many settings.
There, we can find exit destinations of area and guessing the ID of the area.

Example : Tutankoopa's Room ID is isk_16 and the exit destination is the room where there is a save block.
At the end of Tutankoopa's Room we find isk_19 which corresponds at the exit destination ID.

So... Tutankoopa's Room ID = isk_16
Save Block Room ID = isk_19
You can change the exit destination ID to change the Dry Dry Ruins Map.  8)

I tested what happened if I change the exit destination ID for the same and that done the result below.
When I get out by the left, I return in the room but by the right, it's why the camera looks like vey glitchy.
It seems like we cannot do everything and hope there're no issues.  :(



The last thing is the additionnal thing we can find along with the exit destination ID.
The game saves space by loading graphics and collisions from an older area when they repeat themselves many times.
I don't know how many times that happens, but I find it in Bowser's Castle with theses values.

kpa_112_shape...
kpa_112_hit.kpa_
113.kpa_115.....

With these stuffs, we can think the area ID is 114 and the area 112 is similar to it.
There are not really things to do with it as it's not convenient to load the shape and not the hit, but it can give some funny pictures.

     
« Last Edit: May 19, 2014, 11:11:59 pm by luigi1er »

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #8 on: June 03, 2014, 06:17:23 pm »
Hi guys, I am here to share my last finds about ID locations.  8)

By searching the IDs, I found a list where I could gather all abbreviations of areas.
Between [0x73E2C , 0x74BC9], we can find :
  • mac = Toad Town
  • tik = Sewers
  • kgr = Whale's Anatomy
  • kmr = Goomba Places
  • iwa = Mt. Rugged
  • dro = Dry Dry Outpost
  • sbk = Dry Dry Desert
  • isk = Dry Dry Ruins
  • trd = Koopa Bros Fortress
  • nok = Pleasant Path
  • hos = Star Places
  • kpa = Bowser's Castle
  • osr = Peach's Castle Outside
  • kkj = Peach's Castle
  • jan = Lavalava Island
  • mim = Forever Forest
  • obk = Boo's Mansion
  • arn = Gusty Gulch
  • dgb = Tubba Blubba's Castle
  • kzn = Lavalava Volcano
  • flo = Flower Fields
  • sam = Shiver Areas
  • pra = Crystal Palace
  • omo = Shy Guy's Toy Box
  • tst = Debug Room
  • end = Parade
  • mgm = Minigames
  • gv = Game Over Screen
I don't know yet if I will do a list of all locations and post it. Probably I will just fill all locations in a document and provide a link toward it, because testing all side-effects of loading locations doesn't make me want to do it formally. :P When I will have finished it, I focus to find a save block data. :)

Rew

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #9 on: June 13, 2014, 10:12:02 pm »
Very cool! I've seen those location IDs for The Thousand-Year Door and Super Paper Mario, but had no idea the N64 original had them too. I see lots of similarities as well.

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #10 on: June 20, 2014, 04:37:39 pm »
Very cool! I've seen those location IDs for The Thousand-Year Door and Super Paper Mario, but had no idea the N64 original had them too. I see lots of similarities as well.

I didn't know there were the same stuffs in this game too, either someone works on it. I should ask you how you can do that because it takes me 30s to 1min every time to corrupt it (though it's not the right topic for that).  :-X

Anyways, I finally do my document and I will ask you what you think about it before I post it. Because so many areas are not specific, the labels can be confusing so I will wait awhile and make sure it's well done. If everyone agree with the content, I will do.

https://docs.google.com/file/d/0BzSek_0oxKC-N1gxOGJFWlNKbEk/edit

Last thing, I kept my promise about the save block data, I even do the same thing for the heart block. I figured out how changing a save block into a heart block and vice-versa. So the data are :
  • 80 11 1D 38 80 2E 9A 18 = Save Block
  • 80 11 1D 38 80 2E A7 E0 = Heart Block
I don't have many ideas on what I will work right now, maybe allies' stats, who knows?  :thumbsup:


Yoshimaster96

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #11 on: June 25, 2014, 09:45:33 am »
Do you have the hexadecimal area IDs for each of the areas? That would make it a lot easier to go to different areas, as all I'd need would be a cheat program (which I have). If you have them, could you please post them or PM me? I'd like to know.

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #12 on: June 26, 2014, 06:07:07 pm »
Do you have the hexadecimal area IDs for each of the areas? That would make it a lot easier to go to different areas, as all I'd need would be a cheat program (which I have). If you have them, could you please post them or PM me? I'd like to know.

I did the same thing you're going to do, but I didn't list them because the cheat program I use (HxD) allow me to see data in ASCII and to swap the IDs with common letters without get bother with hexdecimals. I can overwrite "mac_00" by "tik_01" just by typing the second one normally. You can simply copy-paste an ID in my document over the one you want to change. So, I don't have them, but I would recommend you to do what I did, it's easier to manage. :)

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #13 on: July 05, 2014, 08:12:24 pm »
Hi guys :D I bring my new find. I was looking for allies' stats, but I didn't find them, so I was searching the dizzy data because Kooper can do it. I wasn't able to find the Kooper's stats, but I figure out how status work (the most of them). :)

I find a data pattern for each attack of ennemies. All attacks have 12 bytes before the number of damages [80 27 CC B4 FF FF FF 81 FE 36 3C ##], but the first four can be used as well. At the end of the 12 bytes, do +16 and you find the number of damages. However, by attack I mean an attack which involves Mario (heal and power-up must have an other pattern and I didn't find it) :(

## can be 80, 8A or 8F (don't know why)  :-[

For the status effects, there are 4 bytes for each, they are 7 bytes behind the number of damages. The first two define the status, there is a list of all of them :
  • [80 08] : Shrink
  • [80 04] : Dizzy
  • [80 02] : Poison
  • [80 00] : Sleep
  • [00 00] : Frozen
The remain has 2 functions : the first determines the number of turns you are affected and the second is the rate to be affected. However they are 3 different patterns for the first. This bytes is special because what it's important it's the second number and changing the other cancels the effect. Here is what that means :
  • 80 02 [03] 64 = Poison while 3 turns 100%
  • 80 00 [13] 14 = Sleeping while 3 turns 20%
  • 00 00 [42] FE = Frozen while 2 turns ???
You can edit a status effect and even add one where there was nothing and add damage points too. :o And Mario cannot be affected on a first strike.

So this is an example for all that stuffs. 8)

Dark Koopa Shell Toss = Mario fall asleep in 20% of cases and for 9 turns :laugh:
Before : 80 27 CC B4 FF FF FF 81 FE 36 3C 80 40 00 00 00 00 00 FF FF [00 00 00 00] 00 00 00 03
After :   80 27 CC B4 FF FF FF 81 FE 36 3C 80 40 00 00 00 00 00 FF FF [80 00 19 14] 00 00 00 03


luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #14 on: July 14, 2014, 07:58:42 pm »
Hi guys, this time I'm providing a powerful thing that cannot be shown so easily. :o I'm talking about the music affectation. With a thorough work, I finally found where areas decide which music they will play and list them in a single room give me the feeling I was in a jukebox... Anyways, for this new I would say to go easy about what I will say, because there are exceptions and exceptions over exceptions. So let's go!

There are actually 3 patterns to find the byte that counts (but there are more) :
  • 05 80 2D 5D 4C
  • 02 80 04 48 9C
  • 03 80 2D 5F F8
The first one is used mostly for all musics (place music, themes and events). The second one is used for the incoming fights, when a battle is about to start the byte is after this pattern. The third is really rare, it's used to change the music for a theme when you talk to a NPC, I only see that on flowers in Chapter 6. For each pattern, the byte is 8 bytes after the pattern. However, the second one is 4 bytes after.

Here is a list of all musics of the game.
https://docs.google.com/file/d/0BzSek_0oxKC-WlRJeE9JWkVoV0U/edit

It's incomplete, but almost all is there. If you check it a little bit, you will notice there are "extras" on some of them, it's where things become difficult. :P Basically, one byte = one music, but sometimes there is a byte further which gives an other result.

Here are some examples :
  • 52 00 00 00 00 = Koopa Bros. Theme
  • 52 00 00 00 01 = With intro
  • 70 00 00 00 00 = Twink's Theme
  • 70 00 00 00 01 = Farewell Twink
The variation byte can change the music from the main byte. If you change that over a no-extra music, it causes either nothing or side effects. In more, it's different for the 17 which the variation byte is further.

With all my founds, I will try to record a short demo to make fun for people who wishes to make a hack for this game. :D To finish this new, I show you I'm able to modify data on Star Spirits' ability. Both of great finds were kind of tricky to find.

See ya later! :)

     

bxbcore

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #15 on: July 20, 2014, 04:15:02 pm »
Wow, your work so far has been amazing! I've been using Origami 64 to mess around with the rom a little bit. My hope is to create a rebalance/difficulty patch at some point. Unfortunately, I'm not too terrific at hex editing. So this is perfect! Thank you for your work on such an awesome game!

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #16 on: July 21, 2014, 10:16:35 pm »
Thank you for your comment, I like sharing my knowledges for this game and giving tools for hackers. I'm currently hacking places though it's a RPG and it's not the best way to change the difficulty, but if it can contribute to your plans as well I'm satisfied.

So this is the new today, I make a short video where I changed some elements to make my finds a little bit consistent and for the entertainment. It can give an idea to people where the paper mario 64 hacking is going on.

http://youtu.be/8nJjtrQCME8

I will probably continue to mess with places, my next challenge will be to figure out where is the setting for a room to be dark or not.

Rew

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #17 on: July 27, 2014, 12:03:36 am »
Hi there, this is looking really great so far. I especially love your post about the music in this game, a couple posts up! I myself am in the process of compiling a full and comprehensive tracklist for the music in this game, so this is timely. We should compare notes! (If you have a USF set, I find it's easiest to take a track, then open up the .miniusf file in a hex editor and change the track number in there to test things out.)

One thing, though--I'm having trouble getting the "Oasis" track to play, which you indicate was at track 17 (then 43 in the extra bit). I tried that, but it only gives me the regular desert music. I've tried it with dozens of other values in that sparse area for #17, and they all play just the ordinary desert theme. I can't get "Oasis." Any tips?

Also, would you happen to know how to get the Toad Town variations to play, or is that something different altogether?

Thanks again!

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #18 on: July 27, 2014, 03:01:21 pm »
I will try to clear up all music stuffs within this reply : "Oasis" is unfortunately like dark areas setting which I'm blocked. I figure out in the oasis area you can play the normal music by switching 43 to 24, but if you do the opposite the game will crash, and I assumed it would work in both ways. :-[ It's not the only exception though, I have problems with "Lava Piranha's Fight" and "Heart Pillar" is tricky too because I found it without pattern and it's surrounded by a lot of strange bytes. Yeah I said there were many exceptions... I cannot explain them yet.

For the Toad Town variations it will be very tough to know for some reasons. 1st - It seems they are not affiliated to any patterns, so it's like the "Heart Pillar". 2nd - It seems they aren't main musics, they are surely variations. Even if I suspect they are in the tight section of the area (at the beginning), I don't know what searching as values so it's like I would find them by chance. It's not like there's nothing else to find out, I'm always looking for battle musics that are loaded within battles like chp 1 and 5. 8)

Otherwise, what do you mean about USF? I don't use it, I use many XML files for areas, musics and etc... and do my tests with them, so I don't know if you're interesting about a USF-like or a real USF file or if it's just a tip, just PM me to make it clear. :)

I will just add I will soon add new stuffs about area loading process, it will be surely the hardest thing I would have found but redoing the game maps will be very possible. ;D

luigi1er

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Paper Mario 64 - General Hacking Tool
« Reply #19 on: August 04, 2014, 02:01:03 pm »
Hi guys, as promised I will provide infos about manipulating the destinations to change the maps of Paper Mario 64. So for this time I will give real adresses because I use more visual clues and because the patterns vary. The data are taken from "Windmill Area".

To begin, I will talk about "directions". The directions data (DD) are the scrypted moves of Mario when he enters or goes away from a loading zone. The DD are well written : each DD occupies a row and begins at the beginning. There are 4 params of 2 bytes separate by 2 [00] : X, Y, Z and Angle. The first 3 are the Mario's position in the new area and the angle is where Mario heads. This range is where they are : 0xbeec80-0xbeecbf. There are 4 : Windmill Door, East, West and Getting the card. Finally, they have an ID in number fairly recognizable : 00, 01, 02 and 03.

Notice, changing it is generally a bad idea, it messes up the process. The only example where it's interesting is when the exit is one way and doorless like when Mario falls from tornadoes.

And now I will talk about the manipulation of exits destination. For each exit, there's 2 bytes that have important functions... actually 3, but as the DD fit well with exits, they should remain with their exit. The first determines which destination will be loaded (ex: arn_08) and the second which exit Mario will go away in the new area. I will explain later how that can be interesting. Here is a table for all the matter :

AdressesDestinationsValuesExits
0xbef263kmr_231402
0xbef747arn_081c00
0xbef7a3arn_032400
0xbef7ffmim_122c01

The adresses are where the datas are. The destinations are where the exits lead. The values are the values at the adresses. There are kind of pointers which go to find destinations at the end of area data. They are ascending and fit with the order of this general pattern, in this case 4 leads toward kmr_23 and arn_03 and c toward arn_08 and mim_12 :

Code: [Select]
0123456789abcdef
€$.ükmr_23..arn_
08..arn_03..mim_
12..............

Finally, exits correpond at the exits ID in the new area. Ex: 02 at kmr_23 means you will have the Getting Card cutscene with Skolar because he is the third Star Spirit. They are always 4 bytes after the adresses over there.

Now I will just give some examples of what you can do with all this news. Like you can see, destinations are written once, but in Forever Forest many ways can lead you at the beginning. It means multiple ways lead at one mim_01 at a specific exit where you can easily go out of the forest. So you can change it to make all exits correct or just one. In more, if you have an area which have 2 exits that lead toward a same area, you can make them pointing on two different areas.