So I've wanted to use the captions in my game that you can find at https://code.google.com/p/tf2captions/ but I found them to be very distracting and unclear, so I figured I would customize them!
I've seen a few threads with people asking for info on how to customize your captions, so I figured I would share what I've learned. A warning, these captions don't give you much information and it's a decent amount of work to get them customized, but here it is if you want it.
There are three files that we can use to customize captions. First is the closecaption_english.txt file that comes in the .rar downloaded from the link above. Editing this is pretty self explanatory - the left column is a list of voice commands, and the right column is what will be printed in game. You can take any of these out that you don't want, and change what the caption will say for each voice command.
To modify the text to be bold, italic, or to change the color, you simply need to change the tags in the right column, so
would mean that it would be green italic text reading "SOLDIER BUFFED". The color is RGB, <I> for italics, and <B> for bold.
Once we have the captions saying what we want in the colors we want, we can change the font and size of the text. This is accessed in your ClientScheme.res file. Just do a ctrl+F for "caption" and you will see your entries for the caption system. The relevant changes I made were to CloseCaption_Normal, CloseCaption_Italic, and CloseCaption_Bold. Here is an example of mine, where I have changed the font to match the rest of omp's hud, and increased the weight of the text slightly.
"range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A
Lastly is changing where the captions appear in game with hudlayout.res. Again, ctrl+F for "caption" to find the entry you want. You can change the x position and y position to your liking, as well as changing the background alpha (that greyish box that comes up with text). I've made mine 0 to remove that box as I found it distracting. You can also control the fade time of the text if you don't like the defaults.
After modifying closecaption_english.txt, you will have to create a new closecaption_english.dat. The .dat file must be re created every time you change the .txt file, as it is a direct translation of the .txt that the game can read. To compile a new closecaption_english.dat, you will need to have SourceSDK installed. If you've never used it, it's free and pretty quick to download. In your Steam library, go to tools and
Once you have that, we need to be a little tricky because the Steampipe update muddled this process a little. First, open SourceSDK and choose TF2 as your current game. Next, navigate to your captioncompiler.exe program. It will be under /Steam/steamapps/yourname/sourcesdk/bin/source2009/bin/captioncompiler.exe.
Since the captioncompiler program hasn't been updated to work with steampipe, we need to take our modified closecaption_english.txt file and move it to it's old home, which is /Steam/steamapps/yourname/Team Fortress 2/tf/resource. This folder should be empty. Paste your closecaption_english.txt file in there. Now, to get our .dat file, all we need to do is drag our closecaption_english.txt file (in the old resource folder) onto the captioncompiler.exe program. You should have a little command box pop up momentarily, and then your shiny new closecaption_english.dat file should appear in your resource folder.
Finally, all you need to do is move your .txt and .dat files into your real steampipe resource folder! Just remember to type "closecaption 1" in console when your game starts to turn them on.