Anyone remember when the 'echo' command was displayed on your HUD and not just in the console?
I just created my own buy script, it uses multiple key combos on the number pad etc. and I also wanted to bind other controls. I could have just wrote it down on paper but meh and the echo command is pretty much useless.
So how do we do it we are going to use "Close Captioning" that was not a typo.
Prerequisites:
-CS:GO SDK
-A good Text Editor that allows you to encode in different formats. (Notepad++ recommended)
First open up your text editor
You need to find the captioncompiler.exe, default is below, just copy and paste.
In your text editor you should Save As: "compiler.bat" (Including quotes) Under the directory: C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\resources\
Next you need to make your captions:
Save this in this format:
Encoding: UCS-2 Little Endian
Filename: closecaption_0.txt
Folder: C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\resources\
Save it exactly like that, and closecaption is NOT A TYPO
Drag the file closecaption_0.txt over the compiler.bat, This will generate closecaption_0.dat
We're not done yet in your autoexec.cfg set this
cc_linger_time controls how long the caption is on screen.
To use in-game, you use the command
Now I don't know how to make it multiline, I tried \n and \r, but it's not ascii encoded so that makes sense(\n does not render as text in game but \r does). I haven't tried any of the Unicode end of line characters or any of these:
trying to figure out the Closed Captioning already took 15 minutes of my time
Additional Text Properties:
Also when recompiling you need to restart CS:GO
I just created my own buy script, it uses multiple key combos on the number pad etc. and I also wanted to bind other controls. I could have just wrote it down on paper but meh and the echo command is pretty much useless.
So how do we do it we are going to use "Close Captioning" that was not a typo.
Prerequisites:
-CS:GO SDK
-A good Text Editor that allows you to encode in different formats. (Notepad++ recommended)
First open up your text editor
You need to find the captioncompiler.exe, default is below, just copy and paste.
Code:
"C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\bin\captioncompiler.exe" %1 pause
Next you need to make your captions:
Code:
lang { Language "0" Tokens { captionname "Displaying your Caption" } }
Encoding: UCS-2 Little Endian
Filename: closecaption_0.txt
Folder: C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\resources\
Save it exactly like that, and closecaption is NOT A TYPO
Drag the file closecaption_0.txt over the compiler.bat, This will generate closecaption_0.dat
We're not done yet in your autoexec.cfg set this
Code:
cc_subtitles 1 closecaption 1 cc_lang 0 cc_linger_time 1
To use in-game, you use the command
Code:
cc_emit captionname
Now I don't know how to make it multiline, I tried \n and \r, but it's not ascii encoded so that makes sense(\n does not render as text in game but \r does). I haven't tried any of the Unicode end of line characters or any of these:
Code:
captionname1 "This is \ a caption" //That's if it prints the literal value otherwise it would a. Not Compile, b. Not Work, or c. Treat it as a single line string. caption2 <<EOL This is a Caption EOL //Heredoc captionname3 "This is a caption"
Additional Text Properties:
Code:
<sfx> Marks a line as a sound effect that will only be displayed with full closed captioning. If the user has cc_subtitles set to "1", it will not display these lines. <clr:255,255,255> Sets the color of the caption using RGB color; 0 is no color, 255 is full color. For example, ;<clr:255,255,255> would be white. <b> Bolds all text following the tag. <i> Italics text following the tag.