- Jan 31, 2016
- 71
- 70
Shutting up specific voice lines (like the announcer) is more convoluted than I expected, and finding a solution was difficult so I’m making a thread on how to do it with style, and with this method you can not only remove the voicelines, but you can replace them with custom ones too!
Once you’ve figured out which specific sounds you want changed go to your /maps directory, i personally put a maps folder in my custom folder like tf/custom/mycustomcontent/maps/ so this way all my custom content are in the same general location and can be removed easily to test if packing files worked correctly. ANYWAYS, once you’re in your maps directory make a .txt file and name it mvm_example_b1_level_sounds.txt but change it to correspond to your map name exactly with _level_sounds tacked on at the end. Every time you push a new update to your map which changes the file name you WILL need to update this txt file to the current version of the map, it is a hassle but it is the only option as of now. Now that you’ve had this file created and named accordingly we can move onto figuring out which sound script is the one for the sounds you want to replace by going into Hammer.
If you’re not using Hammer++ this will be a longer process so I recommend it. When you’re in it press CTRL+SHIFT+S to open Hammer’s sound browser, near the bottom of the window there is a drop down for sound type, make sure it’s set to Game Sounds and search for the sound you want to replace, if you know the term it’s referred to search for it and narrow it down since there are a lot. Now for finding when the announcer says that we have secured a control point we need to look up “announcer” in the filter section and look for it, and preview the sounds to make sure you got it right and correct. I already know the specific game sound for it and it’s Announcer.Success so this will be the sound I make silent in this tutorial, and Announcer.Failure will have replacement sounds over it. If you’re not looking for an announcer sound effect to replace and you’re looking for a character they’re in that list too, it just takes time to look for the specific sound you plan on editing.
Within your text document you will want to make sure the syntax is correct, this is where I recommend you look over the Source Developer Wiki Article to get all the information you need; for example, the channel you put your sounds in as it changes depending on what you're trying to do with it.
To silence your sound you will want to do this
You open with putting your “Game Sound” in quotation marks and then place everything revolving around that specific sound within curly brackets where each variable is on a different line. The wave value is what you’re looking for though, to turn off a sound make the wave’s value misc/null.wave as that is a sound which plays no sound in source. If you wanted to change it to something you can hear/is custom make it the directory starting from the sound folder but not including the sound folder, so like sound/announcer/announcer_funnyjoke.wav (I would use .wav files since these work the best with sorse engin)
For adding variation to the custom sounds it’s basically the same thing but with a little more when you’d put the wave variable put rndwave in instead without quotation marks like this
The Channel value is odd but it correlates to which “Source” the sound is coming from like your weapon, or the announcer. Check the wiki for specifics on each one but for tf2 the announcer uses CHAN_VOICE2. Volume is self explanatory as a value from 0 to 1, VOL_NORM is 1. Pitch is also self explanatory as a value from 0 - 255, 100 is PITCH_NORM and the original pitch of the sound file. Sound Level is also a weirder one as it represents how LOUD something is, but not volume, just how much it spreads and overpowers. Consult the wiki on this one but SNDLVL_NORM should service just fine for this as we’re silencing the sound of the announcer so the loudness doesn't matter, but will if you’re making custom sounds, it is all up to preference what you choose just make sure it doesn't completely overpower everything.
Compiling with CompilePal with the pack option enabled should automatically pack any custom content within the soundscript and the soundscript itself so that is handled for you automatically!
This should work and if it doesn’t, reply so I can try to help with it, but before you comment your problem make sure you’ve tried the solutions in the FAQ section!
FAQ/Trouble Shooting
HELP! I updated my sound file and it doesn’t work anymore/sounds weird!
Whenever you change a sound in source, it doesn't notice very well as the .cache file won’t notice you updated it so you’d need to delete the sound.cache file inside the /sound folder in your directory where the custom sound is located. If you need change the sound file inside a new version of the map that was already publicly released, change the file name of the sound and update it within the sound scripts to do so as to make sure the players do not need to remove their .cache files as many of them will not know how/why
HELP! THE SOUND IS NEVER PLAYING WHEN IT SHOULD BE!
This would likely be because Source doesn’t like some audio bitrates, I would use audacity and check the sound file’s bitrate to make sure it’s set to “44100” in the bottom left corner of audacity as source reads that bitrate for sounds and not something like 48000 for some reason. And then remove the cache file for good measure to make sure it works.
Within your maps directory place a txt files with your exact level name with _level_sounds.txt on it. Open hammer's sound resource browser and change the sound type to gamesounds to find your sound title you want to replace, open up your level sounds file and put
[/INDENT]
[INDENT][I][FONT=courier new]Entry.Name[/FONT][/I][/INDENT]
[INDENT][FONT=courier new][I]{[/I][/FONT][/INDENT]
[INDENT][FONT=courier new][I]"wave" "common/null.wav"[/I][/FONT][/INDENT]
[INDENT][I][FONT=courier new]}[/FONT][/I][/INDENT]
[INDENT]
Changing the entry.name of course to your chosen game sound. Remember to update your level sounds file every time you change the file name of your map.
This tutorial assumes you know your way around Hammer enough to find the sound browser and be able to find your /tf/ directory so if you don’t know how to do that yet, you might be biting a little bit more than you can chew. You will want to start with figuring out WHICH voice lines you want to remove from playing, for example I will be removing the announcer from saying “We have lost a control point!” and “We have secured a control point!” as these are ones you’d generally want to remove if you’re doing something wacky!Once you’ve figured out which specific sounds you want changed go to your /maps directory, i personally put a maps folder in my custom folder like tf/custom/mycustomcontent/maps/ so this way all my custom content are in the same general location and can be removed easily to test if packing files worked correctly. ANYWAYS, once you’re in your maps directory make a .txt file and name it mvm_example_b1_level_sounds.txt but change it to correspond to your map name exactly with _level_sounds tacked on at the end. Every time you push a new update to your map which changes the file name you WILL need to update this txt file to the current version of the map, it is a hassle but it is the only option as of now. Now that you’ve had this file created and named accordingly we can move onto figuring out which sound script is the one for the sounds you want to replace by going into Hammer.
If you’re not using Hammer++ this will be a longer process so I recommend it. When you’re in it press CTRL+SHIFT+S to open Hammer’s sound browser, near the bottom of the window there is a drop down for sound type, make sure it’s set to Game Sounds and search for the sound you want to replace, if you know the term it’s referred to search for it and narrow it down since there are a lot. Now for finding when the announcer says that we have secured a control point we need to look up “announcer” in the filter section and look for it, and preview the sounds to make sure you got it right and correct. I already know the specific game sound for it and it’s Announcer.Success so this will be the sound I make silent in this tutorial, and Announcer.Failure will have replacement sounds over it. If you’re not looking for an announcer sound effect to replace and you’re looking for a character they’re in that list too, it just takes time to look for the specific sound you plan on editing.
Within your text document you will want to make sure the syntax is correct, this is where I recommend you look over the Source Developer Wiki Article to get all the information you need; for example, the channel you put your sounds in as it changes depending on what you're trying to do with it.
To silence your sound you will want to do this
Code:
"Announcer.Success"
{
"wave" "misc/null.wav"
}
You open with putting your “Game Sound” in quotation marks and then place everything revolving around that specific sound within curly brackets where each variable is on a different line. The wave value is what you’re looking for though, to turn off a sound make the wave’s value misc/null.wave as that is a sound which plays no sound in source. If you wanted to change it to something you can hear/is custom make it the directory starting from the sound folder but not including the sound folder, so like sound/announcer/announcer_funnyjoke.wav (I would use .wav files since these work the best with sorse engin)
For adding variation to the custom sounds it’s basically the same thing but with a little more when you’d put the wave variable put rndwave in instead without quotation marks like this
Code:
"Announcer.Failure"
{
"channel" "CHAN_VOICE2"
"volume" "VOL_NORM"
"pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NORM"
rndwave
{
"vo/announcer/announcer_yousuck.wav"
"vo/announcer/announcer_antimodivation.wav"
"vo/announcer/announcer_getgud.wav"
}
}
The Channel value is odd but it correlates to which “Source” the sound is coming from like your weapon, or the announcer. Check the wiki for specifics on each one but for tf2 the announcer uses CHAN_VOICE2. Volume is self explanatory as a value from 0 to 1, VOL_NORM is 1. Pitch is also self explanatory as a value from 0 - 255, 100 is PITCH_NORM and the original pitch of the sound file. Sound Level is also a weirder one as it represents how LOUD something is, but not volume, just how much it spreads and overpowers. Consult the wiki on this one but SNDLVL_NORM should service just fine for this as we’re silencing the sound of the announcer so the loudness doesn't matter, but will if you’re making custom sounds, it is all up to preference what you choose just make sure it doesn't completely overpower everything.
Compiling with CompilePal with the pack option enabled should automatically pack any custom content within the soundscript and the soundscript itself so that is handled for you automatically!
This should work and if it doesn’t, reply so I can try to help with it, but before you comment your problem make sure you’ve tried the solutions in the FAQ section!
FAQ/Trouble Shooting
HELP! I updated my sound file and it doesn’t work anymore/sounds weird!
Whenever you change a sound in source, it doesn't notice very well as the .cache file won’t notice you updated it so you’d need to delete the sound.cache file inside the /sound folder in your directory where the custom sound is located. If you need change the sound file inside a new version of the map that was already publicly released, change the file name of the sound and update it within the sound scripts to do so as to make sure the players do not need to remove their .cache files as many of them will not know how/why
HELP! THE SOUND IS NEVER PLAYING WHEN IT SHOULD BE!
This would likely be because Source doesn’t like some audio bitrates, I would use audacity and check the sound file’s bitrate to make sure it’s set to “44100” in the bottom left corner of audacity as source reads that bitrate for sounds and not something like 48000 for some reason. And then remove the cache file for good measure to make sure it works.
Last edited: