B Tutorial Other How to modify/add music in Viking Conquest (by dissecting music.txt)

Users who are viewing this thread

Hello, im a long time lurker to the forum here, but im not here to introduce myself. :oops: For a while i searched the forums about ways to add new music into the game, and the only results i got was to modify the main *.py files, wich for a person that doesnt understand anything of code like me, its very complicated... And all i wanted was to change the music ingame, not to alter the main files completely. :ohdear:

There were a few posts mentioning to replace the music using the same names, and changing the music.txt file, (most of them unsucessfuly) but what they didnt mentioned is:

[list type=decimal]
[*]The altered music doesnt need to have the same original file name.
[*]The order in the lines doesnt have to be the same.
[*]You can ADD new musics while keeping the original ones inplace, altering only music.txt files throught the "code" numbers infront of the music files in order to make the music play in specific scenarios, like this one:
[/list]

Code:
viking_raid.wav 272629888 272629888

Although this works for every single Mount & Blade title, and any mod that changes the music, keep in mind this changes are for the music.txt file specificly for Viking Conquest Reforged Edition, found in (your prefered game install location)\MountBlade Warband\Modules\Viking Conquest , and ill be "decyphering" (if you wanna call it that way) the numbers infront of each file from the music.txt file.

NOTE: ALLWAYS remember to make a BACKUP before starting modding or changing anything. Backup music.txt, and the entire Music folder for this.

So the first thing you find as soon as you open your "music.txt" file is something like this:

Code:
55
silentio.wav 0 0
viking_raid.wav 272629888 272629888
celtic_legend.wav 268500992 269050368
nordicorchstra.wav 268500992 269033984
celtic.wav 268500992 269033984
go_bikes.wav 268500992 269033984
werihukka.wav 268500992 269033984
nabia_orebia.wav 268500992 269033984
celtic_legend.wav 268443648 269050368
celtic.wav 268443648 269050368
samania_aracillum.wav 268443648 268968448
viking_raid.wav 268443648 268968448
iberus_flumen.wav 285213184 285213184
celtic_spirit.wav 285213184 285213184
day_of_war.wav 268451840 269050368
celtic_legend.wav 268451840 269050368
fallen_warrior.wav 268451840 269050368
theancients.wav 268435456 268435456
day_of_war.wav 268566528 268566528
werihukka.wav 268566528 268566528
go_bikes.wav 268566528 268566528
viking_raid.wav 268440576 268440576
celtic_spirit.wav 268440576 268440576
day_of_war.wav 268440576 268440576
go_bikes.wav 268440576 268440576
solemnfuneralpyre.wav 268697600 268702720
samania_aracillum.wav 268697600 268702720
day_of_war.wav 268439552 268702720
samania_aracillum.wav 268439552 268702720
solemnfuneralpyre.wav 268468224 268468224
viking_raid.wav 276824064 276824064
viking_raid.wav 268437504 268437504
celtic_spirit.wav 268437504 268437504
theancients.wav 268437504 268437504
celtic_legend.wav 268437504 268437504
fallen_warrior.wav 268437504 268437504
nordicorchstra.wav 268437504 268437504
tras_la_galerna.wav 268435456 268435456
mons_vindius.wav 268435456 268435456
go_bikes.wav 268435456 268435456
theancients.wav 268435456 268435456
fallen_warrior.wav 268435456 268435456
viking_raid.wav 268436480 268436480
samania_aracillum.wav 268435456 268435456
nordicorchstra.wav 268959744 269033984
fallen_warrior.wav 268435456 268435456
solemnfuneralpyre.wav 268435456 268435456
solemnfuneralpyre.wav 268500992 269033984
fallen_warrior.wav 268500992 269033984
solemnfuneralpyre.wav 268500992 269033984
celtic_legend.wav 268435712 268435712
viking_raid.wav 268435712 268435712
ballad_of_a_hero.wav 268435456 268435456
battle_ambient_1.wav 301989888 301989888
battle_ambient_2.wav 301989888 301989888

