Author Topic: [Tutorial] How to modify/add music in Viking Conquest (by dissecting music.txt)  (Read 11613 times)

0 Members and 1 Guest are viewing this topic.

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
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:

  • 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:

Code: [Select]
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:

(click to show/hide)

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:

(click to show/hide)

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:

(click to show/hide)

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:

(click to show/hide)

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: [Select]
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. :)
-
  • 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:
(click to show/hide)
-
  • 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:
(click to show/hide)


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)
« Last Edit: May 06, 2017, 07:01:36 PM by Der Kopfsammler »
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae


CeltiberoCaesar

  • External Developer
  • *
    • View Profile
  • Faction: Neutral
  • WBVC
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #1 on: August 04, 2015, 11:55:02 AM »
Hi Der Kopfsammler,
Thank you for this complete tutorial. I hope it works for other players that, like you, want to customize the music.  :D Added here: http://forums.taleworlds.com/index.php/topic,323702.0.html
« Last Edit: August 04, 2015, 11:57:44 AM by CeltiberoCaesar »

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #2 on: August 04, 2015, 12:09:47 PM »
Hi Der Kopfsammler,
Thank you for this complete tutorial. I hope it works for other players that, like you, want to customize the music.  :D Added here: http://forums.taleworlds.com/index.php/topic,323702.0.html

Thank you so much! :D I might need to clarify some things in here though, it was 3:30 am when i finished writing all this... :lol:
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae


crazyjoe101

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #3 on: September 27, 2015, 12:42:47 AM »
Thank you very much for this, I am going to try adding some ROME I music right now.

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #4 on: September 27, 2015, 12:50:58 AM »
Thank you very much for this, I am going to try adding some ROME I music right now.

Hey, no problem! :D If you have any questions feel free to ask.
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae


The Onion Knight

  • Recruit
  • *
    • View Profile
  • Faction: Nord
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #5 on: October 25, 2015, 12:25:24 PM »
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?

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #6 on: October 25, 2015, 02:50:54 PM »
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.
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae


Szentgyörgyi

  • Sergeant Knight
  • *
    • View Profile
  • Faction: Nord
  • MP nick: Szentgyorgyi/Kolskegg
  • WBWF&SVC
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #7 on: December 15, 2015, 10:31:06 PM »
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.

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
Re: How to easly modify/add music in Viking Conquest (dissecting music.txt)
« Reply #8 on: December 15, 2015, 11:15:01 PM »
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... :P 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.
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae


Hugo_Stiglitz

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
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.

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
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.
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae


qmax

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Thanks for posting this.  I have found that ogg's still work though.  And I have so many added music files (108) 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

Crnobog

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Thanks for tutorial.

My playlist.

(click to show/hide)

DaVincix

  • Veteran
  • *
    • View Profile
    • Published Modding Activities, 2005 - 2019
  • Faction: Neutral
  • WBNWVCM&BWF&S
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.

Der Kopfsammler

  • Sergeant at Arms
  • *
  • What do i type here again?
    • View Profile
  • Faction: Nord
  • MP nick: DerKopfsammler
  • WBVCWF&SNW
Thanks for posting this.  I have found that ogg's still work though.  And I have so many added music files (108) 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

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. :D I will edit the OP to match that info (and giving you credit of course).
Hostis Humani Generis Nunc Et In Hora Mortis Nostrae