Upvote Upvoted 12 Downvote Downvoted
How to edit your HUD
posted in Q/A Help
1
#1
10 Frags +

I've seen a lot of these threads, and I figure it's time to make a general guide for it.

This will assume you have no knowledge of how the syntax and elements work.

I want to change my crosshair, how do?

You want to go to your hudlayout
(C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\custom\my_custom_stuff\scripts).

Somewhere in that file will be something that looks like this:

"x"}
"{
	"visible"	"0"
	"controlName" "CExLabel"
	"enabled" "1"
	"zpos" "420"
	"textAlignment" "center"
	"fieldName" "Crosshair1"
	"labelText" "a" "font"

	"size: 16, outline: on"

	"xpos"	"c-25"
	"ypos"	"c-24"
	"wide"	"50"
	"tall"	"50"
	"zpos"  "420"

	"fgcolor"	"0 0 0 255"	}

This is from my modified version of broeselhud, so it might be formatted differently from yours, but it should still have most of the same info.

What it means:

xpos/ypos: The coordinates for the element. c means center, as in the center of your monitor (Or whatever res you're playing on)

zpos: The layer level of the element. This will usually be somewhere around 0-10, higher means it will appear above lower elements. Think of it as pieces of paper, the zpos decrees the order in which they are stacked.

wide/tall: Harder to explain, think of it as the area in which the element is allowed to be in, affects cutoff and placement if centered or aligned left/right.

visible: Determines whether or not to show the element.
enabled: Determines whether or not to load the element. Both of these need to be set to "1" for the element to appear.

fgcolor: Determines the color of the element. This is determined by a hex color code (RGB) and an alpha (Transparency). This exists for all low-level objects (Text, backgrounds, crosshairs, etc.)

If you want to change the color of an element, just change the color code.

If you want to move it, it's a little more complicated. You have to try moving it around with xpos and ypos, AND with wide and tall.

I want to change something other than my crosshair, how do?

This is a little more complicated. Syntax is the same, and vairables are the same, though (xpos, fgcolor, etc)

For this, go to
(C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\custom\my_custom_stuff\resource\ui)
Here, you will see a whole bunch of .res files, which determine various elements shown by their names. Find the one which best describes what you're looking for (Check the names of the elements inside to make sure). For example, let's say we want to change the position and color of the ammo in clip.

For this, we would go to HudAmmoWeapons, and look for the section titled "AmmoInClip". Once there, we see

	"AmmoInClip"
	{
		"ControlName"	"CExLabel"
		"fieldName"		"AmmoInClip"
		"font"		"surface72"
		"fgcolor"		"0 0 0 255"
		"xpos"		"-90"
		"ypos"		"l160"
		"zpos"		"420"
		"wide"		"200"
		"tall"		"65"
		"visible"		"1"
		"enabled"		"1"
		"textAlignment"	"east"	
		"labelText"		"%Ammo%"
	}

Pretty much the same as the crosshair, but a little different. The color and placement work the same as before, though unlike crosshairs, numbers and text change, meaning you have to do some testing to make sure that they work with larger numbers (200 for ammo is usually the highest, check up to around 10,000 for health).

Notes

Editing simple elements like the crosshair, health, ammo, etc. is pretty simple and can be done quickly, but larger constructs (Most notably the scoreboard) are composed of a lot of smaller elements, so it's very easy to screw it up. Always back up your HUD before editing it, hud_reloadscheme in the console to refresh it.

This is a much more in-depth guide, which you should definitely look at if you want to majorly edit your HUD.

Post any errors you can find in the guide below, I'm no expert on this.

I've seen a lot of these threads, and I figure it's time to make a general guide for it.

This will assume you have no knowledge of how the syntax and elements work.

[b]I want to change my crosshair, how do?[/b]

You want to go to your hudlayout
(C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\custom\my_custom_stuff\scripts).

Somewhere in that file will be something that looks like this:

[code]"x"}
"{
"visible" "0"
"controlName" "CExLabel"
"enabled" "1"
"zpos" "420"
"textAlignment" "center"
"fieldName" "Crosshair1"
"labelText" "a" "font"

"size: 16, outline: on"

"xpos" "c-25"
"ypos" "c-24"
"wide" "50"
"tall" "50"
"zpos" "420"

"fgcolor" "0 0 0 255" }[/code]

This is from my modified version of broeselhud, so it might be formatted differently from yours, but it should still have most of the same info.

[u]What it means:[/u]