It doesnt take long to understand that the first line with the "55" is the number of lines bellow, and the second line for the "silence" between the transitions from each music. Notice how theres plenty of similar codes to distribute through the 20 different scenarios on wich the appropriate music file (located in the Music folder) is played. Each numeral code in there represents a scenario, like when you're roaming through towns, or visiting taverns, or when you go to battle, etc. The codes and lines are not in a specific order, wich tells us that the order itself on wich the lines and codes are placed are not important at all. I tested this theory by changing the order of the lines and it didnt affected how the music was played during the game.

So what we want to do here now is to identify to wich scenarios do those numeral codes represents, and for that we need to make only one single song to play on each single scenario, then go into the game, and see when and where those songs plays so we can make notes and start adding our own songs.

The first thing i did was to trim down the number lines to make it as one single code for one single music in specific, carefully checking and deleting the repeated numeral codes for each song, dividing the music in it for each different code, because as you can see in the original file, the same musics can play in multiple different scenarios, and since there was only 20 music files inside the Music folder to those 20 scenarios, this was the end result:

Code:
20
silentio.wav 0 0
viking_raid.wav 272629888 272629888
ballad_of_a_hero.wav 268443648 268968448 
celtic.wav 268440576 268440576
celtic_spirit.wav 276824064 276824064
day_of_war.wav 268437504 268437504
fallen_warrior.wav 268436480 268436480
viking_raid.wav 268435712 268435712
mons_vindius.wav 268500992 269050368
nabia_orebia.wav 268443648 269050368
celtic_legend.wav 268451840 269050368
nordicorchstra.wav 268500992 269033984
theancients.wav 268959744 269033984
go_bikes.wav 268566528 268566528
tras_la_galerna.wav 268435456 268435456
samania_aracillum.wav 268697600 268702720
werihukka.wav 268439552 268702720
iberus_flumen.wav 285213184 285213184
solemnfuneralpyre.wav 268468224 268468224
battle_ambient_1.wav 301989888 301989888

I dont know exactly how important is to change the first line, but i did to match the number of lines anyways, from "55" to just "20", also i didnt altered the second line either. I backed up my music.txt file, replaced with this modified version, and played the game, making different things in game from traveling the map, battles, entering towns, entering villages, taverns, tournaments, etc. From the various playthroughs and pointing the different musics played during the scenarios i managed to identify some of the different numeral codes, but i kept the rest in blank for the ones that never played during my experimental play sessions:

Code:
20                                                    = Number of lines bellow
silentio.wav 0 0                                      = Nothing
viking_raid.wav 272629888 272629888                   = Menu music
ballad_of_a_hero.wav 268443648 268968448              = Village theme 
celtic.wav 268440576 268440576                        = Battle theme
celtic_spirit.wav 276824064 276824064                 = Plays after a victorious battle
day_of_war.wav 268437504 268437504                    = 
fallen_warrior.wav 268436480 268436480                =
viking_raid.wav 268435712 268435712                   =
mons_vindius.wav 268500992 269050368                  = Plays in Monasteries / villages
nabia_orebia.wav 268443648 269050368                  = Village theme 2
celtic_legend.wav 268451840 269050368                 = Theme for sneaking enemy towns
nordicorchstra.wav 268500992 269033984                = Plays during map travel and sometimes monastery
theancients.wav 268959744 269033984                   =
go_bikes.wav 268566528 268566528                      = Plays during battle / tournaments
tras_la_galerna.wav 268435456 268435456               =
samania_aracillum.wav 268697600 268702720             =
werihukka.wav 268439552 268702720                     = hard battle theme (when youre outnumbered)
iberus_flumen.wav 285213184 285213184                 = Plays in Taverns Mead Halls and Feasts
solemnfuneralpyre.wav 268468224 268468224             = Plays after you're defeated in battle
battle_ambient_1.wav 301989888 301989888              = Ambient Sound for villages/towns

