Team Fortress 2

Team Fortress 2

Not enough ratings
TF2 Default Crosshair Info
By CLANG-CLANG
Some useful and interesting things about how TF2's crosshairs are assigned and used.

This will likely be good information to know if you're modding your HUD.
   
Award
Favorite
Favorited
Unfavorite
Purpose
I wanted to customise my TF2 crosshairs, but I wanted to make the design language consistent to how the vanilla game uses them.

I couldn't find much info about how TF2's vanilla crosshairs are assigned, so I thought it'd be useful to someone out there looking for this kind of information.
Standard Crosshairs Information
Default crosshairs
Team Fortress 2's default crosshairs are all part of a single image (sprite sheet), "sprites/crosshairs.vmf", and have their co-ordinates and sized referenced in each weapons' script file.



This was likely done as an optimisation trick at the time, but this means that the crosshairs are fixed, and they scale badly at higher resolutions.

Their co-ordinates are referenced below, for historical sake (note: I'm using the "crosshair" field from the weapon scripts for these values over "autoaim", as I believe those are for the console version of the game).

There are five main crosshairs used throughout TF2 (six if you count no crosshair).

Open Circle, Normal

Sprite Coordinates: 32,32
Sprite Size: 32x32

Description: A large circle with gaps inbetween quadraunts. This conveys that the current weapon's attacks can exceed beyond the crosshair (Rocket Launcher, Minigun, Melee)

Wide Cross

Sprite Coordinates: 64,0
Sprite Size: 32x32

Description: The large, stretched cross conveys precision (Sniper Rifles, Knives).

Dot With Brackets

Sprite Coordinates: 0,0
Sprite Size: 32x32

Description: A dot closed with brackets. This conveys bullet spread (Shotgun, Pistols). It should be noted that this is also TF2's default crosshair, albeit stretched.

Square Bracket

Sprite Coordinates: 0,48
Sprite Size: 24x24

Description: An incomplete rectangle with it's open side facing downwards. This conveys that the weapon held is not for direct combat use, and has a special function (Heavy Food, Spy Sappers).

Open Circle, Large
Sprite Coordinates: 64, 64
Sprite Size: 64x64

Description: A larger variant of the open circle that's only used for Heavy Miniguns.

Large Empty Plus

Sprite Coordinates: 0,64
Sprite Size: 32x32

Description: This crosshair is only used on all of Medic's Medi Guns; it's unwieldiness when aiming hints that it's not for combat use, and it's general shape is associated with medicine.
Alternate Crosshairs Information
Included with the vanilla game are 8 alternate crosshairs that are more for general purpose. They can either be selected in the standard Source Engine options menu, or with a console command (cl_crosshair_file).



I believe all, but one of these alternate crosshairs came from Day of Defeat: Source, but I remain unsure.

Extra info: Unlike the default TF2 crosshairs, each one of these alternate crosshairs are packaged by themselves, instead of being on a single sprite sheet.

Also, some of them also have additional frames for weapon recoil, although I don't believe they're used in TF2. I've listed it anyway, just in case.

crosshair1

Frames: 11
Description: Open plus with a dot.

crosshair2

Frames: 11
Description: Open plus (T) with a dot.

crosshair3

Frames: 1
Description: Closed circle.

crosshair4

Frames: 1
Description: Thin X.

crosshair5

Frames: 1
Description: Thick dot.

crosshair6

Frames: 11
Description: Plus without a dot. It's a copy of crosshair1, but loses it's dot in the alpha channel (likely due to being set to use Eight Bit Color and an extra "Unused" flags in it's VMT).

crosshair7

Frames: 1
Description: Plus without gap, similar to a common Quake Live crosshair.

default

Frames: 1
Description: Dot with Brackets; this is a TF2 stock crosshair scaled larger, but with stretching issues.
Crosshair Colours and Customisation
Most of the information here is taken from /r/TF2ScriptHelp's wiki: https://www.reddit.com/r/tf2scripthelp/wiki/crosshairs

cl_crosshair_file
This is your crosshair's basic appearence. Two quotation marks "" is TF2's default, per-weapon, crosshairs; naming it anything else (e.g. crosshair7) will change it to that. Note that for some bizarre reason, there is a crosshair called default, so using it won't reset this setting to it's unmodified action.

Crosshair colours
These commands control what colour your crosshair is, using RGB values (0-255).

"200" is default for all these fields:
  • Red: cl_crosshair_red
  • Green: cl_crosshair_green
  • Blue: cl_crosshair_blue

cl_crosshair_alpha
This handles transparency; lower values are more see-through (0-255). Default is "200".

cl_crosshair_scale
The size of your crosshair. Note that unless the crosshair you're using is a font (not a default setting), your crosshair will rescale itself stretched. Default size is "32".

Example CFG
This is what TF2's default settings look like, if you wish to modify it in a config file's script.
// Crosshair Settings // Crosshair Style // If not blank, the selected crosshair is used universally cl_crosshair_file "" // TF2's default per-weapon crosshair mode (not to be confused with the HL2-like one called "default") Def. "" (empty quotes) cl_crosshair_scale "32.0" // Crosshair Size Def. 32.0 // Crosshair Colour // Works for both default and custom font crosshairs; RGB values, 0-255 cl_crosshair_red "200" // Red Def. 200 cl_crosshair_blue "200" // Blue Def. 200 cl_crosshair_green "200" // Green Def. 200 cl_crosshairalpha "200" // Transparency Def. 200 [Doesn't work on my end; possibly a CS:S only command?]
TL;DR Standard Crosshair By Type
Unless specifically mentioned, the weapon crosshair is likely going to be one of these types:

Explosives
Open Circle
Hitscan
Dot with Brackets
Melee
Open Circle
Scout Crosshairs
Scatterguns: Dot With Brackets
Pistols: Dot With Brackets
Drinks (Crit-a-Cola, Bonk): Square Bracket
Melee: Open Circle

Special Cases
The Flying Guillotine: Open Circle
Mad Milk: Open Circle
Soldier Crosshairs
Rocket Launchers: Open Circle
Shotguns: Dot With Brackets
Melee: Open Circle

Special Weapons
Soldier Banners: Open Circle
The Righteous Bison: Dot With Brackets

The banners defies the convention of using the sideways bracket, as they feature special functions.
Pyro Crosshairs
Flame Throwers: Open Circle
Flare Guns: Dot with Brackets
Melee: Wide Cross

Special Cases
The Gas Passer: Open Circle
The Thermal Thruster: Wide Cross
The Hot Hand: Open Circle

The Hot Hand is an exception to Pyro's melee crosshairs, as it behaves wildly different compared to it's Fire Axes.
Demoman Crosshairs
Grenade Launchers: Open Circle
Stickybomb Launchers: Open Circle
Melee: Open Circle
Heavy Crosshairs
Miniguns: Open Circle
Shotguns: Dot with Brackets
Heavy's Food (Sandvich): Square Bracket
Melee: Open Circle

Special Cases
Heavy Melee Default Reskins: Wide Cross

Alternative reskins to the Heavy's Fists, such as the Ham Shank and Frying Pan, use a different weapon crosshair over the default weapon. This is likely an oversight.
Engineer Crosshairs
Shotguns: Dot with Brackets
Pistols: Dot with Brackets
Melee: Open Circle

Special Cases
The Rescue Ranger: Open Circle
The Pomson 6000: Dot with Brackets

The Wrangler: Wide Cross
The Short Circuit: Wide Cross

Build & Destroy Menus: No Crosshair
Building Placement: Square Bracket
Medic Crosshairs
Syringe Guns: Dot with Brackets
Medi Guns: Empty Plus
Melee: Wide Cross

Special Cases
Crusader's Crossbow: Dot with Brackets
Sniper Crosshairs
Sniper Rifles: Wide Cross
Bows: Dot with Brackets
SMGs: Dot with Brackets
Melee: Open Circle

Special Cases
Jarate: Open Circle
Spy Crosshairs
Revolvers: Wide Cross†
Sappers: Square Bracket
Knives: Wide Cross
Disguise Kit: No Crosshair

† - The Ambassador resizes your current crosshair size dynamically
Credits
CLANG-CLANG: Writer
Related Stuff
/r/tf2scripthelp wiki
Reddit wiki article about crosshair console variables. https://www.reddit.com/r/tf2scripthelp/wiki/crosshairs

TF2 HUD Crosshairs GitHub
Features multiple popular HUD crosshairs as one font file.
https://github.com/Hypnootize/TF2-Hud-Crosshairs

CFG.TF Weapon-specific crosshairs
Allows relatively easy crosshair customisation on a weapon-by-weapon type basis.
https://cfg.tf/tools/crosshairs/

TF2 HUD Editor
Allows tweaking of, and automatic updates to common HUDs using a GUI.
https://www.editor.criticalflaw.ca/

Youtube - TF2 - Extract Weapon Script files in 2 minutes
Shows how to extract and convert CTX weapon files to TXT for editing crosshairs, by Fakeman.

Note: The tool only works in Command Prompt. If you're using PowerShell, you'll need to type in cmd first in order to get these commands working.
https://youtu.be/4LYMrFEQ8Fw

HUD Development In HL2:DM Steam Guide
Although aimed at Half-Life 2: Deathmatch, this Steam guide gives a good outline of HUD modding for all Source Engine games.

https://steamproxy.net/sharedfiles/filedetails/?id=161652635
Extra: Modding Info
This section is sporadic, as this is info I've mostly gathered online at random.

Extracting Vanilla Crosshairs
If you wish to view the stock crosshairs from the game files, you'll need:
  • GCFScape: .vpk viewer and extractor
  • VTFEdit: .vtf tool
Default crosshairs are stored as texture files. TF2 stores the crosshair textures (VTF) and their Engine faterial files (VMT) are stored into two separate VPK archives.

Directories
If you want to extract the default files, you'll need to take them out of the following paths:

tf2_textures_dir.vpk
These are the .vtf files (images used)

materials\sprites\crosshairs.vtf - Default crosshairs
materials\vgui\crosshairs\*.vtf - Alternate crosshairs

tf2_misc_dir.vpk
These are for the .vmt files (material settings).

materials\sprites\crosshairs.vmt - Default crosshairs
materials\vgui\crosshairs\*.vmt - Alternate crosshairs

Crosshair Scaling
It should be noted as that the vanilla crosshairs are not vector graphics (not font files, in the case of Source 1 HUDs), they scale poorly when stretched. This can be caused by high screen resolutions, or the Ambassador's spread.

While replacing the vanilla crosshairs are possible, sv_pure settings can cause direct crosshair file replacements to not be applied. It's easier (and more compatible) to have new crosshairs in files not used by the vanilla game.

The workaround to this is one of two methods:
  1. Use a font character as a crosshair (requires font file).
  2. Use the HUD to always render the crosshair (see TF2HudEditor for this solution)

Add Hitmarkers
The easiest way to add hitmarkers to TF2 is to use the TF2 HUD Editor to generate a HUD with these enabled (linked above).



Instructions
  1. Open the HUD you want to modify.
  2. Under Crosshair, tick both Enable Crosshair and Toggle Hitmarker.
  3. Click on the Crosshair colour selector, and make it transparent by setting the Alpha (A) to 0 (see screenshot if you're unsure).
  4. Click on the Hitmarker colour selector, and choose your preferred colour (I suggest fully red). I highly recommend you make it fully opaque (set Alpha (A) to 255).
  5. Click Apply Changes, and you're done!

Weapon Scripts Sorted By Default Crosshair Type
These were taken from the unmodified game files, located inside tf2_misc_dir.vpk (in the scripts folder, they're all named as tf_weapon_*.ctx; you'l need to decrypt them to make it human readable & editable as a *.txt).

If a weapon isn't listed here, it's because it's based on another weapon (e.g. The Vaccinator is based on tf_weapon_medigun.txt).

Open Circle
tf_weapon_bat.txt tf_weapon_bat_fish.txt tf_weapon_bat_giftwrap.txt tf_weapon_bat_wood.txt tf_weapon_bottle.txt tf_weapon_buff_item.txt tf_weapon_cannon.txt tf_weapon_cleaver.txt tf_weapon_club.txt tf_weapon_fists.txt tf_weapon_flamethrower.txt tf_weapon_grenadelauncher.txt tf_weapon_jar.txt tf_weapon_jar_gas.txt tf_weapon_jar_milk.txt tf_weapon_katana.txt tf_weapon_parachute.txt tf_weapon_parachute_primary.txt tf_weapon_parachute_secondary.txt tf_weapon_particle_cannon.txt tf_weapon_passtime_gun.txt tf_weapon_pipebomblauncher.txt tf_weapon_robot_arm.txt tf_weapon_rocketlauncher.txt tf_weapon_rocketlauncher_airstrike.txt tf_weapon_rocketlauncher_directhit.txt tf_weapon_rocketlauncher_fireball.txt tf_weapon_shotgun_building_rescue.txt tf_weapon_shovel.txt tf_weapon_slap.txt tf_weapon_spellbook.txt tf_weapon_stickbomb.txt tf_weapon_sword.txt tf_weapon_wrench.txt
Wide Cross
tf_weapon_bonesaw.txt tf_weapon_breakable_sign.txt tf_weapon_fireaxe.txt tf_weapon_knife.txt tf_weapon_laser_pointer.txt tf_weapon_revolver.txt tf_weapon_rocketpack.txt tf_weapon_sniperrifle.txt tf_weapon_sniperrifle_classic.txt tf_weapon_sniperrifle_decap.txt
Dot With Brackets
tf_weapon_charged_smg.txt tf_weapon_compound_bow.txt tf_weapon_crossbow.txt tf_weapon_drg_pomson.txt tf_weapon_flaregun.txt tf_weapon_flaregun_revenge.txt tf_weapon_grapplinghook.txt tf_weapon_handgun_scout_primary.txt tf_weapon_handgun_scout_secondary.txt tf_weapon_mechanical_arm.txt tf_weapon_pep_brawler_blaster.txt tf_weapon_pistol.txt tf_weapon_pistol_scout.txt tf_weapon_raygun.txt tf_weapon_scattergun.txt tf_weapon_sentry_revenge.txt tf_weapon_shotgun_hwg.txt tf_weapon_shotgun_primary.txt tf_weapon_shotgun_pyro.txt tf_weapon_shotgun_soldier.txt tf_weapon_smg.txt tf_weapon_soda_popper.txt tf_weapon_syringegun_medic.txt
Square Bracket
tf_weapon_builder.txt tf_weapon_invis.txt tf_weapon_lunchbox.txt tf_weapon_lunchbox_drink.txt tf_weapon_objectselection.txt tf_weapon_pda_engineer_build.txt tf_weapon_pda_engineer_destroy.txt tf_weapon_pda_spy.txt tf_weapon_sapper.txt
Open Circle, Large
tf_weapon_minigun.txt
Large Empty Plus
tf_weapon_medigun.txt
15 Comments
pole21 14 Jun @ 7:09am 
yeah cl_crosshair_alpha doesn't work because you can adjust the RGB to make it transparent. But in CS2 you choose the colour with some command like crosshair_color 1 and you can change alpha after. valve games are weird sometimes.
CLANG-CLANG  [author] 24 Dec, 2023 @ 2:26am 
@Tizzer I don't believe there's a working console command that disables that behaviour, so the next best thing would be to either add a HUD panel that permanently has a fixed crosshair displaying on your HUD (i.e. not removed via death); or to use an overlay program to display a crosshair over the game window, while disabling the in-game crosshair using "crosshair 0".

I haven't played or modded TF2 for a while, so there's a chance I'm either wrong or forgetting something here.
Tizzer ☭ 22 Dec, 2023 @ 11:51am 
Can i remove the 'recoil expansion' of the crosshair?
CLANG-CLANG  [author] 30 Aug, 2023 @ 7:25pm 
No problem!
Sparktite 30 Aug, 2023 @ 7:24pm 
@CLANG OMG WHAT! Yo you just changed my life almost. Think of all the time imma save. Also feels like itll be way more accurate than my raw eyeballs ive gotta assume. :slimetabby:
Thank you!
CLANG-CLANG  [author] 30 Aug, 2023 @ 7:10pm 
@Spartite On the topic of colour picking, I've found that the "Color Picker" included inside Windows Powertoys to be rather excellent for extracting colours without using an image editor. It not only can give RGB and Hex (web) colour values, it can also quickly generate shades of the same picked colour as well! https://learn.microsoft.com/en-us/windows/powertoys/color-picker
Sparktite 30 Aug, 2023 @ 2:48pm 
Just strolling through and noticed @Lusien talking about orange crosshairs?
Considering theyre probably somewhat transparent this may not be the best method, but it could be tweaked to be almost indistinguishable.

Basically whenever im trying to find a brands color that they dont have in their media documentation or any kind of press kit, ill try to grab a bunch of examples to suck into MS Paint and extract the color from with the eyedropper tool.

Obviously, something like photoshop/gimp would be better, but if all you need is the base color code you can take the RGB values and or hue/sat/lum and throw in any online app like i think adobe color is a free one where you can throw in some numbers and then furter adjust/tweak your color to get it where you want.
Sites like that will then usually provide you with various color codes or methods of storing the color essentially.

Hope this helps since no one seems to have the actual info you need as you mentioned.
CLANG-CLANG  [author] 16 Apr, 2023 @ 11:46pm 
No problem :)
Lusién 16 Apr, 2023 @ 7:33am 
Thank you! I'll look into it.
CLANG-CLANG  [author] 15 Apr, 2023 @ 9:04pm 
And if that doesn't work, you might be able to find out it through other sources, like beta/cut content websites like The Cutting Room Floor. https://tcrf.net/Team_Fortress_2

The TF2 Official Wiki is great, and has a whole topic for unreleased/beta content too. https://wiki.teamfortress.com/wiki/Beta

Finally, there's this massive compilation of game UI screenshots. I couldn't find anything on TF2 for some reason, but it could be in there as well. https://www.gameuidatabase.com