Left 4 Dead 2

Left 4 Dead 2

52 beoordelingen
Sound & Music Guide [I]
Door yoru
There are plenty of guides on how to do this, but they never helped me.
Most guides all boil down to "trim your sound so it matches the original's length."
"match frequencies, If something sounds broken just type snd_rebuildaudiocache".

Yeah, thanks for nothing.

This is the first part of a six-part series in which I describe how I mod my stuff.
I'm going to essentially walk through each mod I made and provide a step-by-step tutorial.
I dread the mod making part of this community since I've never found a single helpful guide.
Every time I had a problem or was unsure on how to proceed, I could never find anything.
Most other guides I read usually skip over massive steps, or omit very important info.

It shouldn't be like this, I'm making this for people like me back before I figured things out.
By the time I finish writing all 6 parts, perhaps some people will find modding this game more accessible.
My methods aren't perfect, I'm sure there are alternative more practical ways to do what I do, but it is what it is.

This guide will cover my Horror Ambience mod, and some concert music.
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Tools you need
To edit, and export sounds - Audacity[www.audacityteam.org]
For closer audio inspection - Wavosaur[www.wavosaur.com]
To pack, and unpack vpk files - GCFScape[nemstools.github.io]

Enable dev console
Boot up the game, make sure your console is enabled.
In the main menu, go to options - keyboard & mouse - enable developer console.
You press the tilde key to open the console, surely you know that by now?

Finding the sounds you want to change
Let's say you heard some sounds on Death Toll, and you want to replace them.
Load up a level, and pause the game once you hear the sounds you want.
Open up the console, and type ''soundinfo''.

Your console will print out all current sounds, and music playing.


You will see this.

Now let's imagine you wanna change the leaves rustling sound.
The console shows you the exact file path where the sound is located.
In this case, it says "ambient\random_amb_sfx\leaves_rustle03.wav".

All L4D sounds are located in "Steam\steamapps\common\Left 4 Dead 2\left4dead2\sound".

Yoinking the sound
You now know the file path, go there.


Editing the sound
Drag and drop the original file into audacity first. Now add your custom sound below.
You must make your custom sound length match the original, a 1:1 copy in everything.

If your sound is longer - crop it.
If your sound is shorter - generate silence.

Be sure to add fade in and fade out effects at the start and end.
Whether or not it sounds well in the game is solely up to your skill.
This is especially true when modifying music or making gunfire sounds.
Try to get better with audacity, experiment more. It's really simple.



Check what frequency the original wav file uses.
Right click on the box area of the og sound.
We can see this specific wav's frequency is set to 22050Hz.

Now check and see if your custom sound has the correct frequency.
If not, select your custom sound by pressing the box area.
After selecting your track, click tracks - resample at the top.