I also noticed after a second playthrough that the musics that didnt played in single person, often played during multiplayer matches, but i didnt pointed them out because i dont play multiplayer that often. But i might update the list above if is there anyone interested in changing the multiplayer music as well, if i can confirm that.

So based on the information we collected, we can start adding our very own files! :party:

Keep in mind that the important part in the music.txt file in order for it to work in the scenario you wish for it to play is to have the music you want to play INSIDE the Music folder, and add/change the line you wish inside the music.txt file, adding/replacing the name of your music file in it and adding one of the following codes of the scenario you wish for it to play in front of it:

Code:
14                              = Number of lines bellow
0 0                                                    = Nothing
272629888 272629888                    = Menu music
268443648 268968448                    = Village theme 
268440576 268440576                    = Battle theme
276824064 276824064                    = Plays after a victorious battle
268500992 269050368                    = Plays in Monasteries / villages
268443648 269050368                    = Village theme 2
268451840 269050368                    = Theme for sneaking enemy towns
268500992 269033984                    = Plays during map travel and sometimes monastery
268566528 268566528                    = Plays during battle / tournaments
268439552 268702720                    = hard battle theme (when youre outnumbered)
285213184 285213184                    = Plays in Taverns Mead Halls and Feasts
268468224 268468224                    = Plays after you're defeated in battle
301989888 301989888                    = Ambient Sound for villages/towns

For example, if you have the songs "harlem_shake.wav", "justin_beiber.wav", and "song_of_our_people2.wav" and you want to play "harlem_shake.wav" when youre in a mead hall or in a feast, or when you wish to have the "song_of_our_people2.wav" being played during battle, or when you wish to anger yourself a bit before loading your game file by playing "justin_bieber.wav" in the main menu, you just need to put those files into the Music folder, and add or replace the lines in music.txt like this:

Code:
4
silentio.wav 0 0
harlem_shake.wav 268566528 268566528
justin_bieber.wav 272629888 272629888
song_of_our_people2.wav 268440576 268440576

A few important notes:

  • The older version of Viking Conquest used *.OGG files, however, the Reforged Editon of VC uses *.WAV files. So you'll need to change your music files to the *.WAV format using any convertion tool like Audacity or an online music file converter like http://audio.online-convert.com/convert-to-wav , before putting them in the Music folder. If you have "bananas.mp3" and you add "bananas.wav" on the music.txt, it will not work. NOTE: According to qmax and DaVincix, using *.OGG files still works on the Reforged Edition as well, so if you have *.OGG music files, you dont need to convert them to *.WAV ones. Just make sure the file name in the music.txt matches the file name and extension. Thank you both for that information. :smile:
-

  • Dont use special characters or spaces when adding new files in the Music folder or music.txt or the music wont play in game, keep the names simple, like for example calling it "battle1.wav", instead of "Crushing the Skull of Our enemies.wav". Use only numerals, alphabetic characters and "_" .
-

  • It is safe to delete the vanilla music files from the Music folder and from their respective lines in the music.txt but i highly recomend keeping the "silentio.wav" inside the folder and the music.txt line, and allways remember to change the first line to match the respective number of lines you add/delete. If you have several lines added and you dont want to count them all one by one, just copy them (without the first numeral line of course), paste them on this site, http://textmechanic.com/Count-Text.html , and replace the number of the first line with the number of lines counted in there.
-

  • You can add more than one music for each scenario. So if you have two or five or even ten songs you wish to play during battle or during traveling, just add them and put the respective codes in front of them in the music.txt file, like this for example:
Code:
battletheme1.wav 268440576 268440576
epic_battle_theme.wav 268440576 268440576
-

  • And by the same way you can add more than one music for each scenario, you can also add more than one scenario for each music. So if you wish to add the same song to play when youre in a feast or tavern, and when you go to sneak in town, just add the same music twice on the music.txt and the respective scenario codes in front, like this:
Code:
jamesbond.wav 268451840 269050368
jamesbond.wav 268500992 269033984


