Announcement

Collapse
No announcement yet.

Tutorial: Echo Workaround

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tutorial: Echo Workaround

    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.
    Code:
    "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\bin\captioncompiler.exe" %1
    pause
    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:

    Code:
    lang
    { 
    	Language "0" 
    	Tokens 
    	{ 
    
    		captionname	"Displaying your Caption"
     
    	}
    }
    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
    Code:
    cc_subtitles 1
    closecaption 1
    cc_lang 0 
    cc_linger_time 1
    cc_linger_time controls how long the caption is on screen.

    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"
    trying to figure out the Closed Captioning already took 15 minutes of my time

    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.
    Also when recompiling you need to restart CS:GO

Cain's Lair Forums Statistics

Collapse

Topics: 26,187   Posts: 269,850   Members: 6,183   Active Members: 6
Welcome to our newest member, Fermin13Q.

Today's Birthdays

Collapse

Top Active Users

Collapse

There are no top active users.

More Posts

Collapse

  • Reply to Hi guys!
    by Evil_T0NY {CLR}
    I've been Alpha and will be Beta testing the Delta Force game. It's been really getting good reviews! Definitely a good Battlefield feel to it like the...
    14 Nov 2024, 08:50 PM
  • Reply to Hope your all OK over there
    by Apache Warrior
    We had 17 inches of rain from the storm on November 7, 2024.
    Apache
    11 Nov 2024, 07:55 AM
  • Reply to Hope your all OK over there
    by Sirex
    Aye, I'm inclined to agree with that lmao
    Gone are the days of warm summers and snow filled winters here, nothing but rain and wind for 8mths of...
    10 Nov 2024, 08:53 PM
  • Reply to Hope your all OK over there
    by Apache Warrior
    Now we have had a lot of flooding in this area and there are still a lot of houses that have not been repaired. Must be the apocalypse.
    ...
    8 Nov 2024, 09:23 AM
Working...
X