Post tutorial Report RSS Replace Music in Alice: Madness Returns

This article will go over extracting music from the A:MR archives, replacing it, and repacking it to work in the game.

Posted by on - Basic Music

NOTE:

This may or may not work. Some music files work, some don't. I don't know why. Bitrate, length, volume, compression... maybe these are factors? Maybe not? Maybe I'm just crazy.

TOOLS YOU WILL NEED:

  • aoTuV encoder b5: Ao-yumi.github.io
  • Audacity audio editor (download on your own, this isn't hard to find)
  • UPKPacker: Zenhax.com
  • Hex Editor like HxD (download on your own, this isn't hard to find)
  • Command Prompt on Windows machines.


HOW TO DO IT:

  • Use UPKUnpacker to unpack a umap file, namely the file you want to edit (AliceEntry.umap to edit the Main Menu and Credits music)
  • Copy the SoundNodeWave file of the song you want to mod to somewhere else (Cello_Orch_LOOP is the Main Menu music)
  • Open this SoundNodeWave in a Hex Editor (HxD?) and strip away everything from the first byte up to the point where the first "OggS" starts. Save this modded file as a separate OGG file. This is the original sound file. Take note of the bitrate (44100? 20500?) as you will need to mimic this when making your custom sound. The closer you make your custom sound to the original, the less of a chance it will crash the game.
  • Make a signed 16 bit PCM Wave file in something like Audacity. Make sure the bit rate is set correctly too. If it can't be exact, go the closest you can that is a little bit over, that's what I find to be the safe option.
  • Convert it to OGG with the venc tool, make sure to specify -q2.5 as the quality setting (THIS MIGHT NOT WORK WITH ALL FILES, THIS WAS JUST TESTED WITH THE MENU MUSIC. You might need to experiment more.)
  • Open the OGG file you made, as well as the SoundNodeWave in a Hex Editor, I like to use HxD
  • Copy everything from the first byte up to the point where you see the first OggS from the SoundNodeWave file to the OGG you made. Do an Insert Paste, meaning it puts the data at the beginning rather than overwriting.
  • In that header you just pasted, go back 8 bytes from the end of the pasted header. You should see 4 bytes that look exactly the same (example: G$..G$.. in HxD). These are 2 separate 4 byte numbers, meant to represent the size of the contained OGG file, minus 32 bytes. Replace these hex byte values with the raw size of the OGG you made, minus 32
  • Save this frankenstein-file as the new SoundNodeWave that will replace the original one in the game
  • Paste the modded SoundNodeWave back in the UPKUnpacker working directory, and make sure to rename it appropriately so it overwrites the file you want to mod. Do NOT leave ANY residual or extra files
  • Use UPKRepacker to repack the UMAP file
  • Name the UMAP file appropriately, and paste it into the Madness Returns game files, overwriting the original one.
  • Lastly, using the same general process as above, unpack and repack the modded UMAP's associated Localization UPK (example: Chapter1_W2_Music_01.umap <---> Chapter1_W2_Music_01_LOC_INT.upk). You don't have to change anything within the unpacked UPK, just unpack it and repack it, then replace the game's stock UPK with your new one you just made. This is done to simply decompress the UPK. For some reason, decompressing a modded UMAP's associated UPK seems to help the game tolerate much larger music mods (although still not a guarantee everything will work). I don't know why this is, don't ask
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: