- 3
- Posts
- 185
- Days
- Seen Nov 14, 2024
Hi everyone! I'm brand new to rom hacking so I need a little help here. I'm working on the pret/pokeemerald and I recently finished adding 4x more bag pockets. I successfully did that & it works great!
So my next step was to change the bag sprite in the menu to that of Diamond/Pearl to better reflect the additional pockets. I never found a tutorial for changing the bag sprite (except for old binary guides), but I found a few things about changing sprites in general.
With that, I found the sprites for the different pockets and resized them to 64x64 and merged them into a vertical sprite sheet just like the bag_female.png & bag_male.png. I opened them in graphicsgale to change color depth to 4bpp, changed their background/transparent color to the same as the original sprites, saved & exported the new files to replace _female.png & _male.png.
I also exported the palettes of each as bag_female.pal & bag_male.pal to replace bag.pal as they had slightly different palettes. I also edited every reference to BagPalette to BagMalePalette and added a BagFemalePallete counterpart in those locations. I finally edited case 4 in src/item_menu.c. I mirrored case 3 with the if (IsWallysBag() = TRUE…) to load the male bag palette else load the female bag palette.
I noticed in src/item_menu_icons.c that the ANIMCMD_FRAME increased by +64 for each bag pocket after the closed bag at the top of _male.png & _female.png; so I replicated those values & calculated the frames for the new pockets. I also noticed further down the file that the const struct for each of their sprite sheets had a 0x3000 which is 12 kB (2 kB for each 64x64 pocket on the sprite). My new sprites needed 18 kB (2 kB x 9 (8 pockets + closed bag)). So I changed 0x3000 to 0x47FF.
Everything seemed in order, so I manually deleted the old .4bpp and .lz files and did a "make clean" to be safe. I then did a fresh "make". I didn't receive any errors this time so I thought I did everything correctly. Booted up the rom and made a male character, went through the intro, & opened the bag…blank/black screen with no change no matter which buttons I pressed. Rebooted the rom and chose a female character, and when I finally opened the bag…same thing happened.
I don't know what else to do from here! Any help would be appreciated! Thanks in advance!
So my next step was to change the bag sprite in the menu to that of Diamond/Pearl to better reflect the additional pockets. I never found a tutorial for changing the bag sprite (except for old binary guides), but I found a few things about changing sprites in general.
With that, I found the sprites for the different pockets and resized them to 64x64 and merged them into a vertical sprite sheet just like the bag_female.png & bag_male.png. I opened them in graphicsgale to change color depth to 4bpp, changed their background/transparent color to the same as the original sprites, saved & exported the new files to replace _female.png & _male.png.
I also exported the palettes of each as bag_female.pal & bag_male.pal to replace bag.pal as they had slightly different palettes. I also edited every reference to BagPalette to BagMalePalette and added a BagFemalePallete counterpart in those locations. I finally edited case 4 in src/item_menu.c. I mirrored case 3 with the if (IsWallysBag() = TRUE…) to load the male bag palette else load the female bag palette.
I noticed in src/item_menu_icons.c that the ANIMCMD_FRAME increased by +64 for each bag pocket after the closed bag at the top of _male.png & _female.png; so I replicated those values & calculated the frames for the new pockets. I also noticed further down the file that the const struct for each of their sprite sheets had a 0x3000 which is 12 kB (2 kB for each 64x64 pocket on the sprite). My new sprites needed 18 kB (2 kB x 9 (8 pockets + closed bag)). So I changed 0x3000 to 0x47FF.
Everything seemed in order, so I manually deleted the old .4bpp and .lz files and did a "make clean" to be safe. I then did a fresh "make". I didn't receive any errors this time so I thought I did everything correctly. Booted up the rom and made a male character, went through the intro, & opened the bag…blank/black screen with no change no matter which buttons I pressed. Rebooted the rom and chose a female character, and when I finally opened the bag…same thing happened.
I don't know what else to do from here! Any help would be appreciated! Thanks in advance!