Modifying the RAM of A Link Between Worlds

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by MichiS97, Jul 29, 2015.

  1. MichiS97
    OP

    MichiS97 "Leftist snowflake milennial"

    Member
    GBAtemp Patron
    MichiS97 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    1,359
    759
    Jun 14, 2011
    Germany
    Munich
    First off, this isn't really about ROM hacking but I didn't know in which subforum this thread would fit better...

    I've been trying to make a cheat plugin for the PAL version of ALBW since yesterday but I'm having quite a lot of problems with it. I've got the basic offsets which are easy to find like current and max. health, rupees and monster horns/guts/claws. However, I'd like to add a bottle modifier because I want to have infinite fairies (I'm doing this in every Zelda game where it's possible because I like the idea of being able to count how often I've died without actually going game over). Now, my problem is that I just can't find the offsets needed to pull this off. From looking at some decrypted save files I got some of the item ID's down (I hope that they're the correct ones): A bottled fairy equals 0x15, empty bottle = 0x16, golden bee in a bottle = 0x14, Boomerang = 0x03.
    Well, from my experience I thought it would be easy to look for the offset of one specific item slot by putting one of the items I know the ID of into the slot and then scan a RAM dump for the IDs. If only it was that easy....

    This method gives me three addresses (0x03091FF4, 0x031A2444, 0x031A2445, though this weren't exactly the offsets I used since I had to add 0x14000000 to them to use them with NTR CFW). As I examined these offsets I noticed that all three do not store the item ID in the slot I chose but instead hold the item ID of the last item you had selected in the menu (by selecting I don't mean asssigning them to one of the attack buttons but simply putting the cursor onto them in the inventory screen). When you are in the inventory screen and select the Boomerang for example 0x03091FF4 would have the value 0x03, which confirms the ID I found using the save files) and I coincidentally found out that 0x03091FF3 would have the value of 0x01. Now if you'd leave the inventory screen or select a slot that doesn't have any item in it 0x03091FF4 would still have the value 0x03 but 0x03091FF3 would now have the value 0x00. The other two addresses always the hold the item you selected last, exactly like 0x03091FF4 in the sense that they still hold the same value they had before when you leave the menu or when you select an empty slot. Setting the three addresses to 0x15 which is the value of a bottled fairy, doesn't do anything, no matter if you set the values only temporarily by using NTR Debugger or freeze the addresses with a cheat plugin. Sometimes the item description will show a fairy regardless of which item you select in the inventory but the icon on the touchscreen still shows the real item and they still behave normally after assigining them to a attack button.

    I'm pretty experienced with RAM hacking in general but this is really driving me nuts. How could I go about finding the offset of one specific item slot? Obviously making multiple RAM dumps and changing the item in the slot after each one doesn't do the trick.