THIS GUIDE IS IN PROGRESS DEC 2023. I will update and remove this message when done.

22 Dec 2023

The half-life 25th anniversary update is causing issues with custom GUI and HUD files.

I will investigate and redo this page. For now ...be careful with custom files.

 

This guide continues on from the "Editing the GUI files" guide.

The HUD (Heads Up Display) is what you see in game, the chat, death notices, Team, Class and Scoreboard panels.

The files are many but the main file that controls the colors, borders and fonts is called "Clientscheme.res", normally it is found in the "dod\resource" folder.

For editing we are going to grab that file and make a new folder in Half-Life called "dod_addon".

This special folder is recognised by the engine and if you have a file there the engine will use that file. You can read all about that here if you didn't know that feature.

Before you start editing you need to know what a .res file is...

  • It's a text file, its a basic type we use to configure the GUI and HUD, game panels like a scoreboard.
  • You can use NotePad but I urge you to use NotePad++ as it will match my screens.
  • To make life easier, associate the file types .res, .cfg, .ini, .gam if you like but NotePad++ can open a file via the window right click menu.

To get set up, go to Your Drive:\ Your folders \steamapps\common\Half-Life\

Now make a new folder called "dod_addon". in the "dod_addon" folder make another called "resource".

Go to Your Drive:\ Your folders \steamapps\common\Half-Life\dod\resource. Copy the "clientscheme.res" file.

Paste the file into the "dod_addon\resource" folder you made.

Open the file with Notepad++.

As you can read in the header of the file it has sections and they are explained.

This is a file that defines a Scheme for colours, fonts, borders, panels, fonts, backgrounds, foregrounds...a lot. 

We will look at the "Colors" section first. Its a colour scheme and the defines main colours used in the HUD. 

Most have a description and we will add some to.

Here are some tips...

  • A method of finding what these setting do is to adjust something and look for a change.
  • For Colors, use a bright pink
  • For Fonts change the "tall" setting (font size) to something outrageous like for "16" make it "30".

Paste this line at the top after the // notes:... For a test color try Pink... "255 105 180 255"

Just remember, when adding lines that are for describing things, ensure you place "//" on the start of a line or behind a setting.

You can see that in use everywhere. 

"BaseText" "255 176 0 255" // used in text windows, lists

As you can see the forward slashes (2) behind that RGB colour code tell the engine to move on...nothing to see here, it goes to the next line.

If you don't... it will upset and break things.

Note this...  // "BrightControlText" that entire line has been kept there by Valve but it is now ignored.

 

Code:
 
