Left 4 Dead 2

Left 4 Dead 2

评价数不足
How to make a full redub for L4D2
由 Sileno 制作
In this guide, I'll sum up everything needed for a full redub of the game after the troubled experience of dealing with a lack of information in 2023, through ancient forums, deleted threads, and missing comprehensive info on developer.valvesoftware.com.
   
奖励
收藏
已收藏
取消收藏
The result you're going to achieve
Here are Steam Workshop items that are the result of what I teach in this guide:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2972058141
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3025061496

Here is a demonstration video of the mod:
Prerequisites
For this guide, you'll need:
  • Steam and a copy of L4D 2
  • Your voice
  • A microphone
  • A recording environment (ex.: your wardrobe)
    Keep in mind that some audio contains screaming and shouting. Take that into consideration if you have neighbors that could call the police.

  • A ton of willpower (on average you'll record 1500+ audio files)
    The time needed really depends on you and the quality you want to reach. I succeeded in completing more than 1600 audio files for Francis in 3 full-focus sessions of almost 2 hours each.
  • The JDK installed on your Windows PC[download.oracle.com]
    The software I developed will work also on Linux. I did test it and was properly working but can't guarantee 100%. Test it out before going deep into work with it.
  • (Optional) The SoX [sox.sourceforge.net]software, but only if you know what a terminal is and want to post-process audio in bulk.
Setup
Install stuff
  1. Download [download.oracle.com]and install the JDK
  2. Download the last available version of "Dublime" from my Github release page[github.com].
  3. Download and install L4D 2 from Steam

Prepare the directories you'll work on
First of all, be aware of your L4D 2 local files directory. You can find it under the Steam game "properties" page over "local files".
The Directory will be something like this:
...\steamapps\common\Left 4 Dead 2
This is the main folder. Inside it, you'll find other directories containing your sweet sweet sound files:



So, every voice from every playable character is spread around these directories:
...\steamapps\common\Left 4 Dead 2\left4dead2\sound\player\survivor\voice\ ...\steamapps\common\Left 4 Dead 2\left4dead2_dlc1\sound\player\survivor\voice\ ...\steamapps\common\Left 4 Dead 2\left4dead2_dlc2\sound\player\survivor\voice\ ...\steamapps\common\Left 4 Dead 2\left4dead2_dlc3\sound\player\survivor\voice\
The sound files you're going to need to do a complete redub will be the result of every sound file, for a specific survivor, contained in these sub-directories.
The survivors have also a name they are referred to at the engine level

Story name
Engine name
Francis
biker
Bill
namvet
Louis
manager
Zoey
teengirl
Nick
gambler
Ellis
mechanic
Rochelle
producer
Coach
coach

Example: you want to redub Francis, referred as to "biker"
Make two directories wherever you want. We'll name them "inputDirectory" and "outputDirectory" for convenience.
Take the sound files contained in these directories:
...\steamapps\common\Left 4 Dead 2\left4dead2\sound\player\survivor\voice\ <-- no "biker" dir here, go ahead. ...\steamapps\common\Left 4 Dead 2\left4dead2_dlc1\sound\player\survivor\voice\biker ...\steamapps\common\Left 4 Dead 2\left4dead2_dlc2\sound\player\survivor\voice\biker ...\steamapps\common\Left 4 Dead 2\left4dead2_dlc3\sound\player\survivor\voice\biker
Copy every .wav file into "Input directory". The "Output directory" will remain empty for now.

Run Dublime and set the directories
You're almost there. You just need to open Dublime (the .jar file you downloaded from here[github.com]). After you've installed the JDK, as already mentioned in the prerequisite steps, you should be able to just double-click and run it. If not, try to make it run as "Java Platform SE Binary"

...Or, if you know how to use the terminal, run it with typical Java command:
java -jar ./dublime-1.1.0
Once you have Dublime up and running, click on the "Input directory" on the top left and select the directory you created containing all the .wav gathered together.
Then, click the "Output directory" on the top right and select the empty directory you created.


You're now ready to record.
Recording phase
From this point on, what you should have is a situation like this:
At the beginning, the entire grid file names should be grey-colored. Every time you'll record a new audio file, its name will turn to yellow.

In order to play the original audio from the game character (the one from the input directory), you can press this button:


To record or listen what you've recorder, press these buttons:


Keyboard shortcuts
To speed things up drastically (especially if you disable the "Autoplay"), I've implemented some shortcuts. Make sure you have selected a file so that the file grid has focus:
Shortcut
Action
← ↑ → ↓
Navigate files
Ctrl + →
Play the original audio file
Ctrl + ↓
Start recording
Ctrl + ←
Play your recorded audio file

Details on the recording procedure
What is going to happe is that the resulting recording audio file will mimic the original format in order to ensure compatibility with the expected engine format.
  • The recording file duration will always be a little longer than the original audio, in order to avoid glitched results.
  • The format will try to be the same as much as possible to the original audio, except for the Sample Rate. Most audio files are on a 44100 Hz sample rate, but some of them will be in 22050 Hz. In order for the package to be compiled by the game, for I don't know what reason, the mod audio files in those cases have to be 22000 Hz.
(Optional) Post-processing phase
Read this if you know how to use the terminal.
  1. Install SoX[sox.sourceforge.net].
  2. Set SoX's binary to the system path.
  3. Take this Powershell script[gist.github.com] that I wrote to bulk process with SoX every recorded audio file.
    Adapt it to your situation, adding interesting effects if needed (read SoX documentation[sox.sourceforge.net]).
  4. If you want, add also this script to the system path.
  5. Go to your output directory and call the script.
  6. A new "converted" directory will be now present inside the output directory, containing every processed file. After ensuring that the resulting audio files are as you desire, use these ones instead of the original ones.
Packaging
Create your mod's folder under
...\steamapps\common\Left 4 Dead 2\left4dead2\addons\
For example
...\steamapps\common\Left 4 Dead 2\left4dead2\addons\4mortilascio
Put inside of it an addonimage.jpg and a addoninfo.txt files that will be used as metadata for your package.

Put your recorded files inside of it following the same folder structure as the original files in the game. For example, for Francis "biker":
...\steamapps\common\Left 4 Dead 2\left4dead2\addons\4mortilascio\sound\player\survivor\voice\biker

Run L4D 2 with the console enabled.
From the game console, run:
snd_buildsoundcachefordirectory ./addons/4mortilascio
This will process all the audio files contained in your mod's folder and generate a sound.cache file, an essential file before the packaging process.

The last step is the packaging. In order to do that, you have to use the vpk.exe executable contained inside
...steamapps\common\left 4 dead 2\bin
For practical uses, you can make a shortcut of this process inside the addons folder.
Now, drag and drop your mod folder, in this case "4mortilascio" upon the vpk.exe file.
This will generate a "4mortilascio.vpk" package file inside the addons folder.

If you double click on the package, a succesfull installation message will hopefully appear.
Congratulation, you just installed your mod into the game.
Test the mod
Run the game again.
Inside the game console, run a command like this pointing to a specific audio file you want to test:
play player/survivor/voice/producer/laughter01.wav

If everything is as expected, you should now be able to play the game and enjoy the fruits of your work.
Upload
Once you have your .vpk file, the last step is publishing it on the Steam Workshop.
Download the "Left 4 Dead 2 Authoring Tools" from the "Software" section of Steam.
Open the "Workshop Manager"



Click on "Publish a new add-on" and you'll be presented with a simple form where you'll put everything needed for the Workshop page, including the .vpk.



Once finished uploading, you'll have your Steam Workshop addon ready to subscribe.
Here is the result of my work with Francis "Francesco".

Wish you good luck in the process ;)
3 条留言
some kind of alligator 8 月 9 日 下午 7:31 
I know that it's been a year but the dude under me is a buzz kill
Jo 2024 年 6 月 6 日 下午 5:33 
i know that comment is already a year old but its still goddamn disrepectful how you can go to a guide about redubbing and go "hUrr duRR, whEre AI?".

I just can't have it with these immature morons.
Tendie 2023 年 4 月 28 日 上午 6:40 
wen AI voice lines
I can't wait for the roasts that are gonna drop and I'm surprised the community hasn't done anything with AI voices yet afaik