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,184   Posts: 269,829   Members: 6,182   Active Members: 5
Welcome to our newest member, newiron09.

Today's Birthdays

Collapse

Top Active Users

Collapse

There are no top active users.

More Posts

Collapse

  • Reply to BF4 new easter egg.. need to know moriss code
    by newiron09
    BTW on iOS use "Light Conversation", its an app from an artist...he spreaded it for light arrangements(stories in lights) in a city...propably...
    15 Sep 2024, 09:24 AM
  • Reply to Otterbox is 10 years old
    by newiron09
    Having tried many cases I've given up on expensive ones. Not convinced they are significantly better than an inexpensive gel case for 1/10 the money....
    15 Sep 2024, 09:20 AM
Working...
X