//
// TRACKER SCHEME RESOURCE FILE
//
// sections:
//		colors			- all the colors used by the scheme
//		basesettings	- contains settings for app to use to draw controls
//		fonts			- list of all the fonts used by app
//		borders			- description of all the borders
//
// notes:       For a test color try Pink... "255 105 180 255"
// 		hit ctrl-alt-shift-R in the app to reload this file 
//
Scheme
{
	//Name - currently overriden in code
	//{
	//	"Name"	"ClientScheme"
	//}

	//////////////////////// COLORS ///////////////////////////
	Colors
	{
		// base colors
		"BaseText"		"255 176 0 255"	// used in text windows, lists
		"BrightBaseText"	"255 176 0 255"	// brightest text
		"SelectedText"		"255 176 0 255"	// selected text
		"DimBaseText"		"255 176 0 255"	// dim base text
		"LabelDimText"		"255 176 0 164"	// used for info text
		"ControlText"		"255 176 0 255"	// used in all text controls
	//	"BrightControlText"	"255 176 0 255"	// use for selected controls
		"BrightControlText"	"255 255 255 255"	// use for selected controls
		"DisabledText1"		"80 48 0 255"	// disabled text
		"DisabledText2"		"0 0 0 0"		// overlay color for disabled text (to give that inset look)
		"DimListText"		"188 112 0 255"	// offline friends, unsubscribed games, etc.



 

Note the format of the colors is a RGB type.

Red is the first, Green then Blue to make a vast amount of colors, 0 - 255 for the strength of each one.

See here... RGB Color Codes Chart and fool around with the RGB numbers.

The last one there is transparency, "0" is invisible (Transparent) and "255" is full (Opaque).

 

Let's look at the first section colours and the sub-section "base colors" 

First one "BaseText" let's put that RGB bright pink color in front of it like this remembering the "//" after it and keeping the default color to replace later...

"BaseText"   "255 105 180 255"  // "255 176 0 255" // used in text windows, lists

Save the file. Open the game.

You will immediately you can see what that does to the Team and Class panels and also the Top Spectator bar fonts. 

 team menu title  class menu title
 Team Menu title  Class Menu titles

 We will do this again and when you find a function white what you found in the notes behind that function.

Also remember that these also have a font type, size "tall", boldness of the font "weight" down in the fonts section.

Writing down this stuff is important. You will forget and when you do placing in...

 // used in text windows, lists Team Menu title, Class Menus titles, top spec bar fonts.

...will help later on.

Return "BaseText" to the standard, cut and paste the Pink color in the next one...

// base colors
"BaseText"             "255 176 0 255" // used in text windows, lists Team Menu title, Class Menus titles, top spec bar fonts.
"BrightBaseText"    "255 105 180 255" // "255 176 0 255" // brightest text

I'll save you some time. Now that one comes up with nothing obvious.

You will see that sometimes in this file, after all it was made before we could "Shift-Tab" and get to a browser.

When this happens it is better to just leave it alone but let's do a search in the file for "BrightBaseText".

This looks old...

"URLTextColor"        "BrightBaseText" // color that URL's show up in chat window

This gives a clue... possibly a armed (pressed) button foreground color and the color of the arrow when you mouse over a button?

     Menu
     {
           "FgColor" "DimBaseText"
           "BgColor" "ControlBG"
           "ArmedFgColor"     "BrightBaseText"
           "ArmedBgColor"     "SelectionBG"
           "DividerColor"        "BorderDark"
           "TextInset"               "6"
     }

      MenuButton // the little arrow on the side of boxes that triggers drop down menus?
    {
          "ButtonArrowColor" "    DimBaseText" // color of arrows
          "ButtonBgColor"          "WindowBG" // bg color of button. same as background color of text edit panes
          "ArmedArrowColor"     "BrightBaseText" // color of arrow when mouse is over button
          "ArmedBgColor"          "DimBaseText" // bg color of button when mouse is over button
    }

So ... when checking the HUD you have to look at ALL areas.

          "ArmedArrowColor"     "BrightBaseText" // color of arrow when mouse is over button

It did change something...

 commandmenuarrowtext
 "BrightBaseText" - Command Menu text and arrow when selected "Armed"

When testing you could miss a function. It's important to explore everything even the admin panel text that may only come up on line.

It's also used here...

// status selection
"StatusSelectFgColor" "BrightBaseText"
"StatusSelectFgColor2" "BrightControlText" // this is the color of the friends status

Here too...

// buddy buttons
    BuddyButton
    {
       "FgColor1"              "ControlText"
       "FgColor2"              "DimListText"
       "ArmedFgColor1"    "BrightBaseText"
       "ArmedFgColor2"    "BrightBaseText"
      "ArmedBgColor"       "SelectionBG"
    }

As you can see we are only two main colors in and you can now see the "Scheme" in action.

  • Change one color in the colors section and a whole lot can change.
  • Go further down the file in the "BASE SETTINGS" section and that group that use "BrightBaseText" can be individually changed.
  • Writing down those are important.
  • Searching for items is important.
  • Testing properly is important.

I want my Command Menu light grey and whites, I tested all those "BrightBaseText" entries in the "BASE SETTINGS" section and...none of those above in the BASE SETTINGS ...changed.

This like "Engine Font" in the GUI guide, it does alter the text for the Net graph and seemingly nothing else but checking again it altered the font when you look at your teammate and the hud displays the player health and name. Thats OK with me as it gets in the way.

It may...or may not affect other areas.

I went back to the "Colors" section" and changed it to a bright white...

"BrightBaseText" "255 255 255 255"  //"255 176 0 255" // brightest text - Command Menu (PRESS X to activate) text and arrows are affected 

 

Before we go on, these settings in BASE SETTINGS are words, titles of colors in the scheme.

We can add our own color in the Colors section too! Add this to the bottom of the Colors section.

"test" "255 105 180 255" //Special test Pink. for using in the BASE SETTINGS area.

Continuing on