Game Maps Publish Content Game Maps Publish Content

General Guide

L4D2 Audio Editing and Modding Guide

Sharing is temporarily disabled

General Guide

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

L4D2 Audio Editing and Modding Guide

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

Required Software: Don't worry it is all free (Or at least in the time this guide was created, 1/19/2016)

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

Audacity (For Audio Editing)
http://audacityteam.org/

DVDVideoSoft Free Studio (For Audio Converting)
http://www.dvdvideosoft.com/free-dvd-video-software.htm#.VjeZCCvfWvk

L4D2 Authoring Tools (For Mod Creation and Publishing)
https://developer.valvesoftware.com/wiki/Authoring_Tools/SDK_%28Left_4_Dead_2%29

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

Installing the Software: 

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

Audacity: 
Download and Install and follow the prompts. Change anything to your liking.

DVDVideoSoft Free Studio:
Download and Install and follow the prompts. Change anything to your liking. I highly recommend you read the prompts thoroughly and make sure you untick, decline, etc. any of the bloat/crap ware the installer tries to give you other than the Free Studio software itself. Unless you want them..... I'm not responsible for any problems you develop for installing said  bloat/crap ware.

L4D2 Authoring Tools
Follow the Downloading and installation instructions in the link.

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

Basic Information for L4D2 Sound Editing/Modding

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

1. The audio clip has to be the same length as the one it replaces.

- You can skimp off with a few milliseconds.

-Reason: 
If, it is too short the game will try to fill the empty space with the audio playing at the time really fast. So you will get screeching noises.

If it is to long it will play the end of the audio really fast which essentially turns it into a screech noise as well. 

If it goes under or over a few milliseconds the same will happen the only difference being is that you wont hear it. (it goes by to fast for our ears to pick up.)

2. The file format must be the same.

File Format: WAV, technically you can use MP3, but you would have to replace the files directly in your game folder as it wont work in a vpk addon.

- Channels: Mono, 1 Channel (Mono will usually make it one channel anyways)

- Bitrate: 32 Bit or 352 Kbits/s

- Sample Rate: 22050Hz

- The audio file wont load otherwise or you will get distorted audio, if you don't use the same format.

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

Editng Audio Outside the Game

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

If your using audio that was extracted from L4D2 game directory skip to "Using Audiacity" section of the guide (The next section).

Depending on where you extracted the audio file from, other games, YouTube, Videos, etc., the file format used may vary. As stated above L4D2 doesn't support other file formats for vpk addons. File Formats like ogg, mp3, m4a, aac, wma, flac, etc. As, it only reads WAV and MP3 in certain conditions.

We need to convert them to something that the game can read. For this we are going to use DVDVideoSoft Free Studio. If you want to use another audio converter you can, but I will not cover said converters in this guide.

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

Getting Things Started

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

Step 1:
Install DVDVideoSoft Free Studio from the above link.

Step 2: 
Open DVDVideoSoft Free Studio

- Click the "Convert" Tab
- Click the "Free Audio Converter" Icon

Step 3:
Change some settings
Change the "Quality" Drop down menu to WAV.
- On the other side of the window there is a magic wand icon, or the "Preset Editor" icon. 
- Click it.

Click the "New" button on the top right of the window.

When the Preset Editor opens
- Click the "Audio" tick box, don't untick however.
- Change or leave the" Format" drop down menu to WAV.
- Change "Sample Rate" drop down menu to 22050Hz
- Change "Channels" drop down menu to Mono
- Change "Bitrate" drop down menu to 320 Kbit/s

Change the Name
- I named mine to L4D2 Audio Format

Change the Description to your liking

Click "OK" on the button of the window.

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

Using Audacity.

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

Basic Tools and Layout. 

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

It is pretty standard "Windows" Layout. You got the Menu bar on top with File, Edit, View, etc. and the Toolbar with your tools under.

