Call of Duty 5: Custom Sound
From RGN Wiki
This tutorial explains how to get a custom sound into Call of Duty 5.
In this tutorials we will be using:
- Audacity - http://audacity.sourceforge.net/
- Open Office - http://www.openoffice.org/
These are two free and very good programs that have everything you need to get sound into the game.
Contents |
1. Make sure it is an uncompressed wav.
a. Open your sound in Audacity.
b. Click on your file and make sure that it is “Mono, 44100Hz, 32-bit float”.
c. Export your file as a .wav sound.
File ? Export as WAV
Save as “fire.wav”.
d. Double check.
Goto your file that you saved.
Right click on file ? Properties.
Summary tab ? Audio Format = PCM
2. Place in sound_assets.
a. Copy your sound into "root game directory"/sound_assets/raw/sound/{custom}/
If this path doesn't exist then you will need to create it.
{custom} corresponds to your individual sound directory, i.e. either you line up all your custom sounds right under the path mentioned before or you create subfolders. So far you don't have to worry about your mod's path structure.
3. Create your mod.
Goto “'CoDWaW root directory'/Mods/” and create a folder “SoundMod” and inside that make two more folders “soundaliases”, and “sound”.
4. Create soundaliases.
a. I will be replacing the Thompson firing sound so we need the raw/soundaliases/weapons.csv file open in Open Office or another CSV file editor.
Make sure “commas” is selected and click on OK.
b. First save a copy to “'CoDWaW root directory'/Mods/SoundMod/soundalises/custom.csv”.
c. You may need to remove “read only”.
Right click on the file and go to properties.
Uncheck read-only at the bottom.
d. Press “Ctrl f” to open the Find/Replace window and search for “Thompson”
e. Browse to the tag “weap_thompson_fire_plr”, the extension “_plr” means that this is the sound for the player holding the weapon. If a tag doesn't have this then it is what other players would hear.
f. Change “SFX/Weapon/SMG/Thompson/Fire/wpn_thompson_st_f.wav” to “custom/fire.wav”.
g. If you feel like editing more then there are different controls the more you scroll over, these are labeled at the very top of the spreadsheet.
h. Save the file.
5. Run ModSound, compile mod.
a. Copy your “Mods/SoundMod/soundaliases/custom.csv” file into “raw/soundaliases/custom.csv”.
b. Open Modbuilder.
"CoDWaW root directory"/bin/modbuilder.exe.
c. Create a new mod, if you are unsure then please visit the Modbuilder tutorial HERE.
d. In your mod.csv file you will need the enter the soundalias(es) file(s) and every single custom sound file path trunk after “sound/”, depending on what your {custom} path as suggested in no. 2 looks like.
For the soundalias file you will need to enter “sound,custom,,all_mp” and for your custom sound also enter “sound,{custom}/fire”. As usual, the file extensions .csv and .wav are omitted from the mod.csv list.
e. Check “Build Sound” then click on the button “Build Mod”, it should look similar to the picture.
f. Copy your new sound in “raw/sound/{custom}/fire.wav” to “Mods/SoundMod/sound/{custom}/fire.wav”
g. Now build the complete mod.
Uncheck “Build Sound” and check “Build Fast File”. Then Click on “Build Mod”. It should look similar to the picture.
File:CoD5 Custom Sound 7.jpg
File:CoD5 Custom Sound 8.jpg
6. Compressed sound / ADPCM.
By default, MODSound is going to produce only uncompressed sound. As mods need to be downloaded and uncompressed sound can be quite heavy on downloads, you might want to use ADPCM compression. If you want to enable compressed sound, here is what you need to do:
1. Have the DirectX SDK installed. (March 2008 or later required)
2. Make sure that your DirectX SDK Utilities\bin\x86 folder is in the PATH environment variable.
To set it from the command line use this:
set PATH=%DXKSDK_DIR%\Utilities\Bin\x86;%PATH%
Two tools are used from that folder AdpcmEncode.exe and WMAEncode.exe
As an alternative to adding PATH to your folder, you can copy these two tools to the same directory where MODSound.exe is.
3. Download the open-sourced SOX tool (Sound-Exchange) and place it in the same directory where MODSound.exe.
You can download prebuilt sox executable from here:
http://prdownloads.sourceforge.net/sox/sox-14.0.1.zip?download
You need only sox.exe from the archive.
Take a look for more up to date version into http://sox.sourceforge.net/Main/HomePage
4. Even without sox.exe you can still use compression, but it won't always be able to use xWMA.
xWMA has strict requirements on what the sample rate of the WAV files are, and sox is being used to resample these in case the requirment is not met.
5. If you run into trouble with MODSound not automatically using these tools despite proper setup, you can - as an alternative - use a tool like Allok MP3 WAV Converter and convert to the needed 4 bit mono 44.1 kHz ADPCM file format straight away. In this case you omit the “Build Sounds” step as described under 5.e and put your ADPCM sounds right into your “Mods/SoundMod/sound/{custom}/” path.
ATTENTION: Never accidentally compress the same file twice as the ADPCM of an ADPCM will only be a distortion sound piece of junk. Know what you do and if in doubt, right click your sound file and check all file info. You can also select several files for this to check if the format, the sample rates, etc. are inhomogeneous instead of going thru every single file in the first place.
To our knowledge for now, ADPCM is the real way to go. We have experienced faulty behaviour on some uncompressed WAV files resulting in the following error message: ### Streaming file does not have the PRIV chunk: {sound file path}
If you use ADPCM sounds and avoid accidental double compressions then your mod file size will be significantly smaller and your sounds should work fine, esp. if they are streaming sounds.
Run the game.
Select your mod and load it.
Start any map and the Thompson should sound like your .wav file.
Sources: Treyarch's Wiki


