If you're like me, you like using voicelines where they shouldn't be, sending PlayVO inputs to your tf_gamerules.
Well that's all well and good, unless you were just using
So! to counteract this, and to ensure it never breaks again we're going to look at soundscripts.
The soundscript file you want is in the tf2_misk_dir vpk, grab your favourite vpk viewer and find scripts/game_sounds_vo.txt
in there you'll find hundreds of entries like this:
"But YM, what if there isn't an entry I want, or what if I want to mute a default voiceline because it doesn't apply to my crazy new gamemode?" I hear you ask. Well, turns out maps can have map-specific soundscripts too. Yay!
These follow this naming convention: <full map name>_level_sounds.txt and live in tf/maps, the same directory as your bsp. eg: tf/maps/sd_sabotage_a8_level_sounds.txt
You can put whatever you like in there and then you can use it in your map (don't forget to pack it). If you want to mute a pesky voice line, then you can use this format:
You could probably leave it blank, or just trim it down to just the soundlevel line, but I haven't tested that and cba to. This works and it's only a few bytes.
Further reading:
https://developer.valvesoftware.com/wiki/Soundscripts
Well that's all well and good, unless you were just using
Because that's now broken. A whole bunch of voicelines (possibly all??) are now mp3s and don't play if you used this format.<output> | tf_gamerules | PlayVO | vo/announcer_begins_1sec.wav |
So! to counteract this, and to ensure it never breaks again we're going to look at soundscripts.
The soundscript file you want is in the tf2_misk_dir vpk, grab your favourite vpk viewer and find scripts/game_sounds_vo.txt
in there you'll find hundreds of entries like this:
See how it's now an mp3? yeah, balls. But not to worry, now we've found the entry (ctrl+f the sound you want to use) just copy the name of the entry, without quotes and paste that into your output, like so:"Announcer.RoundBegins1Seconds"
{
"channel" "CHAN_VOICE2"
"volume" "VOL_NORM"
"pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NONE"
"wave" "vo/announcer_begins_1sec.mp3"
}
Now, the sound will play no matter what valve do to the filename/type. As long as they keep their soundscript updated (and they will) it'll work.<output> | tf_gamerules | PlayVO | Announcer.RoundBegins1Seconds |
"But YM, what if there isn't an entry I want, or what if I want to mute a default voiceline because it doesn't apply to my crazy new gamemode?" I hear you ask. Well, turns out maps can have map-specific soundscripts too. Yay!
These follow this naming convention: <full map name>_level_sounds.txt and live in tf/maps, the same directory as your bsp. eg: tf/maps/sd_sabotage_a8_level_sounds.txt
You can put whatever you like in there and then you can use it in your map (don't forget to pack it). If you want to mute a pesky voice line, then you can use this format:
Here I've just copied the official Announcer.SD_RoundStart entry and snipped out the filepath line and changed the soundlevel to SNDLVL_NONE. It'll override what's in the standard one when your map is loaded, and unload it when your map is done."Announcer.SD_RoundStart"
{
"channel" "CHAN_VOICE2"
"volume" "1"
"pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NONE"
}
You could probably leave it blank, or just trim it down to just the soundlevel line, but I haven't tested that and cba to. This works and it's only a few bytes.
Further reading:
https://developer.valvesoftware.com/wiki/Soundscripts