HUDS.TF

Hello There, Guest!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating your HUD for Matchmaking Support
#1
Better late than never with these posts!

So, Matchmaking is finally hitting TF2, and with that come some HUD changes. Unsurprisingly, a lot of existing HUD files were changed, some potentially game breaking if not updated, so we'll run through these changes real quick.

New Files:
resource/ui/match_summary.res

Modified Files:
resource/clientscheme.res
resource/ui/hudpasstimeballstatus.res
resource/ui/hudpasstimepassnotify.res
resource/ui/hudtournament.res
resource/ui/leaderboardentryrank.res
resource/ui/lobbycontainerframe.res
resource/ui/lobbypanel.res
resource/ui/mainmenuoverride.res
resource/ui/matchmakingpanel.res
resource/ui/scoreboard.res
resource/ui/votehud.res
resource/ui/econ/collectioncraftingdialog_base.res
resource/ui/econ/halloweenofferingdialog.res
resource/ui/econ/manncotrade_commonstatclock.res
scripts/hudanimations_tf.txt
scripts/hudlayout.res

It is worth noting that many Custom HUDs with modified resource/ui/mainmenuoverride.res and resource/gamemenu.res files may experience crashing upon launch. We're not sure exactly what the pure detailed cause of the crashing is right now, but the safest bet is to remove those files from your HUD for now. We'll report again once the definite fix has been found out.

Changes to scripts/hudlayout.res
The following code will need to be added to hudlayout.res to allow the Matchmaking Summary to appear in game (Before the final } bracket in the file).
Code:
MatchSummary
{
"fieldName" "MatchSummary"
"visible" "0"
"enabled" "1"
"xpos" "0"
"ypos" "0"
"wide" "f0"
"tall" "f0"
}

Changes to resource/ui/hudtournament.res
If you've got a custom hudtournament.res file in your HUD, you will need to add this code to the end of it (before the final } bracket).
Code:
"FrontParticlePanel"
{
"ControlName" "CTFParticlePanel"
"fieldName" "FrontParticlePanel"
"xpos" "0"
"ypos" "0"
"zpos" "3"
"wide" "f0"
"tall" "f0"
"visible" "1"
"proportionaltoparent" "1"

"ParticleEffects"
{
"0"
{
"particle_xpos" "c0"
"particle_ypos" "c0"
"particle_scale" "2"
"particleName" "versus_door_slam"
"start_activated" "0"
"loop" "0"
}
}

"paintbackground" "0"
}

"MatchStartingBG"
{
"ControlName" "CModelPanel"
"fieldName" "MatchStartingBG"
"xpos" "0"
"ypos" "0"
"zpos" "2"
"wide" "f0"
"tall" "f0"
"autoResize" "0"
"pinCorner" "0"
"visible" "0"
"enabled" "1"
"fov" "70"
"proportionaltoparent" "1"

"model"
{
"modelname" "models/vgui/versus_doors.mdl"
"skin" "0"
"angles_x" "0"
"angles_y" "0"
"angles_z" "0"
"origin_x" "120"
"origin_y" "0"
"origin_z" "-77"

"animation"
{
"name" "ref"
"sequence" "ref"
"default" "1"
}

"animation"
{
"name" "open"
"sequence" "open"
}

"animation"
{
"name" "close"
"sequence" "close"
}

"animation"
{
"name" "idle_closed"
"sequence" "idle_closed"
}
}
}

