L4D Custom Music Tutorial
There are 7 steps to adding custom music to your campaign in Left 4 Dead:
- Create a text file called [your_exact_map_name]_level_sounds.txt in your addons maps directory.
- Copy ALL the contents from my example soundscript into that file.
- In the missions file of your addon, find the NAME parameter, and pick a short name that has no spaces.
- In notepad, press CTRL + H, to find and replace XXXXX with the same name you used in missions.txt NAME field.
- Begin replacing any wav files you choose in the script to reference your own files. (Do not include sounds/ in the paths, it's assumed)
- BSPZIP or PAKRAT your custom music into the map .bsp file. (The paths for each wav file within the bsp should be sounds/music/your_custom_folder)
- Packadge your campaign into a .VPK and test it out ingame, your custom music should work!
Custom Music Script File
This is the example soundscript you need to copy.
It is a stripped version of the game_sounds_music.txt to only include the Events you need to edit for your campaign. Using it fixes a bug with soundscripts where zombies would play an alarm sound when killed with fire, amongst other things. It is also highly commented allowing a greater insight into what each section is for when deciding on what to change.