Chat area in HL2 games


Chat Text Area files

Moving the Chat box as a whole panel

Positioning of the items inside the chat box

Color and fonts and some size control of items

Control over the Filters box

Chat box Scroll-Bar

Changing the Chat Text Size and Font

Changing Size and Position of the Chat Text and box

Another left over function

 Chat Text Area files. VALVe changed the chat for all Source games a while back, this is now updated May 2009. You can also use the below info for other Source games, just replace the game folder address "dod" with the game folder of your mod... like "cstrike" for CSS.

Since this was originally written the whole chat area is now controlled via separate files, you will not have these in your dod folder by default, you need to grab the latest default file in the GCF files, (look at note below). You should learn how to do t his before proceeding, it is well worth the effort and is the base of editing any HUD file, Graphics, mapping files. Learn how here. (opens in new window just click it)
NOTE: When looking for these files you will find they may not be in your mods GCF file, go to base source engine 2.gcf file... hl2/resource and grab these...
resource/UI/BaseChat.res ... Controls the chat box appearance
resource/UI/ChatFilters.res ... Controls the filters button
resource/ChatScheme.res ... Controls the fonts for the whole area

Grabbing these and placing them in your mod folder is the way you override the main file in base source engine 2.gcf the game engine will always look at the mod folder files first, if none are there, the files in base source engine 2.gcf take control.
(Game folder name based on dods "dod" .... for CSS game folder is "cstrike" and TF2 is "tf")
If you are doing this for another game just substute "dod" for your game folder name.

Moving the Chat box as a whole panel.
Moving the chat box around is done via editing the BaseChat.res file found in dod (or tf or cstrike)/resource/ui and the 'xpos", "ypos", "wide" and "tall". Below is an exampe of the dods winpanel that works the same for most panels...
thumb x_y_pos  thumb wide_tall
NOTE: The dod/scripts/HudLayout.res "HudChat" section is still in this file but settings in this section are now redundant and do not work.
Positioning while in game in most cases is possible, some changes require a restart of the game, especially any changes to "Scheme.res" files like the ClientSheme.res. Some will only require a map change.

Positioning of the items inside the chat box  (see below for that file, click here)
dod/resource/UI/BaseChat.res has the settings you need to move and manipulate the main panel.
Color and fonts and some size control of items
dod/resource/ChatScheme.res has the settings you need to adjust fonts, colors of panels, input lines, scroll-bar size.
* Important! Please note that the color or the chat font itself and team colors cannot be changed, this is not controlled by the game folder files. CSS and dods are Orange, TF2 is a Grey but they can't be changed. The input line font color is changeable!
Control over the Filters box
Usually you will not need to touch this, mostly the box will suit most people and the color scheme you adjust for the main chat box will be the same.
valve_vgui_chat_box.jpg   thumb_chat_text_colors
Chat box Scroll-BarThe scroll-bar is a area where you can trim it down a bit, look at "dod/resource/ChatScheme.res" , find around line 133...
"ScrollBar.Wide "17"
This is the width of the scroll-bar, Think it is too wide? Drop it down to "5" and have another look.
Changing the Chat Text Size and Font.
It is about half way down the ChatScheme.res file... dod/resource or cstrike/resource Folder. Look at the first group in that section called "ChatFont"...

"name" "Arial"
"tall" "10"
"weight" "700"
"yres" "480 599"
"dropshadow" "1"

If mine is too small just increase all the number values beside "tall" ....
"name" =
The Font type.
"tall" = The Font Size.
"weight" = increase will mean bolder font.
"yres" = The screen res or more acuately, the Height of a set of screen resolutions. The above one is for 480x600.... that's why there are 5 different sizes, for 5 different screen resolutions, all based on the "y" resolution...the height. Make sure you do all of them or at least the screen res/height you use.

"dropshadow" = That thin black outline (shadow) around the letters in the text... "0" turns it off.

Changing Size and Position of the Chat Text and box.
This can be modified by finding the "HudChat" section in the BaseChat.res file in the dod/resource/UI Folder. The settings below are from my dods version 8 HUD...
"ControlName" "EditablePanel"
"fieldName" "HudChat"
"visible" "1" ....................// ( "1" = visable "0" = not visable)
"enabled" "1" .....................// ( "1" = enabled "0" = not enabled)
"xpos" "2" .....................// (The width position from top left corner of the box)
"ypos" "315" .................// (The height position from top left corner of the box)
"wide" "250" ................// (How wide the chat box is)
"tall" "100" ................// (How high the chat box is)
"PaintBackgroundType" "2" ...// (default "2" this makes rounded corners on the panel.)

Once you have changed that section you may like to adjust the sections below it. See below for the changes (in white) I made for the rest.
Be careful with the "ChatFiltersButton" section and "HudChatHistory" section settings, too much adjustment and they will go out of the allowed area.

"ControlName" "EditablePanel"
"fieldName" "ChatInputLine"
"visible" "1"
"enabled" "1"
"xpos" "34"
"ypos" "447"
"wide" "213"
"tall" "2"
"PaintBackgroundType" "0"

"ControlName" "Button"
"fieldName" "ChatFiltersButton"
"xpos" "2" //"247"
"ypos" "84" //"84"
"wide" "30"
"tall" "11"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#chat_filterbutton"
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"Default" "0"
"PaintBackgroundType" "2"

"ControlName" "RichText"
"fieldName" "HudChatHistory"
"xpos" "2"
"ypos" "2" //"5"
"wide" "246"
"tall" "75"
"wrap" "1"
"autoResize" "1"
"pinCorner" "1"
"visible" "1"
"enabled" "1"
"labelText" ""
"textAlignment" "south-west"
"font" "ChatFont"
"maxchars" "-1"

Another left over function
In the past, when you changed the chat text it used to change the text in the dods Kills, Death and Capture Notices.
This will not happen anymore but VALVe have left the "ChatFont" section in the ClientScheme.res file.
This now only changes the kills and deaths and some of the scoreboard now.

dod/resource/UI/BaseChat.res now controls x/y ...

Enter Amount Copyright © 2011. All Rights Reserved.