Difference between revisions of "TF2/Player Destruction"

From Valve Developer Community
< TF2
Jump to: navigation, search
(centered)
(added info to make it complete, settings taken from a real map)
 
Line 1: Line 1:
<div style="text-align: center;">[[File:Pd watergate header.jpg|800x306px|frameless|none]]</div>
+
[[File:Pd watergate header.jpg|800px|frameless|center]]
  
  
 
'''What is Player Destruction?'''
 
'''What is Player Destruction?'''
  
Player Destruction is a spin on the Robot Destruction entities which focuses on bringing team objectives to a deathmatch foundation. In this gamemode players will drop flags if they were killed or ‘finished off’ by another player. The objective is to bring these flags to the capturezone to score. Whoever has the most amount of flags on each team is given a dispenser, an outline, and a number above their heads indicating the number of flags they are carrying. The captuezone can be toggled on and off, and in Watergate it scrolls across the map shown on a timer on the HUD.
+
Player Destruction is a spin on Robot Destruction which focuses on bringing team objectives to a deathmatch foundation. In this gamemode players will drop flags if they were killed by another player. The objective is to bring these flags to the capture zone to score. Whoever has the most amount of flags on each team is given a dispenser, an outline, and a number above their heads indicating the number of flags they are carrying. The capture zone can be toggled on and off, and in Watergate it scrolls across the map shown on a timer on the HUD.
  
 
+
==Entities needed to set up the gamemode==
== Entities needed to set up the gamemode ==
 
 
In order to set up the player destruction gamemode, the following entities are needed:
 
In order to set up the player destruction gamemode, the following entities are needed:
  
*<code>[[logic_auto]]</code>
+
*{{ent|logic_auto}}
*<code>[[func_capturezone]]</code>
+
*{{ent|logic_timer}}
*<code>[[tf_logic_player_destruction]]</code>
+
*{{ent|func_capturezone}}
 +
*{{ent|tf_logic_player_destruction}}
  
  
 
'''tf_logic_player_destruction'''
 
'''tf_logic_player_destruction'''
<br />
+
*Name: pd_logic
Name: pd_logic
 
  
  
'''logic_auto'''
+
'''func_capturezone'''
{| border=1 cellpadding="2" cellspacing="1"
+
*Name: capzone
|- align=left style="background:#DCDCDC; color:black"
+
*Start Disabled: Yes
!  !! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
+
{|{{OutputsTable}}
 
|-
 
|-
| [[Image:Io11.png]] || OnMultiNewRound || pd_logic || EnableMaxScoreUpdating || || 0.00 || No
+
| [[Image:Io11.png]] || OnCapTeam1_PD || pd_logic || ScoreRedPoints || || 0.00 || No
 
|-
 
|-
| [[Image:Io11.png]] || OnMultiNewRound || pd_logic || DisableMaxScoreUpdating || || 30.00 || No
+
| [[Image:Io11.png]] || OnCapTeam2_PD || pd_logic || ScoreBluePoints || || 0.00 || No
 
|}
 
|}
  
  
'''func_capturezone'''
+
'''logic_timer'''
<br />
+
*Name: pd_timer
Team: Red
+
*Refire Interval: time up to you. should be countdown time (X) plus capturing period (Y).
{| border=1 cellpadding="2" cellspacing="1"
+
{|{{OutputsTable}}
|- align=left style="background:#DCDCDC; color:black"
+
|-
!  !! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
+
| [[Image:Io11.png]] || OnTimer || pd_logic || SetCountdownTimer || X || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTimer || pd_logic || SetCountdownTimer || Y || X || No
 +
|-
 +
| [[Image:Io11.png]] || OnTimer || pd_logic || SetCountdownImage || (anything, blank=nothing) || || No
 +
|-
 +
| [[Image:Io11.png]] || OnTimer || pd_logic || SetCountdownImage || (anything) || X || No
 +
|-
 +
| [[Image:Io11.png]] || OnTimer || capzone || Disable || || 0.00 || No
 
|-
 
|-
| [[Image:Io11.png]] || OnCapTeam1_PD || pd_logic || ScoreRedPoints || || 0.00 || No
+
| [[Image:Io11.png]] || OnTimer || capzone || Enable || || X || No
 
|}
 
|}
  
  
'''func_capturezone'''
+
'''logic_auto'''
<br />
+
{|{{OutputsTable}}
Team: Blue
+
|-
{| border=1 cellpadding="2" cellspacing="1"
+
| [[Image:Io11.png]] || OnMultiNewRound || pd_logic || EnableMaxScoreUpdating || || 0.00 || No
|- align=left style="background:#DCDCDC; color:black"
+
|-
!  !! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
+
| [[Image:Io11.png]] || OnMultiNewRound || pd_logic || DisableMaxScoreUpdating || || 30.00 || No
 
|-
 
|-
| [[Image:Io11.png]] || OnCapTeam2_PD || pd_logic || ScoreBluePoints || || 0.00 || No
+
| [[Image:Io11.png]] || OnMultiNewRound || pd_timer || FireTimer || || 0.00 || No
 
|}
 
|}
  
  
'''Other things you can do with Player Destruction:'''
+
'''Other things you can do with tf_logic_player_destruction:'''
 
