Hacking Question Game Mods? like Moon Jump

  • Thread starter Thread starter MS2189
  • Start date Start date
  • Views Views 2,985
  • Replies Replies 4

MS2189

New Member
Newbie
Joined
Jul 10, 2018
Messages
2
Reaction score
0
Trophies
0
Age
45
XP
83
Country
Germany
Hey there,

i was wondering how it is possible to mod a game? like Mario Odyssey for Moon Jump?
 
I don't think there is going to be a useful tutorial at this point, or if it is then it is going to be very long and in depth.

If a machine has an emulator then you have two main approaches.
1) Use inbuilt cheat finding options.
2) Attach a program like emuhaste, artmoney or whatever else the kids are using to said emulator and it looks at the game's memory, can compare values, pause things, stop when a value is reached basically the same thing as a debugging/cheating emulator.

If you don't have emulation for a machine then you want a means to debug it still. For the PSP there was some nice USB stuff, on the DS (though we did have other means) some flash carts gave you the option, for the 3ds then as it was a fairly modern system we could use its OS to pull things, the GC and Wii had stuff like the USB gecko. A bit clunky and slower to use in some instances than emulators you can do all manner of things with just by clicking but still gets it done.

Neither of those are available for the general public for the Switch right now. Might well come at some point but I have no timeline.

You can still do things though for on top of this you also have ROM hacking. There is also some limited save editing but outside of giving yourself max whatever in RPGs or unlocking every level then save editing is of limited use, give or take the weirdness like splatoon 2 custom weapon setups.

Anyway ROM hacking. I cover some of the basic tools here https://gbatemp.net/threads/i-would...tch-where-should-i-start.510187/#post-8116775 as well as the current methods for loading them up, or at least how to get there.

Moon jump varies from game to game. Typically it breaks down into two categories, possibly three.
1) The game has double jump. Here it is normally implemented as "jump, check to see if jump button is pressed, if second jump been done flag has not been set then if jump button is pressed do another jump, set second jump has been done flag". The cheat then tends to hold that second jump has been done flag as not done and thus you have moon jump.
2) If there is no double (or triple or....) jump then you first check to see if there is a stat governing jumping. Set this as ridiculous (or somehow alter it so the calculation it does makes it a ridiculous height) and you have your moon jump. If there is no stat then you need to find the routine governing jumping and edit that.

Cheats as implemented by a ROM hacker.
If you don't have a nice cheat engine you can still add cheats as a ROM hacker. We did used to do it on the original DS
https://gbatemp.net/threads/crackers-ds-trainer-maker-tutorial.44410/
I also have a worked example of turning a cheat into an assembly hack on the GBA in https://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2016-edition-out.73394/
Short version is you either alter instructions handling the value you want to make a cheat for or add a routine to the vblank (or some other constantly run routine within the game) to constantly (or selectively) write the area handling what you want.
This might get slightly trickier with the switch as its memory handling might have some security get in the way depending upon what you are doing, and being a modern console its memory can be dynamically allocated (which is to say while the pattern will likely be the same it could appear at essentially random points in memory) where a lot of older devices did not and the same area would handle the same data every time the game was booted up for everybody. Or if you prefer read up on C pointers and releasing memory as it will make things apparent why that can happen.
You will want to tell me now that I mentioned there are no nice options for memory dumping and whatnot. Yep. If you don't want to code your own for that game (you might be able to add a routine to dump it over network or something -- http://netcat.sourceforge.net/ might be something to run on the PC to take the raw data in rather than having to do full bore implementation of SSH in your game, you might also be able to dump it to SD or even one of those fancy wifi SD cards and pull it off as the game runs) then you have two main choices.
1) Hardcore disassembly -- if you have it all in front of you (and at this point you very much can) then you can figure it out. The time investment will be considerable though.
2) Following a save. In an RPG you will likely have your character stats in a nice save file. Get that so you can read it and know what is in it (assuming you can get past the encryption then it is easy enough -- you can do much the same as normal cheat finding for this one like save, do nothing else but use a poition, dump the save, use a potion, save, dump the save.... and compare the lot). The save loading routine should be fairly obvious and then tell you where the save data lands. Anything that reaches out and looks at the location the save data ended up in RAM is of interest to you and you can then start figuring out things more useful to you. As mentioned earlier though not everything is going to have useful data in a save if cheating and modding is for you.

Some of the people doing development inject their own custom error codes into things, this is interesting as you might have a means to abuse that as well here (I don't know if like a lot of PC programs they dump memory to attach it to an error report. Adding something to trigger a fault and thus dump memory).

All this said nothing I have written here should really have been new to you in the broad sense if you are going to make much headway on the cheating front. While I have no timeline for a memory dumper and light hardware debug setup it is a very desirable thing so I am not expecting too terribly long a wait. Once that arrives it will become far easier.
If you want to edit games a la that thread I mentioned above then go nuts. You will still be blazing a trail but data representation is data representation and much the same whether you are working on a NES, a PC, a switch, something obscure from Japan in the 70s, a game or an accounting program.
 

Site & Scene News

Popular threads in this forum