Upvote Upvoted 56 Downvote Downvoted
1 2
Custom Caption Tutorial
posted in Customization
1
#1
25 Frags +

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.

Before:

http://imgur.com/XMZf5q5.jpg

After:

http://imgur.com/3KfXVla.jpg

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

<clr:0,250,0><I>SOLDIER BUFFED

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.

"CloseCaption_Normal"
		{
			"1"
			{
				"name"		"FuturaStd-Medium"
				"tall"		"24"
				"tall_hidef"	"32"
				"weight"	"600"
				"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.

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.

Before: [img]http://imgur.com/XMZf5q5.jpg[/img]

After: [img]http://imgur.com/3KfXVla.jpg[/img]

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 [code]<clr:0,250,0><I>SOLDIER BUFFED[/code] would mean that it would be green italic text reading "[i]SOLDIER BUFFED[/i]". 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. [code]"CloseCaption_Normal"
{
"1"
{
"name" "FuturaStd-Medium"
"tall" "24"
"tall_hidef" "32"
"weight" "600"
"range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A
}
}[/code]

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.
2
#2
1 Frags +

Really cool idea, thanks for sharing!

I can't find captioncompiler in the directory you mentioned, any help?

edit: found it, it's under source2007

now, however, dragging the old closecaption_english.txt onto the compiler doesn't do anything.

Really cool idea, thanks for sharing!

I can't find captioncompiler in the directory you mentioned, any help?

edit: found it, it's under source[b]2007[/b]

now, however, dragging the old closecaption_english.txt onto the compiler doesn't do anything.
3
#3
1 Frags +

Is your closecaption_english.txt in your old resource directory? I've only had it work if I mimic the old file structure, if you try to compile it from your steampipe directory it won't do anything.

Is your closecaption_english.txt in your old resource directory? I've only had it work if I mimic the old file structure, if you try to compile it from your steampipe directory it won't do anything.
4
#4
1 Frags +

http://i.imgur.com/HY6JHCG.jpg

I'm experiencing the same problem as SBARROHOTTOPIC. I've installed all the SDK tools and put my closecaption_english.txt file in the old resource folder. There are 4 instances of captioncompiler.exe on my computer and I've tried them all but none of them produce a .dat file.

[url=http://i.imgur.com/HY6JHCG.jpg][img]http://i.imgur.com/HY6JHCG.jpg[/img][/url]

I'm experiencing the same problem as SBARROHOTTOPIC. I've installed all the SDK tools and put my closecaption_english.txt file in the old resource folder. There are 4 instances of captioncompiler.exe on my computer and I've tried them all but none of them produce a .dat file.
5
#5
3 Frags +

Something I forgot to mention - launch SourceSDK and make sure your current game is set to TF2. This could be the issue you guys are having.

If people are still having issues I could just set up a gmail account and compile for everyone. I've done a lot of searching and I just can't find any useful information on the captioncompiler program, so my solutions are pretty limited.

Something I forgot to mention - launch SourceSDK and make sure your current game is set to TF2. This could be the issue you guys are having.

If people are still having issues I could just set up a gmail account and compile for everyone. I've done a lot of searching and I just can't find any useful information on the captioncompiler program, so my solutions are pretty limited.
6
#6
1 Frags +

Silly question but can other teammates see the captions?
i am guessing not but is it possible to force it for teammates perhaps using a server side plugin?

Silly question but can other teammates see the captions?
i am guessing not but is it possible to force it for teammates perhaps using a server side plugin?
7
#7
1 Frags +

I'm not having any luck compiling. Wish I could see what the command prompt spits out before it closes.

I put the txt file in the old resource folder area, then dragged it on captioncompiler in source2009/bin but it doesn't give me a dat file.

Also, what positions did you use to get it above the ammo with omp hud in your example screenshot?

I'm not having any luck compiling. Wish I could see what the command prompt spits out before it closes.

I put the txt file in the old resource folder area, then dragged it on captioncompiler in source2009/bin but it doesn't give me a dat file.

Also, what positions did you use to get it above the ammo with omp hud in your example screenshot?
8
#8
0 Frags +

Here are my settings for use with Omp's Hud. This is at 1680x1050 so you might have to fudge them a little.

"fieldName" "HudCloseCaption"
		"visible"	"1"
		"enabled"	"1"
		"xpos"		"c+138"
		"ypos"		"240"	[$WIN32]
"ypos"		"236"	[$X360]
"wide"		"100"
		"tall"		"100"	[$WIN32]
"tall"		"176"	[$X360]

		"BgAlpha"	"0"

		"GrowTime"		"0.15"
		"ItemHiddenTime"	"0.1"  // Nearly same as grow time so that the item doesn't start to show until growth is finished
		"ItemFadeInTime"	"0.1"	// Once ItemHiddenTime is finished, takes this much longer to fade in
		"ItemFadeOutTime"	"0.2"
		"topoffset"		"0"

I'm going to give it a bit to see if anyone else can compile successfully - if not I'll just set up an account and do them manually myself. I wish I knew why it isn't working for you all :(

Here are my settings for use with Omp's Hud. This is at 1680x1050 so you might have to fudge them a little.

[code]"fieldName" "HudCloseCaption"
"visible" "1"
"enabled" "1"
"xpos" "c+138"
"ypos" "240" [$WIN32]
"ypos" "236" [$X360]
"wide" "100"
"tall" "100" [$WIN32]
"tall" "176" [$X360]

"BgAlpha" "0"

"GrowTime" "0.15"
"ItemHiddenTime" "0.1" // Nearly same as grow time so that the item doesn't start to show until growth is finished
"ItemFadeInTime" "0.1" // Once ItemHiddenTime is finished, takes this much longer to fade in
"ItemFadeOutTime" "0.2"
"topoffset" "0"[/code]

I'm going to give it a bit to see if anyone else can compile successfully - if not I'll just set up an account and do them manually myself. I wish I knew why it isn't working for you all :(
9
#9
0 Frags +

I would consider using this but distance the closecaptions actually show events seems rather small. Is there a way to increase the range?

I would consider using this but distance the closecaptions actually show events seems rather small. Is there a way to increase the range?
10
#10
0 Frags +

I haven't found a way to do that yet. I've noticed that at a distance, you can hear the cues clearly but the captions don't pick them up.

I haven't found a way to do that yet. I've noticed that at a distance, you can hear the cues clearly but the captions don't pick them up.
11
#11
0 Frags +

I somehow got the command prompt to freeze and it said that I was missing the gameinfo.txt

I somehow got the command prompt to freeze and it said that I was missing the gameinfo.txt
12
#12
0 Frags +

Does this work on ESEA servers?

Does this work on ESEA servers?
13
#13
1 Frags +

I believe all the caption things work on sv pure 2 servers, not sure what else ESEA servers have on them so I can't confirm they will work.

I believe all the caption things work on sv pure 2 servers, not sure what else ESEA servers have on them so I can't confirm they will work.
14
#14
1 Frags +

Can anyone confirm / deny that after setting their SourceSDK to TF2 it still will not compile the .dat?

Can anyone confirm / deny that after setting their SourceSDK to TF2 it still will not compile the .dat?
15
#15
1 Frags +

When having it set to TF2, it gives me the gameinfo.txt error, but if I set it to Half-Life 2, it gives me a different error. Not sure what the error is, but thought I would bring it up.

I've also tried the other captioncompilers with no luck.

When having it set to TF2, it gives me the gameinfo.txt error, but if I set it to Half-Life 2, it gives me a different error. Not sure what the error is, but thought I would bring it up.

I've also tried the other captioncompilers with no luck.
16
#16
1 Frags +

I managed to get mine to work, I put a copy of the old gameinfo.txt I happened to have saved in steamapps/username/team fortress 2/tf/

Here's a download to the old version: http://www.mediafire.com/?977xiav7l7vttn9

I managed to get mine to work, I put a copy of the old gameinfo.txt I happened to have saved in steamapps/username/team fortress 2/tf/

Here's a download to the old version: http://www.mediafire.com/?977xiav7l7vttn9
17
#17
0 Frags +

Thanks, Alfie. If anyone really wants to, you can email a modified closecaption_english.txt (or whatever language really) to captioncompiler@gmail.com and i'll email you back the .dat

Thanks, Alfie. If anyone really wants to, you can email a modified closecaption_english.txt (or whatever language really) to captioncompiler@gmail.com and i'll email you back the .dat
18
#18
0 Frags +

Can't seem to get this to work, maybe it is incompatible.

"Player.Spy_Cloak"					 "<clr:100,100,100>SPY CLOAKED"	
"Player.Spy_UnCloak"				 "<clr:100,100,100>SPY UNCLOAKED"	
Can't seem to get this to work, maybe it is incompatible.

[code]"Player.Spy_Cloak" "<clr:100,100,100>SPY CLOAKED"
"Player.Spy_UnCloak" "<clr:100,100,100>SPY UNCLOAKED" [/code]
19
#19
0 Frags +

Because they are closed captions, I think they are only supported with voice commands, not all sound effects.

Because they are closed captions, I think they are only supported with voice commands, not all sound effects.
20
#20
0 Frags +

nice try but i believe closed captions can only be triggered by sounds in the voiceover (vo) folder.

edit: #19 has it

nice try but i believe closed captions can only be triggered by sounds in the voiceover (vo) folder.

edit: #19 has it
21
#21
6 Frags +

povohat i know you have some dirty tf2 secrets you are keeping from the public
please povo

povohat i know you have some dirty tf2 secrets you are keeping from the public
please povo
22
#22
-7 Frags +
povohatnice try but i believe closed captions can only be triggered by sounds in the voiceover (vo) folder.

edit: #19 has it

Someone needs to pose as a deaf TF2 player and get these added in. Get lots of media attention and what not.

[quote=povohat]nice try but i believe closed captions can only be triggered by sounds in the voiceover (vo) folder.

edit: #19 has it[/quote]

Someone needs to pose as a deaf TF2 player and get these added in. Get lots of media attention and what not.
23
#23
2 Frags +

Thanks for the tutorial kezz :)

Thanks for the tutorial kezz :)
24
#24
1 Frags +

It would be beyond broken if you could see footsteps and uncloaking and such with this.

It would be beyond broken if you could see footsteps and uncloaking and such with this.
25
#25
2 Frags +

Sorry for the bump but this wasn't enough to constitute a new thread.

cc_predisplay_time 0

It makes it so the captions appear instantly with no delay. the default is cc_predisplay_time 0.25

Sorry for the bump but this wasn't enough to constitute a new thread.

cc_predisplay_time 0

It makes it so the captions appear instantly with no delay. the default is cc_predisplay_time 0.25
26
#26
1 Frags +
AlfieI managed to get mine to work, I put a copy of the old gameinfo.txt I happened to have saved in steamapps/username/team fortress 2/tf/

Here's a download to the old version: http://www.mediafire.com/?977xiav7l7vttn9

Alfie, I put my gameinfo.txt in there but when I tried to compile the .dat file I got this error: http://puu.sh/426Q1.png

I am an idiot, used my current gameinfo.txt. I can confirm that using Alfie's method (and the gameinfo.txt he provided via mediafire) the .dat compiles.

[quote=Alfie]I managed to get mine to work, I put a copy of the old gameinfo.txt I happened to have saved in steamapps/username/team fortress 2/tf/

Here's a download to the old version: http://www.mediafire.com/?977xiav7l7vttn9[/quote]

[s]Alfie, I put my gameinfo.txt in there but when I tried to compile the .dat file I got this error: http://puu.sh/426Q1.png[/s]

I am an idiot, used my current gameinfo.txt. I can confirm that using Alfie's method (and the gameinfo.txt he provided via mediafire) the .dat compiles.
27
#27
4 Frags +

Stickied and moved to Customization because this is really good stuff.

Stickied and moved to Customization because this is really good stuff.
28
#28
-1 Frags +

c

c
29
#29
0 Frags +

Is there any way to set a limit on the number of captions shown at once?

Is there any way to set a limit on the number of captions shown at once?
30
#30
0 Frags +
DUSKY_Is there any way to set a limit on the number of captions shown at once?

No.

[quote=DUSKY_]Is there any way to set a limit on the number of captions shown at once?[/quote]
No.
1 2
Please sign in through STEAM to post a comment.