HUDS.TF

Hello There, Guest!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TF2 HUD Update for October 12th, 2016 - Vote for frames
#1
Had a good game, a bad connection to a Valve server or got rolled because the balance was completely off? You might now be prompted at the end of a casual or ranked game to rate your experience from Horrible, Bad, Neutral, Good to Great.

Besides being able to vote, there has been a recent problem with event DamagedPlayer in custom huds utilizing this animation to have 'hitmarkers'. More information and how to fix this issue after the analysis of the added & changed hudfiles in the update from October 12th, which you can check in this commit.

New Files:
resource/ui/surveypanel_base.res
resource/ui/surveypanel_matchquality.res

Modified Files:
scripts/hudanimations_tf.txt

Summary of changes
  • End of match rating vote panel added; surveypanel_base positions the votes, surveypanel_matchquality contains the options
  • Animations to bounce the vote panel in and out of view in hudanimations_tf.txt

Changes to scripts/hudanimations_tf.txt
Crashes at the end of the match in Casual/Ranked Matchmaking are most likely caused by missing animation events in hudanimations_tf.txt when being prompted to vote for your match experience.

If you are a hud developer make sure you migrate your TF2 animations to use hudanimations_manifest.txt by following this guide to guarantee Valve updating/changing animations is not going to cause issues.
Code:
event SurveyShowSequence
{
Animate Survey ypos 480 Linear 0 0
Animate Survey ypos 150 Linear 1 0.3
Animate Survey ypos 130 Deaccel 1.3 0.1
Animate Survey ypos 150 Accel 1.4 0.1
}

event SurveySubmitSequence
{
// Show submitting
SetVisible QuestionContainer 0 0
SetVisible SubmittingContainer 1 0

// Show thanks
SetVisible SubmittingContainer 0 2
SetVisible ThanksContainer 1 2

RunEvent SurveyHideSequence 6
}

event SurveyDelete
{
FireCommand 0 "delete"
}

event SurveyHideSequence
{
SetVisible CloseButton 0 0

Animate Survey ypos 130 Deaccel 0 0.3
Animate Survey ypos 480 Accel 0.3 0.2
RunEventChild Survey SurveyDelete 0.6
}

[Image: 801RVEY.jpg]
Screenshot of the end of round survey panel

Hitmarkers in custom huds causing fps drops
Custom huds available here on huds.tf might offer hitmarkers and have flashing crosshairs when dealing damage, blinking and fading damage numbers or other implementations of the event DamagedPlayer animation.

Damaging to a lot of players/bots in a short timeframe or dealing a lot of (small) damage instances to the same target (pyro flames/mvm medic shield) can cause severe frame drops, as each damage instance will trigger the animation event, causing them to stack and thus make you drop frames. After thorough analysis by sigsegv (recommended read) and being pointed in the right direction, Wiethoofd did some testing with StopAnimation and StopEvent animation triggers and figured out the correct way to have damage hitmarkers without causing massive frame drops because of the damage event stacking, without having to comment out existing code to disable the animation.

Solution/workaround
Renaming the old DamagedPlayer animation to (for instance) HitMarker and calling the renamed event from the DamagedPlayer event instead, should prevent the game from stacking the animations and not cause frames to drop. Adding an additional StopEvent just before calling (another) instance of the same animation event should make sure there are no duplicate/stacking events causing any issues. Just make sure to start another event shortly after stopping it with StopEvent.

Simplified example of old hitmarker event possibly causing fps drops:
Code:
event DamagedPlayer { // Blinks Crosshair for 1/10th of a second red and reset to white
Animate Crosshair FgColor Red Linear 0.0 0.1
Animate Crosshair FgColor White Linear 0.1 0.1
}

Animation sequence without StopEvent:
Code:
// Start 'hitmarker animation'
event DamagedPlayer {
RunEvent HitMarker 0.0
}
event HitMarker { // Blink Crosshair for 1/10th of a second red and reset to white
Animate Crosshair FgColor Red Linear 0.0 0.1
Animate Crosshair FgColor White Linear 0.1 0.1
}
Improved animation sequences with StopEvent (optional but recommended):
Code:
// Stop any 'hitmarker animation events' before starting another
event DamagedPlayer {
StopEvent HitMarker 0.0
RunEvent HitMarker 0.01
}
event HitMarker { // Blink Crosshair for 1/10th of a second red and reset to white
Animate Crosshair FgColor Red Linear 0.0 0.1
Animate Crosshair FgColor White Linear 0.1 0.1
}
Use the aforementioned code as examples to fix existing DamagedPlayer animations events (while moving animations to use the hudanimations_manifest.txt setup).

Happy voting!


Messages In This Thread
TF2 HUD Update for October 12th, 2016 - Vote for frames - by Wiethoofd - 10-14-2016, 04:00 PM


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