xpos/ypos: The coordinates for the element. c means center, as in the center of your monitor (Or whatever res you're playing on)

zpos: The layer level of the element. This will usually be somewhere around 0-10, higher means it will appear above lower elements. Think of it as pieces of paper, the zpos decrees the order in which they are stacked.

wide/tall: Harder to explain, think of it as the area in which the element is allowed to be in, affects cutoff and placement if centered or aligned left/right.

visible: Determines whether or not to show the element.
enabled: Determines whether or not to load the element. Both of these need to be set to "1" for the element to appear.

fgcolor: Determines the color of the element. This is determined by a hex color code (RGB) and an alpha (Transparency). This exists for all low-level objects (Text, backgrounds, crosshairs, etc.)

If you want to change the color of an element, just change the color code.

If you want to move it, it's a little more complicated. You have to try moving it around with xpos and ypos, AND with wide and tall.

[b]I want to change something other than my crosshair, how do?[/b]

This is a little more complicated. Syntax is the same, and vairables are the same, though (xpos, fgcolor, etc)

For this, go to
(C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\custom\my_custom_stuff\resource\ui)
Here, you will see a whole bunch of .res files, which determine various elements shown by their names. Find the one which best describes what you're looking for (Check the names of the elements inside to make sure). For example, let's say we want to change the position and color of the ammo in clip.

For this, we would go to HudAmmoWeapons, and look for the section titled "AmmoInClip". Once there, we see
[code] "AmmoInClip"
{
"ControlName" "CExLabel"
"fieldName" "AmmoInClip"
"font" "surface72"
"fgcolor" "0 0 0 255"
"xpos" "-90"
"ypos" "l160"
"zpos" "420"
"wide" "200"
"tall" "65"
"visible" "1"
"enabled" "1"
"textAlignment" "east"
"labelText" "%Ammo%"
}[/code]
Pretty much the same as the crosshair, but a little different. The color and placement work the same as before, though unlike crosshairs, numbers and text change, meaning you have to do some testing to make sure that they work with larger numbers (200 for ammo is usually the highest, check up to around 10,000 for health).

[b]Notes[/b]

Editing simple elements like the crosshair, health, ammo, etc. is pretty simple and can be done quickly, but larger constructs (Most notably the scoreboard) are composed of a lot of smaller elements, so it's very easy to screw it up. Always back up your HUD before editing it, hud_reloadscheme in the console to refresh it.

[url=http://doodlesstuff.com/?tutorial=tf2hud]This[/url] is a much more in-depth guide, which you should definitely look at if you want to majorly edit your HUD.

Post any errors you can find in the guide below, I'm no expert on this.
2
#2
4 Frags +
Show Content
pls sticky
[spoiler]pls sticky[/spoiler]
3
#3
0 Frags +

What if I want to change the colouor of my uber percentage with KBNhud. It works until i actually uber then it goes back to white. Same if my ammo goes into the "red." Is there anyway to change/fix that?

What if I want to change the colouor of my uber percentage with KBNhud. It works until i actually uber then it goes back to white. Same if my ammo goes into the "red." Is there anyway to change/fix that?
4
#4
2 Frags +
WalrusWhat if I want to change the colouor of my uber percentage with KBNhud. It works until i actually uber then it goes back to white. Same if my ammo goes into the "red." Is there anyway to change/fix that?

change the fgcolor for chargemeter in resource/ui/HudMedicCharge.res

then change the chargemeter fgcolors under event HudMedicCharged and HudMedicChargedStop in scripts/hudanimations_tf.txt

if you want to change the number color that's "chargelabel"

[quote=Walrus]What if I want to change the colouor of my uber percentage with KBNhud. It works until i actually uber then it goes back to white. Same if my ammo goes into the "red." Is there anyway to change/fix that?[/quote]
change the fgcolor for chargemeter in resource/ui/HudMedicCharge.res

then change the chargemeter fgcolors under event HudMedicCharged and HudMedicChargedStop in scripts/hudanimations_tf.txt

if you want to change the number color that's "chargelabel"
5
#5
1 Frags +
change the fgcolor for chargemeter in resource/ui/HudMedicCharge.res

for "ChargeMeter" there is no fgcolor. And there is 4 different ChargeMeters. There's ChargeMeter, ChargeMeter1, ChargeMeter2, ChargeMeter3, and ChargeMeter4, all of which have no fgcolor. I've tried adding it and it doesn't work.
Just "ChargeMeter" looks like this:

"ChargeMeter"
{
"ControlName" "ContinuousProgressBar"
"fieldName" "ChargeMeter"
"font" "Default"
"xpos" "0"
"ypos" "23"
"zpos" "2"
"wide" "195"
"tall" "5"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "Left"
"dulltext" "0"
"brighttext" "0"
}

[quote]change the fgcolor for chargemeter in resource/ui/HudMedicCharge.res[/quote]

for "ChargeMeter" there is no fgcolor. And there is 4 different ChargeMeters. There's ChargeMeter, ChargeMeter1, ChargeMeter2, ChargeMeter3, and ChargeMeter4, all of which have no fgcolor. I've tried adding it and it doesn't work.
Just "ChargeMeter" looks like this:

"ChargeMeter"
{
"ControlName" "ContinuousProgressBar"
"fieldName" "ChargeMeter"
"font" "Default"
"xpos" "0"
"ypos" "23"
"zpos" "2"
"wide" "195"
"tall" "5"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"textAlignment" "Left"
"dulltext" "0"
"brighttext" "0"
}
6
#6
1 Frags +

Here's the resource I use to determine what changes what:
http://doodlesstuff.com/?tutorial=tf2hud

Here's the resource I use to determine what changes what:
http://doodlesstuff.com/?tutorial=tf2hud
7
#7
0 Frags +
KaeyelHere's the resource I use to determine what changes what:
http://doodlesstuff.com/?tutorial=tf2hud

Adding that to the main post, simply too good to leave out.

[quote=Kaeyel]Here's the resource I use to determine what changes what:
http://doodlesstuff.com/?tutorial=tf2hud[/quote]
Adding that to the main post, simply too good to leave out.
Please sign in through STEAM to post a comment.