Overview
This guide aims to help you mod the sounds of Day of Infamy to your liking, whether it’s a simple music change to adding your own firearms sounds.Some parts of this guides blatantly rips off analblaze’s guide on randomised weapon sounds and DavidLink’s guide on soundscripting, because i’m a skrub.Keep in mind that i don’t consider myself a professional, English isn’t my native language and this guide is a work-in-progress, also because i’m a skrub.With that said let’s continue to the guide.
Getting started.
Before you can do anything you’ll need a few things:
- A general idea of what you want to mod, be it a music replacer, new voice over works or firearms sounds.
 - Day of Infamy, although this guide could apply to any games that’s made in the Source engine, except for CSGO, Valve is cyka blyat.
 - GCFScape v1.8.6[nemesis.thewavelength.net], this is optional but i highly recommend it.
 - An audio editing program, i recommend Audacity[www.audacityteam.org].
 - Goldwave[www.goldwave.com], for when you need to deal with sound loops.
 
I can’t really tell you how you should create your sounds now, can i? Do whatever you want with them but there is something to keep in mind: 
No sound can have a rate beyond 44100 Hz. Anything greater will not play, producing an error in the console. I don’t know why you would use anything less, but you can if you want to.
Where the sounds are located and how to extract them
The first thing you’re gonna want to do is to know where the sounds are, in this case your sounds should be located in yoursteamlibraryfoldersteamappscommondayofinfamydoidoi_sound_dir.vpk . If you have GCFScape (which you should), you can open them up nicely and see all of the sound files of the game.
You can do it the old fashion way by decompiling the vpk, to do this: Go to yoursteamlibraryfoldersteamappscommondayofinfamybin and drag doi_sound_dir.vpk into vpk.exe, once the process has finished, a decompiled folder should appear at where the .vpk file is located.
There we go, you should have all the game’s sound files.
Music mods!
The easiest mods to make and is also the most common types of sound mod on the workshop.
All of the game’s music are located within doi_sound_dir/sound/music
Menu themes are in the menu theme folder, obviously.
The stingers folder contains those musical cues that plays when you respawn, at least i think that’s what they are.
And the rest are victory themes, counter-attack theme and loadout theme.
To replace the music, simply pick the desired song/piece of audio you would like, convert them to the appropriate file formats (with the exception of loadout_ambient, everything is done in .ogg format) and then rename them accordingly. Here’s an example[www.dropbox.com] of a music mod i made, you can decompile it and examine what i did with it.
Player VOs mods!
Well, i’m just gonna be honest, i haven’t done any sort of VOs mods ever since i started doing sound mods (as of the time writing this guide, hopefully i’ll get to touch them soon). But the basis for it is simple enough, sounds are in mono, sample format is in 16-bit PCM, .ogg vorbis.
It has to be mono because all of the VOs are considered third person sounds and making them stereo can cause things to play clearly at long distances, amongst other problems.
The VOs are located at doi_sound_dirsoundplayervoice, for announcer voices (gamestart voices, radioman’s announcement) they’re located at doi_sound_dirsoundhq, from then on it’s all about you taking your desired piece of audio and renaming them correctly.
Battle sound mods!
Also known as firearms, bullet physics, artillery whistle, you name it.
The location of the weapons sounds are doi_sound_dirsoundweapons, with many folders containing their respective weapon sounds.
Again, i will not tell you how you want to make your sounds, but do keep in mind:
- First person sounds are in stereo, but third person sounds has to be mono, as mentioned, making third person sounds in stereo creates a whole bunch of problems. Mono sounds for first person is just bad, don’t do it.
 - Dist sounds? I guess you can make them in stereo, it doesn’t really matter much since they only play when the source of the sound is really far away.
 
Now, if you have opened up the individual weapon folders, you would see these “handling” folders inside most of them. That’s the folder containing the mechanical, moving parts of a weapon. These sounds should be in mono as well. The most important thing to keep in mind when making handling sounds is that the sounds are hardcoded to play with the animations/events, if your sounds are longer/shorter than the default length, they might cut out or not play at all. snd_restart somewhat alleviates this, but it’s like a bandaid, not a surgical procedure.
Some weapon sounds overlap with one another, this is true for the Thompson variants and the M1 carbine variants as well, i guess this is due to bad coding on NWI’s end, thanks Anicator. To mod these weapons you have to make all the variants use identical sounds, otherwise they won’t register and you’re left with the vanilla sounds.
Here’s an example[www.dropbox.com] of a weapon sound mod that i did, you can decompile it and see what i’ve did so you can give yours a go.
There’s a lot of sounds included in Day of Infamy and there is no way i could cover them all. But the general rule is try to not have something that doesn’t have the original sounds’s length and try to make them in the same format as the originals. All the sounds of the game is in the .vpk, you just need to dig hard enough to see them.
Sound Loops
So, you’ve done some modding, but you noticed that the stuff that was supposed to loop itself, didn’t loop, they played once and then cut themselves off.
That’s because you did not assign a cue point to the sound. This is a .wav only feature, so .ogg files can’t be looped.
To loop a sound, open Goldwave, then open the sound you wanna loop, click , then a window should appear, proceeds to add cue points as following:
With start_cue at 0:00 and end_cue at sound end. Click the save button and everything should be ready to go, your sound should loop properly now.
Sound scripting
This is the part of the guide where i rip-off analblaze’s guide on sound randomisation, and a bit of DavidLink’s guide on sound scripting, too.
(To be expanded upon at a later date)
Getting your sound mod to work.
You compile them lol.
I’ve guide you through how your sounds should be like, and you’ve done every thing by the book so far, now it’s time to make them work: Put your sounds into a new folder, you can name it whatever you want. Depends on what kind of mod you’re doing the directory will be different, but if you can still look at the original sounds for reference. For example: If you’re doing a sound mod for the Kar98, then the sounds directory should be yourcustomstuffsoundweaponskar98, for a music mod, your sound directory should be yourcustomstuffsoundmusicmainmenu, etc… Here’s an example of my own kar98 and how its directory should be like:
Right, after you’ve double check the file path, you can go ahead and test it in-game.
You do this simply by putting the folder you just created into steamappscommondayofinfamydoicustom. If you don’t have the custom folder, go ahead a make one. Boot it up in-game and try it out.
Now if everything went well, the sounds work and you want to share your work to the workshop?
First off you need you convert that folder you have into .vpk format.
Remember at the locations section, i mention vpk.exe? The part where i told you that you can decompile .vpk files into a readable folder? Well you compile a folder into a vpk file by doing the opposite, dropping the folder into vpk.exe and the vpk file should come out at the other end.
Now you can upload your sound mod onto the workshop and share it with others!
For Mac users
This guide was made for PC users so it gets confusing at times.
So if you have a mac, you’ll need to do one more step before you can get your sound mods to work, that is to upload your mods to the workshop immediately once you created them. This is a known issue, for some reasons sound mods won’t work in “custom” for mac.
Do that and your sound mod should work normally.
Troubleshooting
For when your sounds don’t work.
(To be expanded later, for now if you have any questions, just add me on steam)
Closing note
I hope this guide helped you in some ways, i’m open to questions and criticism, if you have any, do post in the comments below.