[Guide] Animal Crossing New Horizons Custom Music

Animal Crossing New Horizons Custom Music


Mod custom music into Animal Crossing: New Horizons

Things you'll need:
- BWAV encoder (https://github.com/Extrasklep/revolution, latest master branch and not the latest release) or a BWAV file from https://smashcustommusic.net/
- BARS patcher (https://github.com/Extrasklep/bars-patcher) or the online patcher here https://smashcustommusic.net/onlinetools/bars-patcher/
- A dump of the game's files or at least the /Sound directory


Step 1: Find a song
Find the song that you want to mod into your game.
If the song you want is from another game you can search for it on smashcustommusic.net, download a BWAV directly from the website and skip steps 2-3.


Step 2: Prepare the song
The Revolution file converter requires a WAV at it's input so if your song is a different format like mp3, ogg, flac or other you'll have to convert it to WAV first.
The simplest way to do it is using FFMPEG:
ffmpeg -i yourfile.mp3/ogg/flac yourfile.wav
but you can use any other program to do it.
If you want to replace a K.K. song in the game then you'll also to have to mix the song into a 1 channel mono file.

Step 2.1: Loop points
The usual loop point stuff: open your file in Audacity or similar program, set the time counter to display the sample number, find a good loop point and copy the sample number.
If you need more details about this look on other Nintendo game custom music guides.
You can also skip this step if you don't care about having a proper loop and just set the loop point to 0 later.


Step 3: Encode the BWAV file
Compile the Revolution BRSTM tools if you didn't do it yet.
I will some day make an easy to use GUI for it with builds for Linux, Mac OS and Windows
Run this command:
./brstm_converter yourfile.wav -o youroutputfile.bwav -l [Put your loop sample number here]
If the conversion was successful you should now have a BWAV file at your output file path.

Step 4: Patching the BARS file
You'll need to patch a BARS file in the game for the song to play correctly.
I'm pretty sure all of the main songs in /Sound/Resource/Stream are in /Sound/Resource/Bgm_Base.bars
Copy the BARS file and the BWAV file you want to replace into some local work directory. If you're replacing K.K. music (aircheck versions) copy all 4 versions of the BWAV files (Hifi, Retro, Cheap, Phono).

Patching the file with the command line patcher:
Compile the patcher with a standard C++ compiler without any special flags
./bars-patcher -i Bgm_Base.bars -o Bgm_Base.bars.patch -og BWAV_file_from_the_game.bwav -patch Your_custom_BWAV.bwav
Online patcher:
https://smashcustommusic.net/onlinetools/bars-patcher/
Put the Bgm_Base.bars file in the BARS file field, the BWAV from the game in the Original BWAV field and your custom BWAV file in the Patch BWAV field.
If you can't use the solutions above and you really hate yourself you should also be able to manually do it in a hex editor:
Open the BARS file, original BWAV file and your custom BWAV file in the hex editor.
From the original file copy the 4 bytes at offset 0x08 (CRC32 checksum).
Switch to the BARS file and use a search function to find those 4 bytes.
Switch to the custom BWAV file and copy all the bytes from the beginning until a chunk of 00's (should be around 160/0x9F bytes in 2 channel files).
Switch to the BARS file, make sure you're in overwrite mode and paste the copied bytes in the correct place (so the BWAV word is in the same place as before).
When replacing K.K. music you'll have to repeat this 4 times for each version of the original BWAV file and make copies of your custom BWAV file to replace all the versions in the game files.

Step 5: Put the files in the game
Name your files correctly and put them in the game's files using whatever methods for modding switch games there are.
You should now be able to boot up the game and hear your custom music.

Post a Comment

0 Comments