L4D Custom Music Tutorial: Difference between revisions
(Okay guys. I think the bug with the soundscripts is fixed, undo my edit if it's still there!) |
(You guys check if this issue is fixed, because I'm deleting the problems now. This hasn't been edited for 4 years!) |
||
Line 1: | Line 1: | ||
This tutorial will go over how to customize the Music Director for your campaign using the '''mapname_level_sounds.txt''' file. | |||
This tutorial will go over how to customize the Music Director for your campaign using the | |||
If you are planning on creating custom soundscripts as well, you should still follow this tutorial and append those scripts to the level_sounds.txt. | If you are planning on creating custom soundscripts as well, you should still follow this tutorial and append those scripts to the level_sounds.txt. | ||
There are 9 steps to this method of adding custom music to your campaign: | There are 9 steps to this method of adding custom music to your campaign: | ||
# Create a text file called | # Create a text file called mapname_level_sounds.txt in your addons' maps directory. | ||
# Copy ALL the contents from | # Copy ALL the contents from the 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 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. | # In notepad, press CTRL + H, to find and replace XXXXX with the same name you used in missions.txt NAME field. | ||
# Begin replacing any | # 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) | ||
# Load up Left 4 Dead and turn off all addons except the one you are working on. (Other campaigns custom sounds | # Load up Left 4 Dead and turn off all addons except the one you are working on. (Other campaigns' custom sounds may cause trouble if you don't) | ||
# In the console, enter snd_rebuildaudiocache and wait about 5 mins for it to finish. | # In the console, enter snd_rebuildaudiocache and wait about 5 mins for it to finish. | ||
# Copy the _master.cache file from your maps/soundcache, place it in your addons maps/soundcache directory. | # Copy the _master.cache file from your maps/soundcache, place it in your addons maps/soundcache directory. | ||
Line 48: | Line 24: | ||
It is a stripped version of the game_sounds_music.txt to only include the Events you need to edit for your campaign. | It is a stripped version of the game_sounds_music.txt to only include the Events you need to edit for your campaign. | ||
It is highly | It is highly recommended allowing a greater insight into what each section is for when deciding on what to change. | ||
You may also opt not to change anything in the file, which will give your campaign the default music cues associated with the Airport campaign. | You may also opt not to change anything in the file, which will give your campaign the default music cues associated with the Airport campaign. | ||
Line 63: | Line 39: | ||
The NAME parameter in your missions.txt would be 'awesome' and look like this: | The NAME parameter in your missions.txt would be 'awesome' and look like this: | ||
[[Image:L4dmissions2.jpg|center|500px]] | [[Image:L4dmissions2.jpg|center|500px]] | ||
Heres how your sound script would look properly edited to make use of thriller.wav | Heres how your sound script would look properly edited to make use of thriller.wav |
Revision as of 10:10, 26 April 2013
This tutorial will go over how to customize the Music Director for your campaign using the mapname_level_sounds.txt file. If you are planning on creating custom soundscripts as well, you should still follow this tutorial and append those scripts to the level_sounds.txt.
There are 9 steps to this method of adding custom music to your campaign:
- Create a text file called mapname_level_sounds.txt in your addons' maps directory.
- Copy ALL the contents from the 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)
- Load up Left 4 Dead and turn off all addons except the one you are working on. (Other campaigns' custom sounds may cause trouble if you don't)
- In the console, enter snd_rebuildaudiocache and wait about 5 mins for it to finish.
- Copy the _master.cache file from your maps/soundcache, place it in your addons maps/soundcache directory.
- 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. It is highly recommended allowing a greater insight into what each section is for when deciding on what to change.
You may also opt not to change anything in the file, which will give your campaign the default music cues associated with the Airport campaign.
http://www.evolvedant.com/soundscript/example_script.zip

Example Tips
If your campaign is called 'Awesome' and contains maps such as l4d_awesome_forest, l4d_awesome_campsite, etc... Your addons maps directory should contain l4d_awesome_forest_level_sounds.txt
The NAME parameter in your missions.txt would be 'awesome' and look like this:
Heres how your sound script would look properly edited to make use of thriller.wav