+
*OnRedScoreChanged <float> Sent when score changes, and is a value representing total progress from [0..1].
'''tf_logic_player_destruction:'''
+
*OnBlueScoreChanged <float> Sent when score changes, and is a value representing total progress from [0..1].
<br />
+
*OnCountdownTimerExpired Sent when the countdown timer expires.
Inputs:
 
<br />
 
SetCountdownTimer <integer> Set the countdown time and start the timer.
 
<br />
 
SetCountdownImage <string> Set the countdown image.
 
<br />
 
Outputs:
 
<br />
 
OnRedScoreChanged <float> Send when score changes, and is a value representing total progress from [0..1].
 
<br />
 
OnBlueScoreChanged <float> Send when score changes, and is a value representing total progress from [0..1].
 
<br />
 
OnCountdownTimerExpired Sent when the countdown timer expires.
 
 
 
 
 
'''Download the prefab:'''
 
http://tf2maps.net/resources/pd-prefab.858/
 
 
 
  
== Editing the HUD ==
+
==Editing the HUD==
 
The tf_logic_player_destruction entity includes the keyvalue ‘res_file’ which allows you to set the map up with an edited version of the existing PD HUD.
 
The tf_logic_player_destruction entity includes the keyvalue ‘res_file’ which allows you to set the map up with an edited version of the existing PD HUD.
  
 
[[File:Pd_watergate_hud.jpg|800x450px|frameless|none]]
 
[[File:Pd_watergate_hud.jpg|800x450px|frameless|none]]
  
 
+
You can find the existing PD HUD in the tf/tf2_misc_dir.vpk file at resource/UI/HudObjectivePlayerDestruction.res. To make your own version of this (and custom maps ''can'' use the original) you will first need to make a copy of it and rename it for your map (“ExampleHUD.res”). Then inside add a few lines at the start and type:
'''You can find the existing PD HUD in the tf/tf2_misc_dir.vpk file at:'''
 
<br />
 
''resource/UI/HudObjectivePlayerDestruction.res''
 
 
 
 
 
To make your own version of this you will first need to make a copy of it and rename it for your map (“ExampleHUD.res”). Then inside add a few lines at the start and type:
 
  
 
  #base "HudObjectivePlayerDestruction.res"
 
  #base "HudObjectivePlayerDestruction.res"
Line 97: Line 80:
  
  
In your ExampleHUD.res file you can edit anything at all and it will show up in your map. You can change all the icons with custom packaged icons, you can disable any element, you can change the background color of any element, etc.
+
In your ExampleHUD.res file you can edit anything at all and it will show up in your map. You can change all the icons with custom packed icons, you can disable any element, you can change the background color of any element, etc.
  
  
Line 147: Line 130:
 
  }
 
  }
  
== Design Stuff ==
+
==Design Stuff==
 
 
 
Player Destruction is a mode that opens the door to more dynamic gameplay. It allows you to ‘turn off’ the capturezone and let the potential points build up in the map, before turning back on the capturezone to frantically spit points onto the HUD. It seems to necessitate places around the capturezone for teams to push and pull out of, rather than always fighting for the capturezone itself. Chasing after the team leaders (who have the most amount of points) when the capturezone was closed resulted in some of the most fun moments.
 
Player Destruction is a mode that opens the door to more dynamic gameplay. It allows you to ‘turn off’ the capturezone and let the potential points build up in the map, before turning back on the capturezone to frantically spit points onto the HUD. It seems to necessitate places around the capturezone for teams to push and pull out of, rather than always fighting for the capturezone itself. Chasing after the team leaders (who have the most amount of points) when the capturezone was closed resulted in some of the most fun moments.
  

Latest revision as of 02:03, 14 November 2019

Pd watergate header.jpg


What is Player Destruction?

Player Destruction is a spin on Robot Destruction which focuses on bringing team objectives to a deathmatch foundation. In this gamemode players will drop flags if they were killed by another player. The objective is to bring these flags to the capture zone to score. Whoever has the most amount of flags on each team is given a dispenser, an outline, and a number above their heads indicating the number of flags they are carrying. The capture zone can be toggled on and off, and in Watergate it scrolls across the map shown on a timer on the HUD.