I hope this helps you to understand how easy it is to manually modify and add music in game without messing with the *.py files. Remember, this also works for the other game titles, and any mod that changes the music files. Feel free to ask anything and ill try to help or clarify as much as i can.

Cheers, and happy modding!  :mrgreen:

(edit: fixing the broken spoiler)
 
CeltiberoCaesar said:
Hi Der Kopfsammler,
Thank you for this complete tutorial. I hope it works for other players that, like you, want to customize the music.  :grin: Added here: http://forums.taleworlds.com/index.php/topic,323702.0.html

Thank you so much! :grin: I might need to clarify some things in here though, it was 3:30 am when i finished writing all this... :lol:
 
This is great! but what happens when you only have one song for a scenario and it ends (repeats?)? and what if you have more than one song and one of them ends, does it play the next one?
 
The Onion Knight said:
This is great! but what happens when you only have one song for a scenario and it ends (repeats?)? and what if you have more than one song and one of them ends, does it play the next one?

Usually it plays the next one, but im not sure if its in a randomized order or not because i never put them in order before. I havent tested at full extent when we only have just one, but when i was experimenting to identify the numbers in each scenario it kept playing between that single song and the "silence" one, and repeating.
 
I always change warband music, according to mod/dlc's setting. Most of it comes from other games (mostly total war series, CK2, KoH - old game this last one) or medieval bands/musicians.

In the case of Viking Conquest, even though the original soundtrack is wonderful as it is, I knew I just had to include some tracks from the Banner Saga ever since I played that game (forgettable  as far as gameplay  goes,  but has a captivating story and memorable soundtrack). Fits the viking theme rather well, I recommend it highly to anyone looking to add a bit of variety.

Here's the full playlist, the particular song is one of my favorites. If you don't have the game, you can still get the soundtrack for like 5$ or so.
 
Szentgyörgyi said:
I always change warband music, according to mod/dlc's setting. Most of it comes from other games (mostly total war series, CK2, KoH - old game this last one) or medieval bands/musicians.

In the case of Viking Conquest, even though the original soundtrack is wonderful as it is, I knew I just had to include some tracks from the Banner Saga ever since I played that game (forgettable  as far as gameplay  goes,  but has a captivating story and memorable soundtrack). Fits the viking theme rather well, I recommend it highly to anyone looking to add a bit of variety.

Here's the full playlist, the particular song is one of my favorites. If you don't have the game, you can still get the soundtrack for like 5$ or so.

Ive only heard good things about that game, i never tried it myself though, so now i regret it after hearing such masterpiece... :razz: Thanks for that!

I personally play with this one added (too bad the game isnt as good as the soundtrack itself), some from this band (from the Vikings series), and some from the vanilla game itself.
 
I realize this thread is quite old. Since so much time has passed I'm wondering are there any stand alone music mods out there that I can just download and install? I'm okay with modding stuff in games, but have 8 sutures in my right hand and not really up to getting elbows deep into modding VC.
 
Hugo_Stiglitz said:
I realize this thread is quite old. Since so much time has passed I'm wondering are there any stand alone music mods out there that I can just download and install? I'm okay with modding stuff in games, but have 8 sutures in my right hand and not really up to getting elbows deep into modding VC.

With a quick search i only managed to find this one but i havent tested it myself yet - http://www.moddb.com/games/mount-blade-warband-viking-conquest/addons/mb-vc-re-music-pack
There might be a few more, but people's perference from music varies alot, thats why its better to change it to each one's perferece instead.
 
Thanks for posting this.  I have found that ogg's still work though.  And I have so many added music files (10:cool: that I need to do a little organization.  I use the following format and put all of my additions at the end of the music.txt file.  This way I can see exactly what categories I am using what music in.  Tr for travel, Ba for battle, etc.    z_ba_conan.ogg 268436480 268436480
 
Thanks for tutorial.

My playlist.

