TF2 HUD Editing Guide

In-Depth: Target ID

Target IDs are the little displays of name and health you see when looking at a team member or are healing/being-healed.

target id example

top

hudlayout.res Entries

Target IDs are used for three seperate things. Editing the resource files for Target IDs will change the appearance of all three.

These three uses are instances of a Target ID and are shown at specific times.

All three uses have a hudlayout.res entry.

InstanceConditionShown When/Forhudlayout.res Entry
MainAlive and on a team
  • Looking at a team member
  • Healing someone as Medic
  • Looking at anyone as Spy
  • Looking at a friendly Engineer's building
CMainTargetID
SecondaryAlive and on a team
  • A Medic is healing you
  • Looking at someone, while Healing someone else as Medic
CSecondaryTargetID
SpectatorDead or in SpectateWho you are spectatingCSpectatorTargetID

Note: The health cross for the main target ID is floating above the players head.


top

Resource Files

The Target ID is defined in targetid.res and spectatorguihealth.res

target id resource diagram

targetid.res (1 in diagram)

This resource file defines the overall layout of the Target IDs.

ControlWhat it is
TargetIDBGThe background box of Main and Secondary Target IDs
TargetIDBG_Spec_BlueThe background box of the Spectator Target ID - When spectating a blue team member
TargetIDBG_Spec_RedThe background box of the Spectator Target ID - When spectating a red team member
TargetNameLabel
  • The name of the player (Main, Secondary, Spectator)
  • The name of the building (Main, Secondary)
TargetDataLabel
  • Ammo of person you are healing (Main, Secondary)
  • Ubercharge percent of a medic (Main, Secondary)
  • Upgrade details of the building (Main, Secondary)
  • Killstreak of the person you are spectating (Spectator)
SpectatorGUIHealthThe instance of spectatorguihealth.res
AmmoIconIcon displayed when you see the ammo of the person you are healing
KillStreakIconIcon displayed when the player you are spectating has a killstreak
MoveableSubPanelIcon displayed when you can pick up the building you are looking at (engineer only)

spectatorguihealth.res (2 in diagram)

This resource file defines the health cross and number, which is loaded into each Target ID.

ControlWhat it is
PlayerStatusHealthImageHealth cross
PlayerStatusHealthImageBGBlack line around health cross
BuildingStatusHealthImageBGBackground image when viewing the health of a building
PlayerStatusHealthBonusImageOverheal image - only displayed when the player has an overheal
PlayerStatusHealthValueThe players health - text label
PlayerStatusPlayerLevel