Entities needed to set up the gamemode

In order to set up the player destruction gamemode, the following entities are needed:


tf_logic_player_destruction

  • Name: pd_logic


func_capturezone

  • Name: capzone
  • Start Disabled: Yes
  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapTeam1_PD pd_logic ScoreRedPoints 0.00 No
Io11.png OnCapTeam2_PD pd_logic ScoreBluePoints 0.00 No


logic_timer

  • Name: pd_timer
  • Refire Interval: time up to you. should be countdown time (X) plus capturing period (Y).
  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTimer pd_logic SetCountdownTimer X 0.00 No
Io11.png OnTimer pd_logic SetCountdownTimer Y X No
Io11.png OnTimer pd_logic SetCountdownImage (anything, blank=nothing) No
Io11.png OnTimer pd_logic SetCountdownImage (anything) X No
Io11.png OnTimer capzone Disable 0.00 No
Io11.png OnTimer capzone Enable X No


logic_auto

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnMultiNewRound pd_logic EnableMaxScoreUpdating 0.00 No
Io11.png OnMultiNewRound pd_logic DisableMaxScoreUpdating 30.00 No
Io11.png OnMultiNewRound pd_timer FireTimer 0.00 No


Other things you can do with tf_logic_player_destruction:

  • OnRedScoreChanged <float> Sent when score changes, and is a value representing total progress from [0..1].
  • OnBlueScoreChanged <float> Sent when score changes, and is a value representing total progress from [0..1].
  • OnCountdownTimerExpired Sent when the countdown timer expires.

Editing the HUD

The tf_logic_player_destruction entity includes the keyvalue ‘res_file’ which allows you to set the map up with an edited version of the existing PD HUD.

Pd watergate hud.jpg

You can find the existing PD HUD in the tf/tf2_misc_dir.vpk file at resource/UI/HudObjectivePlayerDestruction.res. To make your own version of this (and custom maps can use the original) you will first need to make a copy of it and rename it for your map (“ExampleHUD.res”). Then inside add a few lines at the start and type:

#base "HudObjectivePlayerDestruction.res"


Inside of your map you can put the name of your custom .res file in the logic entity as so:
resource/UI/ExampleHUD.res


In your ExampleHUD.res file you can edit anything at all and it will show up in your map. You can change all the icons with custom packed icons, you can disable any element, you can change the background color of any element, etc.


Here is the .res file Watergate uses for example:

#base "HudObjectivePlayerDestruction.res"
"Resource/UI/WatergateHUD.res"
{
   "CarriedContainer"
   {
        "CarriedImage"
        {
            "image"                                             "../hud/hud_invasion_bottle"
        }             
        "TeamLeaderImage"
        {
            //"image"                                             "<your image name>"
        }
   }
   "CountdownContainer"
   {
       "Background"
       {
           "image"            "../hud/hud_invasion_greenbg"
           "teambg_2"        "../hud/hud_invasion_greenbg"
           "teambg_3"        "../hud/hud_invasion_greenbg"
       }
       "CountdownImage"
       {
           "xpos"            "117"
           "ypos"            "15"
       }
   }
   "ScoreContainer"
   {
        "ProgressBarContainer"
        {
            "FlagImageBlue"
            {
                    "image"                                             "../hud/hud_invasion_bottle"
                    "zpos"            "100"
            }
            "FlagImageRed"
            {
                    "image"                                             "../hud/hud_invasion_bottle"
                    "zpos"            "100"
            }
        }
   }
}

Design Stuff

Player Destruction is a mode that opens the door to more dynamic gameplay. It allows you to ‘turn off’ the capturezone and let the potential points build up in the map, before turning back on the capturezone to frantically spit points onto the HUD. It seems to necessitate places around the capturezone for teams to push and pull out of, rather than always fighting for the capturezone itself. Chasing after the team leaders (who have the most amount of points) when the capturezone was closed resulted in some of the most fun moments.

Watergate is a map with a layout like Hightower - a wider map that lets combat manifest at more places to give the map a more hectic pace, however this means that there is less teamplay because players can be farther apart from each other. In this sense it may be worth looking into a less wide layout like Viaduct that has teammates closer more often (teamplay in Watergate was a bit of an issue unless it came from some other source - like a veteran on the microphone).

In previous versions of Watergate I had a control point at the top of the tower that spawned extra pickups to the team that controlled it. This was really good for leading the players who weren’t good at deathmatch somewhere to feel like they could help their team, however it became the best option for all players including the team leaders which nullified the importance of holding any other section of the map - hence its removal. The focus on a dynamic objective means that holding points can manifest anywhere making combat feel fresh often.

External links