Adding Custom Music to Mount & Blade: Warband

Adding Custom Music to Mount & Blade: Warband

0 - Specifications And Basics

Mount & Blade: Warband uses .ogg[filext.com] files for audio

For the process laid out in this guide, you will probably require a program that converts files to different formats. There are free ones that work and don't suck, such as FormatFactory[format-factory.en.softonic.com] . Also, it can be helpful to have a media player that can play .ogg files, so that you can check your work and also preview the default soundtrack files. I recommend VLC[www.videolan.org] for this task.

The default music files are found in the folder '...\MountBlade Warband\music'. If you installed your game via Steam on a Windows operating system, the full path will most likely be 'C:\Program Files (x86)\Steam\steamapps\common\MountBlade Warband\music'

If you installed your game via Steam on a Windows operating system and if you are using a Warband module that has been installed in the standard way* - such that they can be selected in the Warband launcher -, the folder into which you will put your custom music - and the folder that contains any of the mod's existing music - is most likely 'C:\Program Files (x86)\Steam\steamapps\common\MountBlade Warband\Modules\<Module Name>\Music'

*If you use Steam Workshop to download and play mods, you must extract the mod files out of your workshop directory in order to follow the steps in this tutorial. I've created a mini-guide to demonstrate how this is done.

1 - Introduction

The purpose of this tutorial is to teach an end user how to incorporate the music of their choosing into their Mount & Blade: Warband experience, fully leveraging the game's contextual cues. Contexts you say? Here's an example: You encounter and enter battle with bandits. The music that plays will be a track that you chose to apply specifically to when you battle bandits. In the game files - in the Native (AKA 'Vanilla') game -, the corresponding audio track is called 'bandit_fight.ogg'. Now, it is worth noting that many contexts in Mount & Blade do not have their own exclusive tracks, but instead share tracks with other situations. For example, just because a certain track might be called 'lords_hall_nord.ogg' doesn't mean you won't hear it playing while you're riding around the valleys of Rhodok.

Anyhow, because of the modular, versatile nature of the music engine, you can replace as much or as little of the original soundtrack (OST) as you desire. For my part, I wasn't ambitious enough to replace the majority of minor tracks, such as the retreat or defeat tracks, but I did replace all of the town, battle, ambush and travel tracks.

As a side note, this process is a great way to discover what music 'contexts' you've been experiencing this whole time without really thinking about it.

This did take me several hours to do, with only minor breaks and replacing about 85% of the OST. Also consider that before I began, I was already familiar with all of the 3rd-party tools that I used. Therefore, I cannot declare this is quick and easy, but if you're like me and music is very central to your enjoyment of video games, the time it takes will be well worth the effort. If you decide to dive into adding new entries to music.txt, that's going to add a substantial amount of time due to the less than obvious nature of how music.txt works. You may find that you need to play through the game a bit and figure out how where particular tracks play and how they behave when you change what you're doing in-game (opening menus, closing menus, talking to parties on the world map, etc)

2 - Preparing Your Game Files


Adding Custom Music to Mount & Blade: Warband image 12
Adding Custom Music to Mount & Blade: Warband image 13
Adding Custom Music to Mount & Blade: Warband image 14
Adding Custom Music to Mount & Blade: Warband image 15

I would highly recommend that, before you begin, you set aside a completely new copy of the 'music' folder from the game files. Not the module files, the actual default 'music' folder located in the game's main directory (please refer to section 0 for more info).

Rename the copy something that makes sense to you. For instance, I called mine 'Checklist' which will make sense in Section 3. Even if you are using a module which adds its own custom music this step is important, because there's no gaurantee that they replaced all or some of the game's OST. They may have just added new tracks to compliment the old ones.

Additionally, if you are not simply customizing the music in the Native game and instead are customizing the music of a module that has music that has been added by the modder, you need to create a copy of that module's 'Music' folder as well (please refer to section 0 for where to find module-specific music).

Now take a moment to familiarize yourself with what tracks exist in the default/module music/Music. This is the time you should be thinking about how tracks from your own music library can fit into the world. Thankfully, the vast majority of tracks in the OST have that classic naming convention hailing from the early 90's - every song is named specifically for where it crops up in the game experience. Some of the tracks here may look unfamiliar; I'm fairly positive that some of them don't show up in the game at all or are only played on very rare occasions.

