• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] Switching music offsets in Emerald

117
Posts
10
Years
  • In Sappy 2006 mod 17., Is it possibly to switch the music played in battle or any other miscellaneous in game for Emerald.
    For example: The battle music plays the unused FR/LG battle musics also changing the bike and surfing music to something else.
    Alt method:Is there a tool or an Hex offset to make that work? ---Thanks
     

    Wobbu

    bunger bunger bunger bunger
    2,794
    Posts
    12
    Years
  • While viewing a song in Sappy, there will be a label that says "Table 0x06Bxxxx"
    There will be another label that says "Header 0x0XXXXXX"

    Keep track of those numbers for the songs you want to replace.

    The Table offset will point you to that song's pointer in the song table. Navigate to that offset in a hex editor and replace the song's pointer offset with the Header offset for the song that you want to replace with.

    For example, if you want to replace the Littleroot Test song with the GS Route 38 song, copy the GS Route 38 header, which should be 0x0904850, and navigate to the Table offset of Littleroot Test using a hex editor, which should be 0x06B54E0. At that offset, you should see something like "00 07 00 00 78 44 90 08." Those last four bytes should be the offset of the Littleroot Test header, but reversed. Change those last four bytes to the reversed offset of the GS Route 38 header, and now the Route 38 music will be played instead of the Littleroot Test.
     
    Last edited:
    30
    Posts
    20
    Years
    • Seen Apr 21, 2020
    That literally just replaces the pointer to the song though. What if you still wanted to use that song elsewhere in the game? I think what op was asking is if there is something like, a value that determines which song out of the list of all of them is used for things like battles, evolution, and other "system" functions that you normally don't/can't reassign. I've been wondering this myself, actually D:
     

    Wobbu

    bunger bunger bunger bunger
    2,794
    Posts
    12
    Years
  • That literally just replaces the pointer to the song though. What if you still wanted to use that song elsewhere in the game? I think what op was asking is if there is something like, a value that determines which song out of the list of all of them is used for things like battles, evolution, and other "system" functions that you normally don't/can't reassign. I've been wondering this myself, actually D:

    You could just swap the pointers between the two songs using a hex editor. However yes, somewhere in the data lies a pointer or byte that tells the game what the default battle theme is, etc. But I do not know where those are. You could try looking for the song's header offset in a hex editor to see if it lies elsewhere besides the song table, but I am unsure if the game uses a pointer or an index to determine what song to play.
     
    30
    Posts
    20
    Years
    • Seen Apr 21, 2020
    Aha! Getting warmer. Emerald stores the index number of the current song to be played at 0x03000f48 in memory. If you made a game shark code you could force it to play any song when a battle is entered (or just in general) ... I have to run out so I can't look in to this further just yet, but in theory you could trace whatever is writing to this memory address when a wild battle begins and probably find out where it's pulling the number from (for reference, 0x01DA is the value for the Hoenn Wild Battle, 0x01FE is the Kanto battle theme) Perhaps yourself or someone else could look in to it further while I'm out.
     
    Back
    Top