Set the correct sample rate, it must match the original (in this case it's 22050hz).

A quick tip, if you really want to squeeze a sound in but it's just too long.
Use pitch and tempo (set it to high quality), to decrease or increase the play speed.
How to fix popping/cracking noises
So, you've matched the lengths perfectly, your frequency is correct, but there's a good chance you'll hear those awful popping noises whenever your sound reaches its end in game at random.
Hold CTRL and scroll your mouse wheel to zoom in on the track's end.

Now generate a little amount of silence.


This usually does the trick, but it's inconsistent.
Whoever designed how audio works in this game is an oxymoron.

Important to note, try not to overdo this.
If your custom sound is pure silence it might also pop/crack.
If you add too much silence it will pop, add just a moderate amount, a tip.



This method is pretty erratic, it works well on the majority of sounds but poorly on some.
Try varying the amount of silence you generate to find what suits your particular sound.

Popping and cracking can also happen if your sound is too loud and clips out.
A way to avoid this, is to use the amplifier effect.
I'll show an example.

Here's a sound I have.



Go to "effect - volume and compression - amplify".

If the sound is too loud (clips), amplify will offer you a preset to lower decibels (dB).
If it's too silent, it will automatically offer you the exact amount to increase volume.
If your sound doesn't need tweaking volume, it will just be 0.0.

It's a super useful effect, I'll go over it more in the music & concert part of this guide below.

Exporting the sound
Remove the original track, if you're done matching it.
It's time to export your finished custom sound.

The format is always WAV.

Three things to pay attention to.
The file name must match the original.
Same goes for the frequency, always make sure.
And check the channels is it mono or in stereo, double check.

Export.
Inspecting and adjusting the sound
Most L4D2 sounds are encoded in 16bit.
But some sounds use 8bit for no good reason.
Audacity's interface is trash, and it fails to provide that info.

This is where Wavosaur comes in handy.
It will show you literally everything there is.
Frequency, bit sample, and any loops valve may have set.

Open up wavosaur, drag and drop the original audio into it.
Right click it, and press properties.


Make note of what you see, close and remove the track.
Now drag and drop your modded sound in.
Check and see if its bit rate matches the original.

If not, go to process - bit depth converter.
Set the correct Bit rate, save the file.

An example. Suppose you want to change the rain loop sound on No Mercy. You create a custom sound, make sure the frequency and length match, and export the sound in 16bits. Your ears begin to bleed from all the static as soon as you load up No Mercy to examine the new sounds. All because the rain loop on no mercy is encoded in 8bits rather than the standard 16bits.

Use wavosaur to inspect wav files closer.



Concert music & volume tips
Those are the trickiest to mod and require stupid amounts of effort.
Well, that is if you wish to make them sound any good and loop seamlessly.

Let's say you want to make a concert music mod.
The concert tracks are very straightforward and easy to change.
But the concert tank music randomly cuts off, and cuts in awkwardly.

Let's open up wavosaur, drag and drop the original concert tank music.



As you can see, valve decided to add loop points like some bunch of ♥♥♥♥♥♥♥ imbeciles.
It's already bad enough you are forced to make 1:1 copies, those loops are just torture.
If you care to make your concert tank songs loop seamlessly, you'll have to spend quite a bit of time trimming and editing your stuff. Check the exact time marks where the loop starts.

Open audacity, drag and drop the original concert tank wav, then your custom music.
Pin point the exact time where the loop starts, make a split there and the rest is on you.

Quick tip on how to make your concert tracks much louder in game without breaking audio.

We will apply the compressor effect to even out our waves first.
Go to "effect - volume & compression - compressor", click apply.
Default settings are good enough, try not to temper much.
You can apply this to any sound in the game.



It will even out our loudest waves, as you can see.



Now go to "effects, volume and compression"
Select amplify and just apply the automatically suggested preset.



Now repeat the steps over and over until you're happy with the results.
Combining the compressor and then using amplify increases the volume of the lower and mid waves, while keeping the large waves in check keeping them from clipping and distorting audio.

Check out "EQ and Filters - Bass and Treble", give it a try too.
Experiment and see what works for you, don't overdo.

Another quick tip.

You can use the console command in the main menu to play your custom sounds.
Open up the console and type the file path and your track name.
For example, type "play ambient/alarms/alarm1".
Packing your sounds into VPK
Now to make your sounds work in game, install L4D2 authoring tools.
In steam, check the tools box and download the tools.


Once installed, go to your l4d2 installation folder.
"Steam\steamapps\common\Left 4 Dead 2\bin".
Inside the bin folder, scroll down and find the vpk file.
Create a desktop shortcut (do not copy paste it).



Make a direct file path to the sounds you changed.
Just create an empty new folder on your desktop, name it root.
inside of it, create another empty folder, name it sound.

Make another empty folder and another until you build a file path that leads to OG sound.

the leaves rustle sounds are located in \sound\ambient\random_amb_sfx.
So we build this path, pretty simple and easy to grasp I hope.


Once the file path is built, drag and drop the entire root folder into the vpk file.
It will pack it up into a vpk file, the sound mod is done.


Now to make it work in game, copy the vpk file you just made.
Go to your game folder, \common\Left 4 Dead 2\left4dead2\addons.
Paste the vpk into addons (NOT in workshop, just in addons).

That's pretty much it.
How to make seamless loops
This mostly applies to ambient sounds, fire, rain, wind, etc.
It's very simple and easy, I'll show a quick step by step.
Let's imagine you wish to make a custom fire loop sfx.

Grab the vanilla sound you want to replace first.



Now drag and drop your custom sound below it.



My custom sound is too short, i'll just copy paste it to increase length.



Now the most important part, select the first 3 or 4 seconds.
CTRL + X to cut it out, we'll need it in a second.



The track will shorten back a bit, now delete the tip at the end so it matches the og file.
We're just going through the motions, nothing complicated at all.

Add a new track at the bottom, paste the first few seconds you cut out from earlier.
Align it with the tip at the end, so everything matches the og sound nicely.



Add the fade in effect half way through the track below.
And add fade out to the track above, make it mid too.



That's it, very straightforward.
Some words
You can edit in wavosaur as well, but I just personally prefer doing it in audacity.
Speaking of audacity, there's plenty of youtube guides on how to use it.
If you're stuck and don't know how to do something, just search it up.

Thought whether or not I should also cover how to add custom new sounds.
But I figure it's a totally different field, I don't really do scripts & sound cache bs.

Oh, also you should make an addon.txt info so your mod can show if it's conflicting with any other mods or not. If you don't know how to create one, just copy paste my horror ambiance addon info and edit it appropriately for your own mod. Addon.txt info goes into your root folder.

Anyway, hope this helps.

23 opmerkingen
There's no way someone made COHERENT tutorial on this topic, is this still L4D2 modding? much appreciated!
shrigga 30 mrt om 9:56 
Can I follow this guide to change the gunshots volume in game along side reloading they are so loud? Or would it be easier to increase dialogue and music volume?
common_male_rural01.mdl 13 mrt om 9:24 
i found out my dumbass forgot to add more silence
yoru  [auteur] 13 mrt om 9:07 
you can send me the footstep sounds on dickcord i'll have a look
common_male_rural01.mdl 13 mrt om 8:57 
ive tried so hard and got so far but in the end it doesnt even matter
yoru  [auteur] 13 mrt om 8:54 
if you struggle following a step by step guide with screenshots and full in depth explanation then there's nothing that can help you, boy.
common_male_rural01.mdl 13 mrt om 8:50 
tank footstep still doin it...
yoru  [auteur] 13 mrt om 6:35 
always make sure to compare the length, sample rate, mono\stereo, and encoder (some sounds are encoded in 16-bit, some in 8-bit, this is mostly true for loops). And always generate a tip of pure silence that exceeds the originals length to avoid popping and cracking noises.
λ Eiku λ 13 mrt om 3:52 
Update: not long after I foolishly disabled your mod thinking that was the issue I found it to be that the track I created was Mono instead of the originals stereo, I have fixed it and now it is working perfectly fine with some adjustments in need, and I wish to ask for some feedback on it if you allow me to show it to you.
λ Eiku λ 13 mrt om 3:15 
I have though, I have it right here on my desktop and nothing is different, the sample rate is the same as the sample rate was originally 44100Hz, and the length is perfect, is it possible this can be caused by a mod confliction? it is all that comes to mind as I do use your dead space common infected sounds.