"BlueTeamPanel"
{
"ControlName" "EditablePanel"
"fieldName" "BlueTeamPanel"
"xpos" "-155"
"ypos" "125"
"zpos" "50"
"wide" "150"
"tall" "260"
"visible" "1"
"enabled" "1"

"BlueTeamBG"
{
"ControlName" "EditablePanel"
"fieldName" "BlueTeamBG"
"xpos" "0"
"ypos" "10"
"zpos" "2"
"wide" "147"
"tall" "36"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"border" "TFFatLineBorderBlueBGOpaque"
}
"BlueTeamImage"
{
"ControlName" "ImagePanel"
"fieldName" "BlueTeamImage"
"xpos" "9"
"ypos" "0"
"zpos" "5"
"wide" "56"
"tall" "56"
"visible" "1"
"enabled" "1"
"image" "../hud/team_blue"
"scaleImage" "1"
}
"BluePlayerList"
{
"ControlName" "SectionedListPanel"
"fieldName" "BluePlayerList"
"xpos" "6"
"ypos" "38"
"zpos" "1"
"wide" "136"
"tall" "205"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"autoresize" "3"
"linespacing" "26"
"linegap" "4"
//"show_columns" "1"
}
"BluePlayerListBG"
{
"ControlName" "EditablePanel"
"fieldName" "BluePlayerListBG"
"xpos" "4"
"ypos" "30"
"zpos" "0"
"wide" "139"
"tall" "215"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"border" "TFFatLineBorderClearBG"
}
}

"RedTeamPanel"
{
"ControlName" "EditablePanel"
"fieldName" "RedTeamPanel"
"xpos" "r-5"
"ypos" "125"
"zpos" "50"
"wide" "150"
"tall" "260"
"visible" "1"
"enabled" "1"

"RedTeamBG"
{
"ControlName" "EditablePanel"
"fieldName" "RedTeamBG"
"xpos" "0"
"ypos" "10"
"zpos" "2"
"wide" "147"
"tall" "36"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"border" "TFFatLineBorderRedBGOpaque"
}
"RedTeamImage"
{
"ControlName" "ImagePanel"
"fieldName" "RedTeamImage"
"xpos" "84"
"ypos" "-9"
"zpos" "5"
"wide" "70"
"tall" "70"
"visible" "1"
"enabled" "1"
"image" "../hud/team_Red"
"scaleImage" "1"
}
"RedPlayerList"
{
"ControlName" "SectionedListPanel"
"fieldName" "RedPlayerList"
"xpos" "6"
"ypos" "38"
"zpos" "1"
"wide" "136"
"tall" "205"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"autoresize" "3"
"linespacing" "26"
"linegap" "4"
//"show_columns" "1"
}
"RedPlayerListBG"
{
"ControlName" "EditablePanel"
"fieldName" "RedPlayerListBG"
"xpos" "4"
"ypos" "30"
"zpos" "0"
"wide" "139"
"tall" "215"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"border" "TFFatLineBorderClearBG"
}
}
This allows the Matchmaking start animation to appear, in partnership with the next file we'll cover...

Changes to scripts/hudanimations_tf.txt
The following code will need to be added to this file (if your HUD includes it). It allows the Matchmaking start animation function correctly.
Code:
//--------------------------------------------------------------------------
event CompetitiveGame_LowerChatWindow
{
Animate HudChat ypos r140 Accel 0 0
}

event CompetitiveGame_RestoreChatWindow
{
Animate HudChat ypos 275 Accel 0 0
}

event HudTournament_MoveChatWindow
{
RunEvent CompetitiveGame_LowerChatWindow 0
RunEvent CompetitiveGame_RestoreChatWindow 8
}

//--------------------------------------------------------------------------
event HudTournament_AnimateTeams_In
{
Animate RedTeamPanel xpos c150 Accel 0 0.25
Animate BlueTeamPanel xpos c-300 Accel 0 0.25
}

event HudTournament_AnimateTeams_Out
{
Animate RedTeamPanel xpos r-5 Accel 0 0.68
Animate BlueTeamPanel xpos -155 Accel 0 0.68
}

