editing module_music

Users who are viewing this thread

Javolenus

Recruit
Hi There,

Please forgive a basic question relating to modding the module_music file. I've already had some help on this, so I feel bad about asking again! But I'm still in need of guidance (my fault as I'm new to this stuff).

Basically, I'd like to take out the original game music and add my own soundtrack. I've already prepared a collection of mp3 files to add. I have one mp3 file called 'theme', which I'd like to when the game starts. I have 12 mp3 files (b001 through to b012) which I'd like to use for battles and 12 mp3 files (p001 to p012) which I'd like to use for 'peaceful' or 'non-battle' stuff like travelling on the map and visiting locations. My idea was that, apart from the theme, these files would play randomly. The only condition is that the 'b' files play during battles and the 'p' files play during peace.

And so, how should I edit the module_music file to achieve this?

I've already read the tutorial on modding music and I've had some extra help from the community, which is great. I feel almost ready to actually mod the music files, but not quite. Any extra help on this would be greatly appreciated. Many thanks in advance for replies!
 
Javolenus said:
Hi There,

Please forgive a basic question relating to modding the module_music file. I've already had some help on this, so I feel bad about asking again! But I'm still in need of guidance (my fault as I'm new to this stuff).

Basically, I'd like to take out the original game music and add my own soundtrack. I've already prepared a collection of mp3 files to add. I have one mp3 file called 'theme', which I'd like to when the game starts. I have 12 mp3 files (b001 through to b012) which I'd like to use for battles and 12 mp3 files (p001 to p012) which I'd like to use for 'peaceful' or 'non-battle' stuff like travelling on the map and visiting locations. My idea was that, apart from the theme, these files would play randomly. The only condition is that the 'b' files play during battles and the 'p' files play during peace.

And so, how should I edit the module_music file to achieve this?

I've already read the tutorial on modding music and I've had some extra help from the community, which is great. I feel almost ready to actually mod the music files, but not quite. Any extra help on this would be greatly appreciated. Many thanks in advance for replies!

I used "Audacity". You can save Audacity files as Ogg Vorbis' (The files that M&B's Music format is).

So, first, download that.
Open your MP3 you want to use.
Save over the old music file (The game's original).

1. Make sure to make back ups!
2. Use some sort of chart to keep track with which ones you have and havn't done.
3. Make sure you don't change the Original Soundtrack's name. (I'm not sure if this makes a difference, but I'm guessing it will).

And that's that :]

Example:

I have Guns n Roses - November Rain.mp3. I want this to be my Bandit Fight Theme song.

So, I open the Guns n Roses mp3 with Audacity, then go to File and Save As Ogg Vorbis.

Then, I look in the music directory for bandit_fight.ogg, then save over. Overwrite? Yes.

Done.
 
Hi Azkanan,

That is a really neat solution! Many thanks indeed - I'm much indebted to you. Excellent! All the best.
 
Javolenus said:
Hi Azkanan,

That is a really neat solution! Many thanks indeed - I'm much indebted to you. Excellent! All the best.

No problem :].

I changed all the songs for Metal ones, hehe. "Dragonforce - Gods of Ice" for the Nordish combats. Dragonforce makes the game very thrilling during battles...

Also, be warned. If you change the songs for ones with words or notable different parts in it, it gets quite repetative. And sometimes they overlap, or only play during menus.
 
Hi, I've made a quite detailed explanation about this on another topic..  :cool: I'll just quote it here.

Note: You don't have to convert to .ogg (at least not in 1.010), .mp3's work fine.
And playing the tracks randomly is quite unnecessary when you can play them specifically..  :wink:

Thymo said:
1. Download module system!

2. Follow the instructions on how to get it to work, and right-click the "module_music.py".

3. Select "edit with IDLE" (or anything you'd prefer over that {NOT notepad..})

4. The spoiler beneath contains how the bottom of the file looks unedited:
  ("victorious_swadian", "victorious_swadian.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir", "victorious_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
]



Copy the second last line, and paste it right beneath, so it looks like the spoiler below..
  ("victorious_swadian", "victorious_swadian.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir", "victorious_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
]

5. Change the two names in the second line (red) to the name of your track.. Example below using "ramund_hin_unge". (remember to edit the type of file if needed {original= ".ogg" and mine's ".wma"})

  ("victorious_swadian", "victorious_swadian.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir", "victorious_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("ramund_hin_unge", "ramund_hin_unge.wma", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
]

6. Add "mtf_module_track" to the description. (this is to tell the file to read from the module folder)..

  ("victorious_swadian", "victorious_swadian.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir", "victorious_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("ramund_hin_unge", "ramund_hin_unge.wma", mtf_module_track|mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
]

7.  Edit/add/replace the description so that the track is played when you want it to play.. Here i have an example to make it play at the very start of Mount&Blade..

  ("victorious_swadian", "victorious_swadian.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir", "victorious_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0),
  ("ramund_hin_unge", "ramund_hin_unge.wma", mtf_module_track|mtf_sit_main_title|mtf_start_immediately, 0),
note that if you want it to play at the start of MnB, you need to put an "#" before the original title song..
(which looks like:smile:
  ("mount_and_blade_title_screen", "mount_and_blade_title_screen.ogg", mtf_sit_main_title|mtf_start_immediately, 0),

(change it to:smile:
#  ("mount_and_blade_title_screen", "mount_and_blade_title_screen.ogg", mtf_sit_main_title|mtf_start_immediately, 0),

8. You can mess around with the MS to play the track when you want it to play by editing the description, or the "mtf's". Just look at how the other tracks are arranged..

9. Add the file of the song to Mount&Blade/Modules/(your mod)/Music

10. Open Mount&Blade and you'll hear the changes..
 
Hi There,

And many thanks for these replies. I have now successfully modded the M&B soundtrack to my liking, thanks to you guys and the suggestions posted above. I really appreciate the help!

All the best,

Jav.
 
Back
Top Bottom