This guide is for people who want to change the music theme in the game without removing (replacing) the original music theme, so they can always revert back to the old, original music. Heroes 5 use music files in the OGG[1] format. To put a custom piece of music in the game one needs to convert it to that format.
Requirements[]
Download and install Mp3 to OGG converter[2] software. For the purpose of the guide we will use a song named "River.mp3" and we will change the sound of Heroes V main menu.
Prepare music file for Heroes V[]
Make music file compatible for the game engine[]
- Take any song file in mp3 format.
- Use the converter application to convert it from MP3 to OGG. The file is now "River.ogg".
- Go to Heroes 5 game installation and create a new folder with a name of your choice in "<Game installation>\Music\<name of your choice>".
- Place the converted OGG music file in that new directory "<Game installation>\Music\<name of your choice>\River.ogg".
Configure the game to use the new music file[]
Now we have to edit the file that is responsible for holding all the music pieces the game uses.
- Browse "<Game installation>\data\data.pak"[3] archive[4] with any archiver program.
- Go to "data.pak => /Sounds/_(Music)/MainMenu"
- Inside there are there MainMenu files, each one responsible for different Heroes V release.
- MainMenu.xdb - Heroes V
- a1-MainMenu.xdb - Heroes V - Hammers of Fate
- a2-MainMenu.xdb - Heroes V - Tribes of the East
- Extract a2-MainMenu.xdb file from the archive.
- Open the file with text editor.
- Find line that starts with <FileName>. It holds the path to the music file used for the main menu.
- Change the value of the line to <FileName>..\Music\<name of your choice>\River.ogg</FileName>

Launch the game and test.