Back to dodbits.com
Copyright dodbits.com 2005                 Copyright explained... E-theft!     Dont even try it mate, I know where you live  :)
The Stamina Bar.


This Tutorial describes where to find the files to change the colours and position of the Stamina Bar.

Colours.

You will need to edit the ClientScheme.res file, open it up in Notepad.

I like to see green, yellow, orange, red if you progress through from a low value to a high value, like cold to hot. The information below is how I changed my HUD. You may not like the colours I have used, but at least it will help you find the places to change them : )

Here is the group controlling the colors in the stamina bar (standard colors) very near the top of the ClientScheme.res file…

"HudProgressBarActive"                "240 207 78 255"
"HudProgressBarInActive"             "140 120 73 255"
"HudProgressBarActiveLow"         "240 30 30 255"
"HudProgressBarInActiveLow"        "240 30 30 99"



I first worked out the stages, then changed the colors of the bar…

FUNCTION            NAME                                       COLOR CODE

LOW
                "HudProgressBarActive"               "100 120 66 255"  
//Green

MEDLOW        "HudProgressBarInActive"               "251 206 60 255"  //Yellow

MEDHIGH       "HudProgressBarActiveLow"               "255 176 0 255" 
//Orange

HIGH                 "HudProgressBarInActiveLow"   "240 30 30 255"  //Bright red

So now I replaced the standard ones…

"HudProgressBarActive"                "100 120 66 255"
"HudProgressBarInActive"            "251 206 60 255"
"HudProgressBarActiveLow"          "255 176 0 255"
"HudProgressBarInActiveLow"        "240 30 30 255"


The icon, (the little running man) is still not fixed yet, here is the standard control for that about ¼ of the way down the file…

                HudStaminaIcon.Active                "HudProgressBarActive"
                HudStaminaIcon.ActiveLow                "HudProgressBarActive"

The "HudProgressBarActive" (on the right top line) is ok, it is green.

The "HudProgressBarActiveLow" (on the right top line, my orange color), has to be changed to red, just replace it with "HudProgressBarInActiveLow" now when the red (high) is on the stamina bar the icon will match. It should look like this now…

                HudStaminaIcon.Active                "HudProgressBarActive"
                HudStaminaIcon.ActiveLow                "HudProgressBarInActiveLow"

After all this, when in-game you sprint…


First stage… the bar is Green and so is the Icon.
Second stage… the bar is Yellow but the Icon stays Green.
Third stage… the bar is Orange the Icon changes to Red.
Forth stage… the bar is Red the Icon stays Red.

I picked those colors so the Green will not stand out so much… less distracting but when you are running out of Stamina… you will see the brighter colors out of the corner of your eye.


Changing the Position and Altering behavior of the bar.

You will need to edit the Resource/UI/HudPlayerStatusStamina.res file.

Open it up in Notepad.

This file has 3 sections. Some of the adjustments are self explanatory like...
"visible"   "1"  so I won't repeat the description of them every time and instead just place the items of most interest in that section.




"StaminaBackground" ...It's the background
{
        "ControlName"        "EditablePanel"
        "fieldName"                "StaminaBackground"
        "xpos"                        "6"
...Adjusting this will move left and right.
        "ypos"                        "9" ...Adjusting this will move up and down.
        "wide"                        "105" ...Makes it wider/narrower. (see below for important note!)
        "tall"                        "9" ...Makes it taller/smaller. (see below for important note!)
        "visible"                "1" ... "0" makes it disable.
        "enabled"                "1" ... "0" makes it disable.
        "CornerToCut"        "bottom_right" ...The corner you want to "cut".
        "CornerCutSize"        "5" ...The size of the cut in the corner.

"StaminaIcon" ...It's the ICON
{
        "ControlName"        "ImagePanel"
        "fieldName"                "StaminaIcon"
        "xpos"                        "9"
        "ypos"                        "1"
        "wide"                        "24"
        "tall"                        "24"
        "visible"                "1"
        "enabled"                "1"
        "scaleImage"        "1"        
        "stamina_icon"        "stamina_icon"
        "warning_level"        ".35"
...is the percentage level of when it changes colour. icon changes colour. (Colour controlled by the ClientScheme.res file).

"StaminaProgressBar" ...It's the segmented bar graph.
{
        "ControlName"        "Panel"
        "fieldName"                "StaminaProgressBar"
        "xpos"                        "31"
        "ypos"                        "9"
        "wide"                        "210"
        "tall"                        "10"
        "visible"                "1"
        "enabled"                "1"
        "slice_width"        "2"
...The size of the single bars.
        "slice_spacer"        "2" ...The size of the gap between the bars
        "warning_level"        ".35" ...is the percentage level of where it changes colour in the Bar graph ".50" will be the middle of the bar.  (Colours, four of them, controlled by the ClientScheme.res file).


IMPORTANT NOTE ABOUT POSITIONING CERTAIN PANELS...

You may find sometimes that you position a panel and it gets "cut off".

This does happen sometimes when you have edited a file in another place that controls the sizes in that area.

To explain: We have opened
HudPlayerStatusStamina.res file to change the width in the Stamina bar, you may want a long stamina bar like the standard one but you find it has been cut off...









The setting in the
HudPlayerStatusPanel.res file sets the size of the area where you can display the Stamina Bar...
"PlayerStatusStamina"
{
        "ControlName"                "EditablePanel"
        "fieldName"                        "PlayerStatusStamina"
        "xpos"                                "10"
        "ypos"                                "161"
        "wide"                                "105" (Default "266")
This is the editable area for that item.
        "tall"                                "32"
        "visible"                        "1"
        "enabled"                        "1"

If you changed that to ... "wide"  "105"  you will only be able to use that width in the
HudPlayerStatusStamina.res file. Change it back to the default "266" and you can have your wide one ...










So, the
HudPlayerStatusPanel.res is kind of like the "Master settings" file for that area.

The
HudPlayerStatusStamina.res file adjusts the visual items to do with the Stamina Bar.
Back to... DoD Source Customizing your Hud. HUD Main Page