I got tired of constantly seeing questions about hud crosshairs so I figured I would write up a list/nerd essay on them and all of the ways to turn them on or off.
First off, there are two types of hud crosshairs:
[b]Text[/b] - These are created by putting a vector image into a font file and then adding that custom font to the hud. Then you simply add what is essentially a text box, in hudlayout.res, to the hud and the crosshair shows up. Can be animated in hudanimations_tf.txt in scripts to turn a different color when you hit someone or can be placed in hudplayerhealth.res to change color when you are overhealed or hurt.
[b]Image[/b] - A simple image file. To be placed into the hud the image needs to be converted into a .[url=https://developer.valvesoftware.com/wiki/Valve_Texture_Format]vtf[/url], or valve texture format, and needs to have an accompanying .vmt file that references the .vtf and gives specific information about its properties. Most custom textures are disabled by sv_pure 2, however, based broesel discovered that the textures in materials/vgui/replay/thumbnails are not checked by sv_pure and therefore can be used with impunity. Can't be animated.
You can, however, actually reference these image files as a custom in-game crosshair, which allows you to resize or recolor them with in-game commands. You cannot, to the best of my knowledge, implement them into a crosshair switcher. These also have quite a few weird restrictions, such as the fact that one needs to join a server with sv_pure set to 0 to load up the crosshair before joining any other sv_pure-restricted server, although after that the crosshair should work fine on any and all servers. More info [url=http://teamfortress.tv/thread/12383/real-custom-crosshairs-from-ozfortress]here[/url].
Toggling these crosshairs on or off.
[b]By Class[/b]
[list][url=http://teamfortress.tv/thread/1105/?page=1]Minmode[/url] - The best way to switch crosshairs by class (in my opinion) is through the command cl_hud_minmode. Basically, every element of your hud has certain values: positioning, enabled/disabled, color, font, etc. for both a regular sized hud and a minimal hud. So, by changing the console command cl_hud_minmode you can change certain properties, including whether or not something is visible. The reason I defined this method as 'by class' is because if you don't put the command in your class config files but instead toggle it mid-game it causes game stutter. Works with either text or image crosshairs.
[/list]
[b]Whenever[/b]
[list][url=http://teamfortress.tv/forum/thread/4134-how-to-use-multiple-hud-crosshairs/1]Achievement Tracker[/url] - There's an in-game command to display information about a certain achievement, and the achievement information is stored in a hud file, so you can basically put a hud crosshair in the file and then toggle it on/off with the console command at will without in-game stutter or freezes. The ideal method: works with either image or text crosshairs.
[url=http://teamfortress.tv/forum/thread/12384-toggling-crosshair]3 Dimensional Playermodel Background[/url] - When valve added in the 3d class model they also gave it, by default, a background. Later they added in a console command to turn this class model on or off. By replacing the background with an image file of your choice you can toggle an image crosshair on or off at will without in-game stutter. Only works with image crosshairs.
[/list]
I got tired of constantly seeing questions about hud crosshairs so I figured I would write up a list/nerd essay on them and all of the ways to turn them on or off.
First off, there are two types of hud crosshairs:
[list][b]Text[/b] - These are created by putting a vector image into a font file and then adding that custom font to the hud. Then you simply add what is essentially a text box, in hudlayout.res, to the hud and the crosshair shows up. Can be animated in hudanimations_tf.txt in scripts to turn a different color when you hit someone or can be placed in hudplayerhealth.res to change color when you are overhealed or hurt.
[/list]
[list][b]Image[/b] - A simple image file. To be placed into the hud the image needs to be converted into a .[url=https://developer.valvesoftware.com/wiki/Valve_Texture_Format]vtf[/url], or valve texture format, and needs to have an accompanying .vmt file that references the .vtf and gives specific information about its properties. Most custom textures are disabled by sv_pure 2, however, based broesel discovered that the textures in materials/vgui/replay/thumbnails are not checked by sv_pure and therefore can be used with impunity. Can't be animated.
You can, however, actually reference these image files as a custom in-game crosshair, which allows you to resize or recolor them with in-game commands. You cannot, to the best of my knowledge, implement them into a crosshair switcher. These also have quite a few weird restrictions, such as the fact that one needs to join a server with sv_pure set to 0 to load up the crosshair before joining any other sv_pure-restricted server, although after that the crosshair should work fine on any and all servers. More info [url=http://teamfortress.tv/thread/12383/real-custom-crosshairs-from-ozfortress]here[/url].
[/list]
Toggling these crosshairs on or off.
[list][b]By Class[/b]
[list][url=http://teamfortress.tv/thread/1105/?page=1]Minmode[/url] - The best way to switch crosshairs by class (in my opinion) is through the command cl_hud_minmode. Basically, every element of your hud has certain values: positioning, enabled/disabled, color, font, etc. for both a regular sized hud and a minimal hud. So, by changing the console command cl_hud_minmode you can change certain properties, including whether or not something is visible. The reason I defined this method as 'by class' is because if you don't put the command in your class config files but instead toggle it mid-game it causes game stutter. Works with either text or image crosshairs.
[/list]
[/list]
[list][b]Whenever[/b]
[list][url=http://teamfortress.tv/forum/thread/4134-how-to-use-multiple-hud-crosshairs/1]Achievement Tracker[/url] - There's an in-game command to display information about a certain achievement, and the achievement information is stored in a hud file, so you can basically put a hud crosshair in the file and then toggle it on/off with the console command at will without in-game stutter or freezes. The ideal method: works with either image or text crosshairs.
[/list]
[list][url=http://teamfortress.tv/forum/thread/12384-toggling-crosshair]3 Dimensional Playermodel Background[/url] - When valve added in the 3d class model they also gave it, by default, a background. Later they added in a console command to turn this class model on or off. By replacing the background with an image file of your choice you can toggle an image crosshair on or off at will without in-game stutter. Only works with image crosshairs.
[/list]
[/list]
That was very useful thanks a lot mate!
That was very useful thanks a lot mate!
Does an "image crosshair" use the same parameters as a "text crosshair" to adjust the position (wide, tall, xpos, ypos)?
Does an "image crosshair" use the same parameters as a "text crosshair" to adjust the position (wide, tall, xpos, ypos)?
You can, however, actually reference these image files as a custom in-game crosshair, which allows you to resize or recolor them with in-game commands. You cannot, to the best of my knowledge, implement them into a crosshair switcher. More info here.
You should note the weird buggy restrictions on using these.
[quote]You can, however, actually reference these image files as a custom in-game crosshair, which allows you to resize or recolor them with in-game commands. You cannot, to the best of my knowledge, implement them into a crosshair switcher. More info here.[/quote]
You should note the weird buggy restrictions on using these.
wareyaYou should note the weird buggy restrictions on using these.
I'd be happy to add them, I just have never actually used that method myself. You mean that you need to join a sv_pure 0 server first?
[quote=wareya]
You should note the weird buggy restrictions on using these.[/quote]
I'd be happy to add them, I just have never actually used that method myself. You mean that you need to join a sv_pure 0 server first?
http://ozfortress.com/showthread.php?t=58545
dicks everywhere
CrizzlDoes an "image crosshair" use the same parameters as a "text crosshair" to adjust the position (wide, tall, xpos, ypos)?
Sorry I didn't see this. yes it does, they're functionally very similar.
[quote=Crizzl]Does an "image crosshair" use the same parameters as a "text crosshair" to adjust the position (wide, tall, xpos, ypos)?[/quote]
Sorry I didn't see this. yes it does, they're functionally very similar.
if i use the character model, as soon as i turn it on with a different crosshair, i cant turn it off
regardless of the command, as soon as its entered into console, the image is always displayed
if i use the character model, as soon as i turn it on with a different crosshair, i cant turn it off
regardless of the command, as soon as its entered into console, the image is always displayed
jake_desif i use the character model, as soon as i turn it on with a different crosshair, i cant turn it off
regardless of the command, as soon as its entered into console, the image is always displayed
In hudplayerclass.res, make sure that visible is set to 0 and enabled is set to 1 under "classmodelpanelbg". If visible is set to 1 then it will stay visible once toggled.
[quote=jake_des]if i use the character model, as soon as i turn it on with a different crosshair, i cant turn it off
regardless of the command, as soon as its entered into console, the image is always displayed[/quote]
In hudplayerclass.res, make sure that visible is set to 0 and enabled is set to 1 under "classmodelpanelbg". If visible is set to 1 then it will stay visible once toggled.
hanbrolojake_desif i use the character model, as soon as i turn it on with a different crosshair, i cant turn it off
regardless of the command, as soon as its entered into console, the image is always displayed
In hudplayerclass.res, make sure that visible is set to 0 and enabled is set to 1 under "classmodelpanelbg". If visible is set to 1 then it will stay visible once toggled.
still not working :/
this is my hudplayerclass.res
"Resource/UI/HudPlayerClass.res"
{
// player class data
"HudPlayerClass"
{
"ControlName" "EditablePanel"
"fieldName" "HudPlayerClass"
"xpos" "0"
"ypos" "0"
"zpos" "1"
"wide" "f0"
"tall" "480"
"visible" "1"
"enabled" "1"
}
"PlayerStatusClassImage"
{
"ControlName" "CTFClassImage"
"fieldName" "PlayerStatusClassImage"
"xpos" "10"
"ypos" "r103" // omp -- 1 down due to low-res grid.
"zpos" "2"
"wide" "50"
"tall" "50"
"visible" "1"
"enabled" "1"
"image" "../hud/class_scoutred"
"scaleImage" "1"
"alpha" "0"
}
"PlayerStatusSpyImage"
{
"ControlName" "CTFClassImage"
"fieldName" "PlayerStatusSpyImage"
"xpos" "9999"
"ypos" "9999"
"zpos" "2"
"wide" "55"
"wide_minmode" "27"
"tall" "55"
"tall_minmode" "27"
"visible" "1"
"enabled" "1"
"image" "../hud/class_spyred"
"scaleImage" "1"
"teambg_2" "../hud/class_spyred"
"teambg_3" "../hud/class_spyblue"
}
"PlayerStatusSpyOutlineImage"
{
"ControlName" "CTFImagePanel"
"fieldName" "PlayerStatusSpyOutlineImage"
"xpos" "9999"
"ypos" "9999"
"zpos" "7"
"wide" "55"
"wide_minmode" "27"
"tall" "55"
"tall_minmode" "27"
"visible" "0"
"enabled" "0"
"image" "../hud/class_spy_outline"
"scaleImage" "1"
}
"classmodelpanelBG"
{
"ControlName" "CTFImagePanel"
"fieldName" "classmodelpanelBG"
"xpos" "c-422"
"ypos" "c-235"
"zpos" "-10"
"wide" "900"
"tall" "900"
"visible" "0"
"enabled" "1"
"image" "replay/thumbnails/rl"
"scaleImage" "1"
}
}
[quote=hanbrolo][quote=jake_des]if i use the character model, as soon as i turn it on with a different crosshair, i cant turn it off
regardless of the command, as soon as its entered into console, the image is always displayed[/quote]
In hudplayerclass.res, make sure that visible is set to 0 and enabled is set to 1 under "classmodelpanelbg". If visible is set to 1 then it will stay visible once toggled.[/quote]
still not working :/
this is my hudplayerclass.res
[code]"Resource/UI/HudPlayerClass.res"
{
// player class data
"HudPlayerClass"
{
"ControlName" "EditablePanel"
"fieldName" "HudPlayerClass"
"xpos" "0"
"ypos" "0"
"zpos" "1"
"wide" "f0"
"tall" "480"
"visible" "1"
"enabled" "1"
}
"PlayerStatusClassImage"
{
"ControlName" "CTFClassImage"
"fieldName" "PlayerStatusClassImage"
"xpos" "10"
"ypos" "r103" // omp -- 1 down due to low-res grid.
"zpos" "2"
"wide" "50"
"tall" "50"
"visible" "1"
"enabled" "1"
"image" "../hud/class_scoutred"
"scaleImage" "1"
"alpha" "0"
}
"PlayerStatusSpyImage"
{
"ControlName" "CTFClassImage"
"fieldName" "PlayerStatusSpyImage"
"xpos" "9999"
"ypos" "9999"
"zpos" "2"
"wide" "55"
"wide_minmode" "27"
"tall" "55"
"tall_minmode" "27"
"visible" "1"
"enabled" "1"
"image" "../hud/class_spyred"
"scaleImage" "1"
"teambg_2" "../hud/class_spyred"
"teambg_3" "../hud/class_spyblue"
}
"PlayerStatusSpyOutlineImage"
{
"ControlName" "CTFImagePanel"
"fieldName" "PlayerStatusSpyOutlineImage"
"xpos" "9999"
"ypos" "9999"
"zpos" "7"
"wide" "55"
"wide_minmode" "27"
"tall" "55"
"tall_minmode" "27"
"visible" "0"
"enabled" "0"
"image" "../hud/class_spy_outline"
"scaleImage" "1"
}
"classmodelpanelBG"
{
"ControlName" "CTFImagePanel"
"fieldName" "classmodelpanelBG"
"xpos" "c-422"
"ypos" "c-235"
"zpos" "-10"
"wide" "900"
"tall" "900"
"visible" "0"
"enabled" "1"
"image" "replay/thumbnails/rl"
"scaleImage" "1"
}
}
[/code]
very weird. try this for your hudplayerclass.res instead. i literally just pasted your xhair into my hudplayerclass since mine works. this should help isolate the issue if nothing else. http://pastebin.com/pyH1RUNE
very weird. try this for your hudplayerclass.res instead. i literally just pasted your xhair into my hudplayerclass since mine works. this should help isolate the issue if nothing else. http://pastebin.com/pyH1RUNE
hanbrolovery weird. try this for your hudplayerclass.res instead. i literally just pasted your xhair into my hudplayerclass since mine works. this should help isolate the issue if nothing else. http://pastebin.com/pyH1RUNE
yeah still doesnt work :/ oh well
[quote=hanbrolo]very weird. try this for your hudplayerclass.res instead. i literally just pasted your xhair into my hudplayerclass since mine works. this should help isolate the issue if nothing else. http://pastebin.com/pyH1RUNE[/quote]
yeah still doesnt work :/ oh well
moved to mangachus hud edit thread
moved to mangachus hud edit thread