- Next to all the Play options you got some tool icons "I" and magnifying glass. The “I” is the selection and the Magnifying Glass is to zoom in and out of you audio file. This will help you get your file length pretty much the exact length of the file you're replacing. Under that you got the “scissors” icon for cutting parts of the audio out. A Copy icon and Paste Icon for Copy Pasting. A Trim Audio icon that cuts out everything but the audio snippet you have selected. Under that is the Time Scale. It is in deviations of 100 milliseconds (for me at least). 

- There are 1000 Milliseconds in one second. The time scale for me is in .10 which = 100 milliseconds. Ex. 1.20 on the scale equals 1 Second and 200 Milliseconds. You can zoom in or zoom out on your audio clip and the time scale will adjust accordingly Minute, Seconds, Milliseconds (1000=1 Second), Microseconds (1000= 1 Millisecond), etc.. This will help you make sure where the audio begins and ends. 

- If it is a solid blue line than there is no audio if you a see a blue wave/zigzag thing (frequency) there is audio.

There are other tools that are neat but aren't needed per say when editing audio for L4D2. I will go into some neat tools later on for certain conditions.

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

Editing Audio

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

Step 1: Open Audacity (Obviously)

Step 2:
Get the file you want to replace and drag and drop it into Audacity editing area. (The Grey window/box.) 
Or
Got to File > Import > Audio and find your file.
Or 
Go to File > Open and find your file.

Step 3:
Do the same as above, but with the file you want to add to the game.

Step 4:
Now click on your selection tool "I" icon if it looks pressed in it is selected if it looks like the rest of the icons (unpressed) than it is deselected.

Step 5: 
Press, hold and drag (Highlight) the part of the audio clip you want to keep. 
- You may want to hear it a couple times to see what parts of the audio clip you can get rid of or not. So you don't hear the other audio clip you can mute it. The mute button is on the audio clip, under the file information.

- If there are gaps in between words you can cut those out or extend them to better match the time.

- I uploaded some blank audio files so you can put them into your file and cut in paste into your editing however you want to match the time.

- The parts you cut out with the Cut tool go into a clipboard were you can paste them back in, making them separate audio snippets. It helps with flexibility and moving the audio around.

Step 6
Once you feel like your audio file is the correct length and everything sounds fine you can now export it.

- First press the "X" icon on the audio clip you are going to replace. Not the one you have been editing. To delete it. You don't want the two audio files to be combine during export.

- Go to File > Export Find the folder you are saving the edited files in.

- Name the file whatever you want. I name it the file I'm going to replace.

- Change the Save as type drop down menu to "WAV (Microsoft) signed 16 bit PCM"

- Hit save 

Step 7:
Do the same with all the audio files you wish to edit/replace.

Step 8 (Optional):
I like to make sure that the audio will work with the game. So, I like to convert the audio that I edited to a format I know will work with the game. In this case I use DVDVideoSoft Free Studio. In this part you can go to the "Editing Audio Outside the Game" section and follow the guide but instead using the audio you exported out of Audacity. (Of course this step is optional).

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

VPK Addon Creation

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

Step 1:
Install the VPK.exe software, go to the above links.

Step 2:
Now go to the folder that contains the VPK application (VPK.exe).
C:\Program Files\Steam\steamapps\common\left 4 dead 2\bin
Scroll down until you find a application called VPK. You may want to make a shortcut to your desktop for easy access. 

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

Unpacking a VPK

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

Step 1:
Click and drag (grab) the vpk file and drop it over the VPK.exe or the shortcut. It will then create a folder named the same thing as your vpk file in the same folder as your vpk file

Step 2:
Explore the folder and do what you want to do with it.

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

Packing\Creating a VPK Addon

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

Step 1:
Replicate the folder structure of the files you're replacing.
It is important to note that a vpk mod must maintain the same folder structure as the files you are replicating.
Ex:
(name of the vpk folder)\sound\player\survivor\voice\gambler
and place your edited files in the last folder. If this isn't done, your mod will not work in game.