event HudTournament_DoorsClose
{
StopEvent HudTournament_ResetTimer 0

SetVisible CountdownBG  0 5
SetVisible CountdownLabel 1 0
SetVisible CountdownLabelShadow 1 0

Animate CountdownLabel ypos c-5 Gain 0.75 0 0.4
Animate CountdownLabelShadow ypos c-2 Gain 0.75 0 0.4

SetVisible MatchStartingBG 1 0
SetVisible BlueTeamPanel 1 0
SetVisible RedTeamPanel 1 0

SetVisible HudTournamentBG 0 2
SetVisible TournamentConditionLabel 0 2
RunEventChild MatchStartingBG PlayDoorCloseAnim 0
RunEventChild FrontParticlePanel PlayDoorSlamParticles 0.45
RunEventChild MatchStartingBG PlayDoorOpenAnim 7

RunEvent HudTournament_AnimateTeams_In 0.25
RunEvent HudTournament_AnimateTeams_Out 7.70

SetVisible CountdownLabel 0 9.9
SetVisible CountdownLabelShadow 0 9.9

SetVisible MatchStartingBG 0 10
SetVisible BlueTeamPanel 0 10
SetVisible RedTeamPanel 0 10

SetVisible CountdownBG 1 11
}

event PlayDoorSlamParticles
{
FireCommand 0 "start0"
}

event PlayDoorCloseAnim
{
FireCommand 0 "animation close"
}

event PlayDoorOpenAnim
{
FireCommand 0 "animation open"
}

event HudTournament_ShowTimerCompetitive
{
Animate CountdownLabel ypos 150 Linear 0 0
Animate CountdownLabelShadow ypos 150 Linear 0 0

SetVisible CountdownBG  1 0
SetVisible CountdownLabel 1 0
SetVisible CountdownLabelShadow 1 0
}

event HudTournament_ShowTimerDefault
{
Animate CountdownLabel ypos 425 Linear 0 0
Animate CountdownLabelShadow ypos 425 Linear 0 0

SetVisible CountdownBG  1 0
SetVisible CountdownLabel 1 0
SetVisible CountdownLabelShadow 1 0
}

event HudTournament_HideTimer
{
SetVisible CountdownBG  0 0
SetVisible CountdownLabel 0 0
SetVisible CountdownLabelShadow 0 0
}

event Hud_StatsAndMedals_Show
{
SetVisible DrawingPanel 0 0
SetVisible WinPanelLogo 0 0
SetVisible StatsBgPanel 1 0
SetVisible StatsLabelPanel 1 0
Animate StatsLabelPanel ypos 75 Accel 0 0.1
Animate BlueMedals ypos 75 Accel 0 0.1
Animate RedMedals ypos 75 Accel 0 0.1
}
Additionally, you can follow this guide, which will help you avoid having to update animation files in other future updates.

Changes to resource/clientscheme.res
The code below should be added to your clientscheme.res to allow Matchmaking Score and Stats fonts to load correctly. Find "ControlPointTimer" in this file and add the following above it.
Code:
"MatchSummaryTeamScores"
{
"1"
{
"name" "TF2"
"tall" "36"
"weight" "500"
"range" "0x0000 0x007F" // Basic Latin
"antialias" "1"
"additive" "0"
}
}
"MatchSummaryStatsAndMedals"
{
"1"
{
"name" "TF2 Secondary"
"tall" "14"
"weight" "400"
"additive" "0"
"antialias" "1"
}
}
As always with clientscheme.res changes, you'll need to relaunch your game for any modifications to take effect.

If you're experiencing crashes at the beginning of Matchmaking games, you may have PREC installed. Check your custom addons folder and remove PREC. If you do not have PREC installed, this is where my help ends.

HUDs on the directory are not required to be updated for this update, due to Matchmaking still being in Beta. Things are likely to still change, so updates may end up being temporary and may have to be changed again in the near future. If you're having issues with your HUD, follow the guide below and make those changes. HUD developers are encouraged to make these changes, but it is not mandatory.

Cheers!



Copyright © 2014 - 2019 huds.tf | Site by omnibombulator | Powered by MyBB, © 2002 - 2019 MyBB Group and Steam.