Here's what the contents of the music and Music folders should look like (assuming you've associated .ogg files with VLC Media Player =P )

(Prophecy of Pendor 3.611)

3 - Replacing Existing Tracks


Adding Custom Music to Mount & Blade: Warband image 23
Adding Custom Music to Mount & Blade: Warband image 24
Adding Custom Music to Mount & Blade: Warband image 25
Adding Custom Music to Mount & Blade: Warband image 26

To replace a track from the OST with your own, you first have to make sure that your Music is in the proper format. .ogg is the file extension you need, so if your songs are all .m4a for instance, then you will need to use a 3rd-party program to convert them. I use a program called 'FormatFactory' to do this. It's probably not a great program in the scheme of things, but it's simple, it's free and it doesn't install viruses and adware (to my knowledge; User descretion is advised!)

Once you have some .ogg files to throw around, simply place them into the folder inside your module called 'Music' with a capital 'M' then rename each file to correspond to a file from the OST. Do not place custom Music into the game folder under the top directory called music. This is unnecessary, and here is why: a neat feature of the music engine is that, if a track in the Music folder has the same name as a track in the music folder (notice the lower-case 'm', indicating the default music files) the engine will choose the custom Music, overriding the game's default OST. What all this means is that, all you have to do is drop .ogg files into the module Music folder and rename them to override the specific song from the OST you want to replace. It's that simple.

Now, as you replace songs, you need to keep track of those which you have already replaced, as the number of files in your Music folder can quickly become too many to keep track of. What I like to do is simply delete the corresponding track from the new copy of the music folder, so I know what tracks are left to be replaced. That's why I call the copy 'Checklist'.

If you are replacing mod music, then the step is slightly different. The tracks you're replacing are already in the Music folder, so you should not only delete the corresponding duplicates in the copy of their Music folder, you should also completely overwrite the existing tracks in the Music folder proper. If you actually wanted to keep the mod music intact, consider creating yet another copy of the Music folder - perhaps called '<Module Name> Music Backup' - and putting it somewhere for safekeeping.

4 - Stepping It Up


Adding Custom Music to Mount & Blade: Warband image 32

Before continuing further, I would advise creating a clean copy of the music.txt located in C:\Program Files (x86)\Steam\steamapps\common\MountBlade Warband\Modules\Native and rename it (i.e. nativemusic.txt). Or if you intend to play a mod, create a clean copy of the music.txt located in that module folder and rename that (i.e. modmusic.txt).

Without further adue, it is entirely possible to add even more tracks to your own personal soundtrack! What I'm saying is, you can add additional entries to the master list of tracks, beyond the existing entries found in music.txt. However, my experience so far would indicate that attempting to do so can yield unexpected results.

For instance, I wanted to add more variety to the tracks I heard while fighting in the arena. So what I did is I added some new lines to music.txt that look like this:

Upon doing so, I noticed that the tracks begin playing after I click 'Fight in next round' and end when I finish that round of the arena (win or lose). Therefore, looking at how the line in the text file is formatted, I had assumed that each number represented the cue that causes this track to start playing if there is no track already playing or to stop playing if this track is already playing.

However, careful observation would tend to prevent that notion from applying to all tracks in general; Take the entries 'capture.ogg' or 'escape.ogg', for example. They definitely only play during very specific, special times during the game, but they all share the same pattern: '<filename> 256 256'. I can easily verify, these tracks do not ever overlap and yet there doesn't appear to be any way of differentiating them if you were to, for example, rename them.

I wish I could properly explain how music.txt works, but doing so is going to require some time observing when certain tracks play and how they behave when switching between contexts in the game. The other alternative would be to install the module system and take a look at the uncompiled code, but I have no desire to dive that deeply into this.

5 - Enjoy!

Now you can kick ass to your favorite tracks! If you want to get even more crazy, try using another 3rd party program (e.g Audacity[audacityteam.org] ) to cut clips from longer tracks, creating the perfect little 'toast' tracks to replace the victory, defeat and retreat contexts! After all, it sounds a bit weird when your victory tracks continue playing after you've already closed the screen and are now riding along towards your next adventure!

Please give me any and all feedback regarding this guide. If you read through this guide at all, please rate it! Until next time, keep your blade sharp and your wits sharper, because in the game of thrones, you win or you die. There is no middle ground.

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=557995902					

More Mount & Blade: Warband guilds