Step 2:
Create an addoninfo.txt file.
Right click inside the folder and in the drop down menu go to New>text document and name ite addoninfo. Or, you can open Notepad and save as. Or use the basic blank addoninfo file uploaded with this guide.

Step 3:
Enter the important information in the addoninfo file. Ex:

"AddonInfo"
{
addontitle		"(Title of the mod)"
addonversion 	"(Version of the mod)"
addontagline 	"(Tags of your mod for organization)"
addonauthor 	"(Author)"
addonDescription 	"(Description of your mod)7"
}

There are other advanced things you can add to your addoninfo file, but those will not be covered in this guide as it isn't required.
Now hit save and make sure it is in the folder of your mod.

Step 4:
Create the vpk addon
Click and drag (grab) the mod folder and drop it over the VPK.exe or the shortcut. It will then create a vpk named the same thing as your mod folder in the same folder as mod  folder.

Step 5:
"Installing" the mod into L4D2.
Click and drag (grab) or Copy Paste the vpk file into your addon folder in the L4D2 game directory.
C:\Program Files\steam\SteamApps\common\left 4 dead 2\left4dead2\addons

Step 6: 
Launch the game and make sure the box is ticked in the Addon Menu.

Step 7: 
Play game and enjoy the mod you just created.

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

Extras

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

Here is a link to my OneDrive. 
https://onedrive.live.com/?id=14AC835DCF7CEFB6!219&cid=14AC835DCF7CEFB6

In the context of this tutorial, it contains some extra files that i think will be useful to you guys. It contains a blank addoninfo.txt file that you guys can use as a template for your mods.

I also included a ~30 second blank audio file that you can use to fill space in you audio editing. You will most likely run into an audio piece that can't cover the length of the audio you're replacing. 

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

Personal stuff

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

This guide was created in hopes of people taking up a proper way of editing audio in L4D2. I hope this guide helps. I will try to keep this guide up to date with required software and new developments in L4D2 (HA like that will happen - Valve). As always I'm open to suggestions and feedback on this guide, if my grammar is wrong, something doesn't make sense and needs clarification, How this guide is formatted, or you believe this guide is  flat out terrible (be constructive please). Don't hesitate to comment or send me a private message. Happy modding!
- LoadedAK47

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

Community Tags

  • tutorial
  • Modding

Guide Credits

You may like

  • Map
    Grens Tutorial Map
    N/A

    This is the map I made while creating the Red Alert 3 World Builder tutorial. This tutorial takes you step-by-step through the process of creating a map for the very first time from the initial set up parameters through to creating a fi...

    4,621
  • Mod
    Left 4 Fun
    N/A

    - ANTI-GRIEF SYSTEM Friendly fire control, reverse friendly fire (ricochet), anti-rush, vote kick protection, vote disabler and more. - ADMIN SYSTEM Kick, ban, spawn things, trolls management, fun commands and much more. - MOD SYSTEM A...

    5,595
  • Map
    The Lost Tutorial
    8.4

    Tutorial for Left 4 Dead 2 ...... OR IS IT? Game instructor helps you on the way. But sometimes he might be quite harsh to you. Can you trust him? ENABLE GAME INSTRUCTOR OR PLAYING WILL BE POINTLESS! There are multiple ways to finish ma...

    88,358
  • File
    Custom Scripted Weapon Example
    N/A

    A simple template and example for a custom scripted weapon. A staff that shoots exploding fireballs. Note: this is not designed for gameplay, only as an example for mod authors. The script code is licensed with the MIT license. Have fu...

    14,290
  • Map
    Modified Dead Air: Greenhouse (For Tutorial)
    N/A

    See: https://forums.alliedmods.net/showpost.php?p=2816748&postcount=231 modifying vanilla campaign, based on VScript. * has problems with bot pathfinding. 习惯性地在这里拍个大概没人进的群:652259423

    2,063

Feedback