Code:
45
silentio.wav 0 0
viking_raid.wav 272629888 272629888
bjarkan.wav 268500992 269050368
ehwar.wav 268500992 269033984
algir_tognatale.wav 268500992 269033984
heimta_thurs.wav 268500992 269033984
f_svitjod.wav 268500992 269033984
f_jag_vet_ett.wav 268500992 269033984
f_den_grymma.wav 268500992 269033984
bjarkan.wav 268443648 269050368
viking_raid.wav 268443648 268968448
iberus_flumen.wav 285213184 285213184
pertho.wav 285213184 285213184
bjarkan.wav 268451840 269050368
theancients.wav 268435456 268435456
hagal.wav 268566528 268566528
fehu.wav 268566528 268566528
dagr.wav 268566528 268566528
helvegen.wav 268566528 268566528
viking_raid.wav 268440576 268440576
fehu.wav 268440576 268440576
iwar.wav 268440576 268440576
dagr.wav 268440576 268440576
helvegen.wav 268440576 268440576
ar_var_alda.wav 268697600 268702720
f_resan.wav 268439552 268702720
loyndomsriss.wav 268439552 268702720
f_hels_skote.wav 268468224 268468224
viking_raid.wav 276824064 276824064
viking_raid.wav 268437504 268437504
theancients.wav 268437504 268437504
bjarkan.wav 268437504 268437504
fallen_warrior.wav 268437504 268437504
ehwar.wav 268437504 268437504
tras_la_galerna.wav 268435712 268435712
mons_vindius.wav 268435712 268435712
helvegen.wav 268435712 268435712
theancients.wav 268435712 268435712
fallen_warrior.wav 268435712 268435712
viking_raid.wav 268436480 268436480
ehwar.wav 268959744 269033984
pertho.wav 268435456 268435456
viking_raid.wav 268435712 268435712
battle_ambient_1.wav 301989888 301989888
battle_ambient_2.wav 301989888 301989888
 
Just to mention it as well. Splendid tutorial!

I've put in some CK2 songs (.ogg format). Confirming, that .ogg titles implemented play properly in VC.
 
qmax said:
Thanks for posting this.  I have found that ogg's still work though.  And I have so many added music files (10:cool: that I need to do a little organization.  I use the following format and put all of my additions at the end of the music.txt file.  This way I can see exactly what categories I am using what music in.  Tr for travel, Ba for battle, etc.    z_ba_conan.ogg 268436480 268436480

DaVincix said:
Just to mention it as well. Splendid tutorial!

I've put in some CK2 songs (.ogg format). Confirming, that .ogg titles implemented play properly in VC.

Thank you for letting me know. :grin: I will edit the OP to match that info (and giving you credit of course).
 
Easy way to add a soundtrack to any module.

1. Convert to format - wav, ogg, mp3
2. Rename soundtrack to simple name (btl_battlemusic.mp3)
3. Place all music to main folder "Mount&Blade Warband/music/". You can easy manage your tracks after step 2. You can use music in the main folder in any module.
4. Add strings to "module/Vicking Conquest/music.txt" or any other module. Open music.txt with AkelPad or Notepad++
Add tracks with this numbers:
battle.mp3 7168 7168
travel.mp3  65536 598528
arena.mp3  131072 131072
tavern&feast.mp3 16777728 16777728
feastonly.mp3 16777216 16777216
tavernonly.mp3 512 512

Add as many tracks as you can. Look at the number of the last string. At the top of this file is number of the strings minus one. Change it and save file.

My playlist for Vicking Conquest:
Battle music:

Wardruna - Ehwar https://youtu.be/ppwmwNBx9dM
Sephiroth - Germanic War Drums https://youtu.be/perM4JVZsxo
epic viking battle music - to valhalla https://youtu.be/kLTbBnBS3gE
Danheim - Tyrfing https://youtu.be/oYImXYb1WRo
Wardruna - Völuspá https://youtu.be/6loWrABr8gA
War of the Vikings OST - Terror From the Sea - https://youtu.be/sApiSZDBGTI
Wardruna Algir-tognatale - https://youtu.be/V-Rj1GS9anA
War of the Vikings OST - Green and Pleasant Land - https://youtu.be/n_mK4gjqb5Y
An Danzza - Rúnatal Óðins Rune Song https://youtu.be/ZQ3aNjz1ObU
Brunuhville - Spirit of the Wild https://youtu.be/g-jGHbkM8e4
Epic pagan battle music - The God of Thunder https://youtu.be/NwawjAMTfx4
War of the Vikings OST - The Throne of Wessex https://youtu.be/4oKOPILDDqk
Cerritus Ballare - Villeman Og Magnhild

