Team Fortress 2

Team Fortress 2

Not enough ratings
Creating a custom voicemod
By James
Just a short and hopefully easy to understand guide on how to change your Voicefiles.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Who is this aimed for?
So you want to make a mod for TF2 that changes voices, sounds or anything sound related in Tf2?
Do you know a little bit about Windows, Sound-editing, or TF2?
Was your answer to those questions "Yes", "a little" or "Nope"?

Then you've come to the right place because this guide is aimed to be comprehensive for everyone that can at least turn on a computer. (Also running a windows machine... sorry mac and linux)

What do I need?
So first of all you need to get the following programs:
  • GCF-Scape[nemesis.thewavelength.net] (A source engine archiving tool.. look at it like you would to WinRar or 7Zip)
  • Audacity[www.audacityteam.org] (A sound editing software. You can use your own if it has the function to change sample rates)
  • Team Fortress 2 (A class based team... wait a minute...)
  • Some comfort food in case stuff breaks.. (Which it will trust me, were looking at a 22 Year old reliv at this point...)
Getting started
Sv_pure
Woah there tiger we can't just illy nilly run out there and think stuff is going to work.. First i need to tell you about this lovely thing called "SV_PURE".

So SV_PURE 1 is basically a bouncer that checks if your sound is custom or not. He checks his list and if your sound is on the list it can get loaded and played on the server. If not... well tough luck. playing these sounds only works on community servers (Unless your server has sv_pure 1 and the process repeats)

How to figure out the sv_pure list
Enabling console
First of all we need to enable your console. This is done by going to your steam library searching tf2 and right clicking it. Then select "Properties"

Afterwards click on "Set launch options"

Now just type "-console" without the quotation marks and launch the game. Your game should now launch with lots of stuff in it.
Checking SV_pure
Now with your console launched and ready to read out some text, join a casual match and pause the game.

After pausing the game, the console should come back up and you should be able to type "Sv_pure" in it and hit enter. Something like this should come up
In this list we can see that most of the custom items and things are marked as "trusted source" which basically means that modded content cannot be applied. Though we can use things we put in /sounds/vo/ which is the voice directory used by... well voicelines. That is marked by any. So to the time of this guide. Voicefiles are completely gucci.

Tricking the system
If you feel particularly good about yourself you can try to use this script[gamebanana.com] that puts everything into the "VO" folder and then loads it from there BUT BE WARNED

I cannot help you with things that might happen when using this script. IN THEORY this can work but i've never tested it for myself (Even though the screaming flamethrower is quite hilarious) Using this script should not get you on VACcation but it is AGAINST VALVES TOS.
I WILL NOT BE RESPONSIBLE FOR YOUR BAN. just getting that outa my way.
Acquiring your sound file
Now that everything is prepaired and you know what to do let's get started with getting a soundfile. That can be either you screaming into your mic. "SPY!" or just a generic voiceline you "LEGALLY" ripped from someones youtube video. (Hey i won't judge)

So let's say you want to change the announcer ladies "5 - 4 -3 -2- 1" countdown to someone else saying it. Then you need to get 5 different files for each second.
I for example go for TooftyTv counting down from 5 and encapsuled every second into an own voicefile like this.


Figuring out the filename

Now since we got the source file we need to figure out what file to replace. Open the TF2 Properties again. and head over to the Local Files


After clicking "Browse local files" you should be brought to your "Team Fortress 2" directory.


Now continue into your "tf" directory and find a .vpk file named "tf2_sound_vo_english_dir.vpk". Open that file.

After opening the archive you should see something along the lines of this: (If you can't open the archive restart your computer or set the default program to open the VPK as "GCF-SCAPE")

Follow along the folders until you find a load of files and search for your desired file.
To make it easier for us you can imagine the file to be named somewhat like this:

"character"_"What-happens"_"Subvalue".MP3 (or sometimes wav)
in our case that would be the following files.
  • announcer_ends_5sec.mp3
  • announcer_ends_4sec.mp3
  • announcer_ends_3sec.mp3
  • announcer_ends_2sec.mp3
  • announcer_ends_1sec.mp3

Write those names down as we need them in the next step.


Laying out the folderstructure
Now since you allready are in your gcf scape you also might have noticed the little list on the left going "root -> sound -> vo".
That list is actually quite important aswell because as you might have realised they allign with our SV_PURE which allows ANYTHING beeing played from that folder.
Remember that path aswell (or write it down) as we will need to recreate it now in our custom folder.






To get there you open up your tf folder again and instead of opening a vpk you need to open up the custom folder, much alike you would with a custom hud.

If you never installed anything before your custom folder should only have a readme.txt and a workshop folder, which you can savely delete.

create a new folder and name it accordingly (I named mine 5 second toofty thingie)

inside that folder create a new folder called sound (like in the structure from before)

Inside THAT folder create (you guessed it) a "vo" folder. and open it again. Now copy your soundfiles that you prepaired and paste them into this very folder. After that you need to rename them according to your list.
Your filepath and folder should now look something like this:

If you were to load up your game it should TECHNICALLY work. BUT to be sure i'd reccommend you looking into the last section first.
Making sure it works
If you want to be 100% sure that it should work (and you didn't mess anything else up) you only need to do one thing. Changing the sample rate of your file. It sounds complicated, but really it isn't if you follow my steps carefully.

First up; open Audacity.
Then drag your soundfile into audacity so your file will get displayed at the top and the soundwaves get displayed

Now just simply change the project rate at the bottom left to 44100 like this


After that click on file -> export -> export as MP3 and ... export it! (Do not change any settings)

IF Audacity starts crying about a missing mp3 codec just follow the steps it throws at you and install the codec off the wiki (it can be abit iffy but i trust in you, that you can do it!)

After doing that all your files should be at a 44100 Sample rate and working accordingly.
You did it!
Uuuuh i'm not good with motivating words buuuut you did it! yay?

Have fun!
Troubleshooting
So in case stuff went wrong; WORRY NOT. I can try to help you!

(This is basically just a list which you can skim through. I try to keep it up from the comments)

Invalid sample rate: 4800 (or others)
You didn't change your sample rate. Change it to 4100 (See chapter "Making sure it works")

It doesn't work (valve server)
Try going to a community server. If it works there, it's probably an SV_PURE issue. (See "Getting started")

It doesn't work (Community server)
You probably goofed up the path, check out the paths and filenames and reassure that they are correct.)
2 Comments
supersolarog May 29, 2023 @ 3:15pm 
instructions unclear, nuked my balls
Farter343 May 28, 2023 @ 11:04am 
Hey! Thanks for the guide! In original russian dub for tf2, there is way too many unvoiced voicelines. I'll use the A.I. to complete this russian voiceover.:steamthumbsup: