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,854   Members: 6,183   Active Members: 4
Welcome to our newest member, Fermin13Q.

Today's Birthdays

Collapse

There are no members with birthdays today.

Top Active Users

Collapse

There are no top active users.

More Posts

Collapse

  • Reply to Hi guys!
    by Apache Warrior
    Hello Ghost. I hope you are doing well.
    Apache
    5 Jan 2025, 11:35 AM
  • Reply to Hi guys!
    by GhostHunter2024
    HAPPY NEW YEAR !!
    Well - just got back on my PC and played Delta Force game, Path of Exil 2, Diablo 4, BO6 and some WItcher3 , Ghost Recon Breakpoint...
    4 Jan 2025, 05:07 AM
  • Reply to New OLD "Private" is BACK to the LAIR
    by GhostHunter2024
    Yes, indeed. Have hardly time to GAME, to busy in the real world. Will see what 2025 brings and what games ?!
    Oh btw HAPPY NEW YEAR !!
    Best...
    4 Jan 2025, 05:02 AM
Working...
X