Since version 1.0, mnb’s soundtrack has been enriched, with many new tracks added, and the corresponding playback conditions are relatively more detailed. Although this allows the soundtrack to be played more timely in various situations, the numerous soundtracks Defining conditions also adds a little trouble to our DIY music. I see that many friends want to add their favorite music to 1.0 but there is no good way, so here is a method to add music by simply modifying music.txt.
1. First, let’s analyze all the entries in music.txt one by one: #The following is the explanation
63 #The total number of music.
cant_find_this.ogg 0 0 #Invalid soundtrack, ignore it.
mount_and_blade_title_screen.ogg 4194432 4194432 #The soundtrack of the title screen. Plays only on title screen.
ambushed_by_neutral.ogg 266240 267264 #Battle soundtrack. When encountering the wild camp.
ambushed_by_khergit.ogg 266244 267327 #Battle soundtrack. When encountering the Kugit camp.
ambushed_by_nord.ogg 266248 267327 #Battle soundtrack. When encountering the Nord camp.
ambushed_by_rhodok.ogg 266256 267327 #Battle soundtrack. When encountering Rodok's camp.
ambushed_by_swadian.ogg 266241 267327 #Battle soundtrack. When encountering the Rui Erdian camp.
ambushed_by_vaegir.ogg 266242 267327 #Battle soundtrack. When encountering the Vekia camp.
arena_1.ogg 131072 131072 #Arena soundtrack.
armorer.ogg 65536 65536 #General large map background soundtrack. Random track 1.
bandit_fight.ogg 5120 5120 #Fight soundtrack. Common encounters.
calm_night_2.ogg 524288 598528 #Night background soundtrack. Towns, taverns, large maps.
capture.ogg 256 256 #The soundtrack when the player is defeated and captured.
defeated_by_neutral.ogg 33024 33024 #Soundtrack after the current battle fails, random track 1.
defeated_by_neutral_2.ogg 33024 33024 #Soundtrack after the current battle fails, random track 2.
defeated_by_neutral_3.ogg 33024 33024 #Soundtrack after the current battle fails, random track 3.
empty_village.ogg 256 256 #Village scene soundtrack.
encounter_hotile_nords.ogg 2097408 2097408 #The soundtrack when entering enemy territory.
escape.ogg 256 256 #The soundtrack when escaping after being captured.
fight_1.ogg 5120 5120 #Universal battle soundtrack. Random track 1.
fight_2.ogg 5120 5120 #Universal battle soundtrack. Random track 2.
fight_3.ogg 5120 5120 #Universal battle soundtrack. Random track 3.
fight_as_khergit.ogg 5124 5183 #Fight soundtrack. When the player is affiliated with the Kugit camp.
(The first 10 seconds are very similar to "Jackie Chan" on FC)
fight_as_nord.ogg 5128 5183 #Fight soundtrack. When the player is affiliated with the Nord camp.
fight_as_rhodok.ogg 5136 5183 #Fight soundtrack. When the player is affiliated with Rhodok camp.
fight_as_vaegir.ogg 5122 5183 #Fight soundtrack. When the player is affiliated with the Wikia camp.
fight_while_mounted_1.ogg 5120 5120 #Battle soundtrack, when fighting with cavalry troops (Rui Erdian?). Random track 1.
fight_while_mounted_2.ogg 5120 5120 #Battle soundtrack, when fighting with cavalry troops (Rui Erdian?). Random track 2.
infiltration_khergit.ogg 16388 16447 #The soundtrack when infiltrating into a hostile Khergit camp city.
killed_by_khergit.ogg 33028 33028 #The soundtrack when the player is defeated by the Khergit army.
killed_by_swadian.ogg 33025 33025 #The soundtrack when the player is defeated by the Ruidian army.
lords_hall_khergit.ogg 65540 598591 #The soundtrack when entering the Lords Hall of the Khergit camp.
lords_hall_nord.ogg 65536 598528 #The soundtrack when entering the Lords Hall of the Nord camp.
lords_hall_swadian.ogg 65536 598528 #The soundtrack when entering the Lords Hall of the Ruidian camp.
lords_hall_rhodok.ogg 65536 598528 #The soundtrack when entering the lord hall of Rhodok camp.
lords_hall_vaegir.ogg 65536 598528 #The soundtrack when entering the Lords Hall of the Vikia camp.
mounted_snow_terrain_calm.ogg 65536 598528 #General large map background soundtrack. Random track 2.
neutral_infiltration.ogg 16384 16384 #Universal soundtrack for infiltrating hostile cities.
outdoor_beautiful_land.ogg 65536 598528 #General large map background soundtrack. Random track 3.
retreat.ogg 33024 33024 #Universal soundtrack when the battle is lost.
seige_neutral.ogg 262144 267264 #Universal city wall defense soundtrack.
tavern_1.ogg 512 512 #Tavern soundtrack. Random track 1.
tavern_2.ogg 512 512 #Tavern soundtrack. Random track 2.
town_neutral.ogg 73728 598528 #Universal town scene soundtrack.
town_khergit.ogg 73732 598591 #Khergit camp town scene soundtrack.
town_nord.ogg 73736 598591 #Nord camp town scene soundtrack.
town_rhodok.ogg 73744 598591 #Rhodok camp town scene soundtrack.
town_swadian.ogg 73729 598591 #Rui Erdian camp town scene soundtrack.
town_vaegir.ogg 73730 598591 #Vekia camp town scene soundtrack.
travel_khergit.ogg 65540 598591 #Large map background soundtrack. The player is in Kugit territory.
travel_neutral.ogg 65536 598528 #General large map background soundtrack. Random track 4.
travel_nord.ogg 65544 598591 #Large map background soundtrack. The player is in Nord territory.
travel_rhodok.ogg 65552 598591 #Large map background soundtrack. The player is in Rhodok territory.
travel_swadian.ogg 65537 598591 #Large map background soundtrack. The player is in Ruidian territory.
travel_vaegir.ogg 65538 598591 #Large map background soundtrack. The player is in Wikia territory.
uncertain_homestead.ogg 65536 598528 #General large map background soundtrack. Random track 5.
victorious_evil.ogg 256 256 #Enemy’s victory soundtrack.
victorious_neutral_1.ogg 8388864 8388864 #Normal victory soundtrack. Random track 1.
victorious_neutral_2.ogg 8388864 8388864 #Normal victory soundtrack. Random track 2.
victorious_neutral_3.ogg 8388864 8388864 #Normal victory soundtrack. Random track 3.
victorious_swadian.ogg 8388866 8388866 #Victorious soundtrack when the player is affiliated with the Ruidian camp.
victorious_vaegir.ogg 8388866 8388866 #The victory soundtrack when the player is affiliated with the Vaegir camp. Random track 1.
victorious_vaegir_2.ogg 8388866 8388866 #The victory soundtrack when the player is affiliated with the Vaegir camp. Random track 2.
#Some music can be adapted to various occasions. For example, most of the soundtracks in map mode can continue to play without being interrupted when entering towns, taverns, and resting. For specific settings, please refer to header_music.py and module_music.py in 1.0ModuleSystem.
2. Modification method:
1. Simple replacement method.
For example, if you want to add a battle music, you can rename it fight_1.ogg, and then replace the file with the same name in the music folder of the mnb root directory. Music files in other formats can also be used directly. For example, replace the above with fight_1.mp3. There is no need to convert to .ogg format.
2. You can also copy items that meet the playback conditions and add them newly.
For example, if you want to add a general battle song named fight_4.mp3, you can copy "fight_1.ogg 5120 5120" and paste it into the last line of the file, and modify it to "fight_4.mp3 5120 5120", and then Just add +1 to the number in the first line (add as many songs as the total number increases). For example, 63+1=64 means changing 63 to 64.
Note: New songs must be placed in the music folder in the mnb root directory, not the music folder in the mod directory.
In addition: If you want to place the new song in the music folder in the mod directory, you must add 268435456 to the two numbers after the music name. The explanation of the principle can be found here: How to let the game recognize the music file in the MOD folder. The only difference is that there are two numbers after the 1.0 music name, and 268435456 must be added to both paragraphs. For example, "fight_4.mp3 5120 5120" in the second point above needs to be changed to "fight_4.mp3 268440576 268440576".
Refer to the post of oolonglgx (Lao Li) on the Chinese Qiqiao Chinese website.