Kills, Deaths and Caps

updated steampipeSections

The Kills and Death area

The Kills and Death font

The Kills and Death background

The Kills and Death icons

The Kills and Death CVAR's (commands)

The Kills and Death area: The starting point for understanding how this area displays is the hudlayout.res. After you get the file and place it in the custom folder open the scripts\hudlayout.res and look at the "HudDeathNotice" section...


        "fieldName"               "HudDeathNotice"
        "visible"                 "1"
        "enabled"                 "1"
        "xpos"                    "r640"
        "wide"                    "640"
        "tall"                    "480"

        "MaxDeathNotices"         "4"
        "LineHeight"              "19"
        "RightJustify"            "1"    // If 1, draw notices from the right
        "TextFont"                "ChatFont"
        "CTTextColor"             "CT_Blue"
        "TerroristTextColor"      "T_Red"    
        "BackgroundColor"         "HudBackground"
        "ActiveBackgroundColor"   "HudBackgroundActiveSolid"


The section can control most of the adjustments for the kills and deaths.

Positioning is tricky, first thing to note is the "xpos" value "r640" the "r" in front means this is "drawing" or displaying the panel and all the contents from right to left. Normally all panels in the VGUI will start to display from left - top left corner, this "r" changes that from left to right.

You can see by the wide and tall setting it is taking up the whole screen, there is no "ypos" setting because of this, it just displays from the very top by default.

kandd messedup"MaxDeathNotices"        "4"  is a setting for the maximum amount of notices you can have, you can have 1 - 17 if you like, 1 gives one notice and around 17 they are just about off the bottom of the screen. You can fool with this via setting a console CVAR hud_deathnotice_time to "60" so they display for 60 seconds, default is 6 (seconds). See the image on the right.

"LineHeight"    "19" is the spacing between the notices, but don't reduce these too far or you will get overlapping icons, "12" is really about the minimum, you will get some overlap but it looks OK. See the image on the right.

"RightJustify" is supposed to control left or right control of drawing the notice, like a few items in the VGUI it seems to be a left over setting, or because the way the background works you don't notice a change anyway. Whatever, leave it alone as normally it has no effect.


 The Kills and Death font: The font is referenced in the section... "TextFont"        "ChatFont" you can change that if you wish, I place a new font in the clientscheme.res and change the font name in this file to set a new font.

You would think you could change the font color too in the next two lines... "CTTextColor" and "TerroristTextColor" . Well you would be wrong. They are locked in the client.dll and you can't.

What you can do is set different backgrounds, (see next section) or place a setting in a custom font like "additive"  "1" ...

        "KDFontLIGHT" // New font for kills and Deaths one size smaller than chat
                "name"        "Microsoft Sans Serif" //"Verdana"
                "tall"        "11" //"12" = Standard "11" = Small
                "weight"    "600" //"200"
                "range"        "0x0000 0x017F"
                "yres"    "480 599"
                "additive"        "1"                

...that gives the font color a washed out whiter look.

Sucks that we cannot change the team colors, affects colorblind persons quite a lot.

 The Kills and Death background: There are two methods you can use here.

  1. Edit the scripts\hudlayout.res file
  2. Edit the clientscheme.res file and the hudlayout.res file is more complicated but makes it easy to change for multiple colors if making HUD's in a package with more than one color option.

Method 1 by editing the hudlayout.res is simple and the quickest, just place a RGB color in the last two lines of the HudDeathNotice section...

black clear dethnotice"BackgroundColor"           .... is the background of OTHER players notices.

"ActiveBackgroundColor"  .... is the background of YOUR players notices.

So if you wanted a clear background for others and a nice black for your kills...


     "BackgroundColor"              "0 0 0 0"     //others kills   Blank no color
     "ActiveBackgroundColor"    "0 0 0 190" //your kills A transparent black

 Method 2 You should consider if you are making a HUD download that has more than one color option, setting up the files this way means you will only need to change the clientscheme.res.

1. Open the clientscheme.res and find this...

 "HudBackground"                  "123 110 59 184"
"HudBackgroundActive" "240 207 78 117"
"HudBackgroundUnusable" "192 28 0 140"
"HudBackgroundActiveSolid" "240 207 78 180"

2. Change.. "HudBackgroundActiveSolid"    "0 0 0 0"

3. Next add two new colors in the "Colors" section...

     //Kills and Deaths background        
        "HudKillsDeathsOthers"        "0 0 0 0"       // Background of Kills/Deaths- Other players.
        "HudKillsDeathsYou"            "0 0 0 210"       // Background of Kills/Deaths- YOU!

4. Next add the new colors to the hudlayout.res....

         "BackgroundColor"            "HudKillsDeathsOthers" //others kills
        "ActiveBackgroundColor"    "HudKillsDeathsYou" //your kills

Now you only need to change the two new colors in clientscheme.res to make all the HUD colors change, "HudKillsDeathsOthers" and "HudKillsDeathsYou" no need to change the hudlayout.res.

In my opinion the code should have been set up like this as standard, the clientscheme.res is where the color and fonts should be... not other files! Very messy to edit.

The Kills and Death icons: death iconsThere are not many adjustments you can do here via HUD file edits, some are kept locked up in the client.dll and the mod_textures.txt. The method of displaying these on the screen is the same as the "current weapon" images, it is one large image with lots of tiny images and the mod_textures.txt file sets the height, width and sets the "xpos" and "ypos" coordinates.


The image is in dod_pak_dir.vpk ... root\materials\sprites\hud\death_icons.vtf

The settings are in the top the scripts\mod_textures.txt, to display the allied Thompson it looks like this...

            "file"        "sprites/hud/death_icons"
            "x"        "337"
            "y"        "0"
            "width"        "175"
            "height"    "61"

Along with the images in death_icons.vtf there are also some other images and a font, the death skull is "character" "S" in resource\dodlogo.ttf, the bomb target is sprites\hud\explosion.vtf, defended icon is sprites\hud\shield_deathmessages.

Also the objective icons, nemesis and domination mode icons also display there... no wonder it is so crowded!

But be warned, changing this is of no real advantage, there are CVAR's to change the icons why not do it that way!

See the next section.

The Kills and Death CVAR's (commands): These are not widely used by the community, I would say very few players actually know they are there.

I use these in my Teammenu buttons and below are the settings I use, they are a good guide to the ranges possible.

The items that adjust are Kills and Deaths display time, adjust background transparency and Icon size.

hud_deathnotice_time - Turn off, or reduce the time the Kills and Deaths display.

Off...   hud_deathnotice_time 0

0.5s... hud_deathnotice_time 0.5

4sec... hud_deathnotice_time 4

DEF...  hud_deathnotice_time 6  (default and displays for 6 seconds)

cl_deathicon_bg_alpha - Turn off, or reduce the Kills and Deaths background transparency.

Off...    cl_deathicon_bg_alpha 0     (no background will show)

20%...  cl_deathicon_bg_alpha 0.2

60%...  cl_deathicon_bg_alpha 0.6

DEF...   cl_deathicon_bg_alpha 1   (default and is a solid background or the HUD default)

cl_deathicon_height AND cl_deathicon_width - Turn off, or reduce the Kills and Deaths Icon size.

Off...    cl_deathicon_height 0; cl_deathicon_width 0

20%...  cl_deathicon_height 9; cl_deathicon_width 25

60%...  cl_deathicon_height 12; cl_deathicon_width 38

DEF...   cl_deathicon_height 16; cl_deathicon_width 54 (default and is large)



Enter Amount Copyright © 2011. All Rights Reserved.