Travel music:
West One Music - Across the Oceans
Wardruna - Helvegen https://youtu.be/UIHOV07XoDQ
Fever Ray - If I Had A Heart https://youtu.be/EBAzlNJonO8
Garmarna - Herr Mannelig https://youtu.be/Cy44ocuoWhE
Faun - Unda https://youtu.be/xKF3ps4nH2o
 
Vetrogor said:
Easy way to add a soundtrack to any module.

1. Convert to format - wav, ogg, mp3
2. Rename soundtrack to simple name (btl_battlemusic.mp3)
3. Place all music to main folder "Mount&Blade Warband/music/". You can easy manage your tracks after step 2. You can use music in the main folder in any module.
4. Add strings to "module/Vicking Conquest/music.txt" or any other module. Open music.txt with AkelPad or Notepad++
Add tracks with this numbers:
battle.mp3 7168 7168
travel.mp3  65536 598528
arena.mp3  131072 131072
tavern&feast.mp3 16777728 16777728
feastonly.mp3 16777216 16777216
tavernonly.mp3 512 512

Add as many tracks as you can. Look at the number of the last string. At the top of this file is number of the strings minus one. Change it and save file.

My playlist for Vicking Conquest:
Battle music:

Wardruna - Ehwar https://youtu.be/ppwmwNBx9dM
Sephiroth - Germanic War Drums https://youtu.be/perM4JVZsxo
epic viking battle music - to valhalla https://youtu.be/kLTbBnBS3gE
Danheim - Tyrfing https://youtu.be/oYImXYb1WRo
Wardruna - Völuspá https://youtu.be/6loWrABr8gA
War of the Vikings OST - Terror From the Sea - https://youtu.be/sApiSZDBGTI
Wardruna Algir-tognatale - https://youtu.be/V-Rj1GS9anA
War of the Vikings OST - Green and Pleasant Land - https://youtu.be/n_mK4gjqb5Y
An Danzza - Rúnatal Óðins Rune Song https://youtu.be/ZQ3aNjz1ObU
Brunuhville - Spirit of the Wild https://youtu.be/g-jGHbkM8e4
Epic pagan battle music - The God of Thunder https://youtu.be/NwawjAMTfx4
War of the Vikings OST - The Throne of Wessex https://youtu.be/4oKOPILDDqk
Cerritus Ballare - Villeman Og Magnhild

Travel music:
West One Music - Across the Oceans
Wardruna - Helvegen https://youtu.be/UIHOV07XoDQ
Fever Ray - If I Had A Heart https://youtu.be/EBAzlNJonO8
Garmarna - Herr Mannelig https://youtu.be/Cy44ocuoWhE
Faun - Unda https://youtu.be/xKF3ps4nH2o

Hello,
I want to know why the numbers of battle victory change so much between sources? , so some say 8388864 8388864 or 276824064 276824064 or 276824080 276824080 what is then the correct options for new mods, the coding we have at vc or the one used in native? Because my mods keeps using the victory songs from native..
 
Alevort said:
the coding we have at vc or the one used in native? Because my mods keeps using the victory songs from native..

see module_music.py for the description of those flags (magic numbers) to understand what they do.

Code:
#map travel
("travel_1",
   "celtic_legend.wav",
   mtf_module_track|mtf_sit_travel,
   mtf_sit_travel|mtf_sit_town|mtf_sit_tavern|mtf_sit_night|mtf_sit_military),

if you want to keep the same overall mechanic for a sound track, then keep the same numbers.
 
Back
Top Bottom