How to add custom music int M&B and any of its mods ?

Users who are viewing this thread

unity100

Veteran
i have gone through stickies, i have gone through forum search, in the end i had to go through google search.

all i found was old stuff no longer valid with current modding system. most horribly, new stuff that had links had links to old stuff, and even some forum pages no longer there. even if its there, its damn hard to find or weed out. (there are links to how to edit models, scenery, python, this that, but nothing that says 'music' or 'sound')

i wont be able to afford  spending my prime time friday evening going through tens of pages of hundred page threads only to end up with dead links or old information, so i am just asking it here. i very much hope that since title contains 'custom music' and 'mod', someone else will be able to directly find this when they search for those keywords in future and evade the same thing.

i have music files in my modules' music folders. i have music.txt in the modules' folders, i placed the music files inside the module's music directory, and set 'scan module sounds' to 1 in module.ini , and even added the song names to module's music.txt manually.

i tried putting in numbers exactly the same with some other music files (ie, random battle music 1 or 2).

but my music wont play. despite the exact same music plays in another mod, i just cant supplant it into another mod.

what am i doing wrong ?


===============================================

in the end i managed it myself. here is what you need to do :

- first , have your new music files ready in ogg vorbis format. (ogg) or mp3 format. how you are going to do this is related to sound formats and conversions, you can find sources and freeware apps on the net for this.
- second, place your new music files in your mod folder. 'Mountandbladedirectory/Modules/Yourmodulesname/Music
- then, open module.ini in the Yourmodulesname/ directory above, and set scan_module_sounds to 1
- open the music.txt in Yourmodulesname/ directory. you will see a number on the top, and music file names, and then numbers. i dont know what numbers mean, but they denote occasions to play music files. for example in SoD 4.5 Gold beta, i have 5120 next to generic combat music files. so 5120 denotes generic combat music. it is this occasion i want my music to play. therefore, at the end of the file, i first add the exact name of my music file (as it is in your operating system, like mymusic&thenagainsomemore.ogg ), then next to it add the number seed like the others above. ie ( mymusic&thenagainsomemore.ogg 5120 5120 will make that music play in random combat scenes).
- afterwards, just increment the number on the top of the file above according to the number of music files you added. if it was 65 before you added yours, make it 66. if you added two, make it 67 and so on.
- run the mod and play.

with this your music file should work. it should seed randomly from the files seeded similarly. (ie having the similar number ids for scenes).
 
They don't need to be in OGG format, you can use MP3. There should be other supported formats too, and since mp3 is supported I daresay WAV will be as well.
 
Back
Top Bottom