1. AsierMR

    OP AsierMR Member
    Newcomer

    Joined:
    Aug 8, 2020
    Messages:
    30
    Country:
    Spain
    I'm pretty new to romhacks, i've only tried moving and renaming some files, but i wanna know how i can change the actual code of the game, so i can create more menus, more objects...
    I'll appreciate any help

    PD: sorry if my english is bad
     
  2. FAST6191

    FAST6191 Techromancer
    Reporter

    Joined:
    Nov 21, 2005
    Messages:
    33,453
    Country:
    United Kingdom
    That may be jumping in at the deep end. Some modern PC games might have something more available here but most console stuff "adding a new menu item" is probably one of the harder things you can do -- you might well involve graphics, text, the internal game logic, expanding game binaries and more besides in doing it, graphics and text then being what most start out learning on but the rest can get very in depth.

    I have a guide mostly focused on the GBA and DS here
    https://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2016-edition-out.73394/
     
  3. AsierMR

    OP AsierMR Member
    Newcomer

    Joined:
    Aug 8, 2020
    Messages:
    30
    Country:
    Spain
    I couldnt find anything that could help me but thanks anyways
     
  4. FAST6191

    FAST6191 Techromancer
    Reporter

    Joined:
    Nov 21, 2005
    Messages:
    33,453
    Country:
    United Kingdom
    OK you will need to find the binary. Binary being the term given to piece of code that sits in memory and the CPU runs/jumps around/responds to the contents of. Mostly such a binary should be instructions to run but sometimes there will be random bits of game asset in there as well (often including menus as they are so small a dev might not want to kick it to an external file).

    The Wii had two processors though you will mostly only be using the powerpc core (the ARM one being reserved more for IOS stuff) and maybe fiddling with the GPU.
    This would be the DOL format, a minor variation on a more popular format. Compression and protection (encryption is more of a disc level thing than a file level one) might also get in the way.
    http://wiibrew.org/wiki/Category:File_formats
    Said site also covers the hardware pretty well, but you might want to look at dolphin source code.

    Anyway you will then need to find the menu handling code. Tracing is likely the path taken here, find something a menu does and watch that, any break on whatever will tell you the instructions leading up to that point so you follow it back and back until you get what you want, alternatively you might break on a certain button read and follow it on from there. Once you have that you get to figure out any wrapping options (when it gets to the bottom does it go to the top, how does it know to do this, how does it know to stop...) and expand it by however many you need and add triggers for them. Now you want to do something with those menus so you get to code in whatever extra functionality you need doing there, and find a place in the game binary (which might not have much space available -- expanding a binary is a trick proposition when everything is built to expect things to be in a given location in memory) to do the deed. The extra functionality is then all you as I don't know what your hack wants to be here (refill stats, level jump, auto run, sort inventory, inventory quick slot... all very different hacks really and all things someone might do).
    On top of this if it is a fixed size background for it (many games are as such things don't tend to change) you will also need to sort graphics lest you not have a background or the last entry sits over the fancy border of the menu background and can't easily be read/generally looks unprofessional. You will also want to know what encoding (which might be custom and different to the rest of the game) and length determinant (some games use fixed, some will have lengths/pointers). Maybe you get lucky and it is an auto recalculating logic based upon something nice like XML with similarly paired logic (not that you will likely know this before you pull the thing apart to begin with) but outside of the PC I very rarely see anything like that, and even on the PC it is not exactly common.
    If all this sounds mightily annoying to do it is because it is. Text, graphics, audio and levels might have some leeway to pull and prod but that is because modern game designers realised that such things change all the time during development (and you might want to reuse the engine, make sequels, make DLC, translate it to another language and whatnot) and make things accordingly, it is possible to do programming that way too but it is expensive in time and system resources so basically nobody does that, especially not in games. To that end when I said your hack speaks to the heart of a game I really meant it. If you can then see if you can implement it as a cheat -- refill health or something being quite amenable to that, always run not being much worse (there will likely be a flag when you have some item equipped or button pressed, find that and trip it or change the thing that checks the flag), quick select potion doable as well (even taking one away afterwards)
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - creating, romhack,