Difference between revisions of "TF2/Creating a Spawnroom"

From Valve Developer Community
< TF2
Jump to: navigation, search
 
 
(88 intermediate revisions by 28 users not shown)
Line 1: Line 1:
==Creating your room==
+
{{otherlang2
[[image:tut_spawnroom_r1.jpg|thumb|right|200px|A simple, poorly textured room.]]
+
|ru=TF2/Creating_a_Spawnroom:ru
First of all, you will want to have an area which you consider the spawnroom. This may be of any shape, color and size. For this example, I'm going to turn the simple, poorly textured room you see on the right into a complicated yet still poorly textured spawnroom for the RED team.
+
|ko=TF2/Creating_a_Spawnroom:ko
 +
|pt-br=TF2/Creating_a_Spawnroom:pt-br
 +
}}
 +
== Creating your room ==
 +
[[image:Tut spawnroom r1.JPG|thumb|right|200px|A simple room.]]
 +
First of all, you should choose an area in your map for the spawnroom to be located. It must be large enough to contain however many <code>info_player_teamspawn</code> entities you want to add there without colliding with them.  It should also have a hole in the wall for the door that we'll add in later. Other than that it may be of any '''shape or color'''. For this example, the room you see on the right will be transformed into a spawnroom for the '''RED''' team.  
 +
{{Note|A ''spawnroom'' may also be referred to as a ''respawn room'' or simply ''respawn''.}}{{clr}}
  
==Making it a respawn room==
+
== Making it a respawn room ==
[[image:tut_spawnroom_r2.jpg|thumb|right|200px|Fill the room with func_respawnroom.]]
+
See also: [[TF2/Respawn Areas |Creating Respawn Areas]]
Create a brush that fills your room and texture it with the tools/toolstrigger material. Now make this brush an entity by clicking the ToEntity button on the right side toolbar. Choose the "[[func_respawnroom]]" entity from the dropdown list. Name it "red_respawn_room" and make it's team Red. You can see the non-smartedit details on the picture. This room is now officially claimed as a respawn room.
 
  
==Bring the players inside==
+
=== Bring the players inside ===
[[image:tut_spawnroom_r3.jpg|thumb|right|200px|Now add 12-16 playerspawns to your room with space inbetween.]]
+
[[image:Tut spawnroom r3.JPG|thumb|right|200px|Now add 16 spaced out player spawns to your room.]]
Now that we have a spawnroom half-setup, we need to add the playerspawns. Add a point entity to your room anywhere called "[[info_player_teamspawn]]". Before adding more, set the important details up in this one. You will need to change the team to RED. The other details can be used to make more advanced respawn mechanisms which are, naturally, not covered in this tutorial. Now, copy the playerspawns around 12-16 times and make sure there is plenty of space between them.
+
First create an {{ent|info_player_teamspawn}} in your room, then open its properties box and change the team to RED and the target name to something like '''team_red_player_01'''. This naming convention can later help with keeping track of the spawnroom a teampspawn entity is in for debugging and such.  Once you are done setting the properties, make 15 additional copies of that info_player_teamspawn entity, making sure each of them have plenty of space. Also, make sure each spawnpoint is raised a small distance off the floor, otherwise they will not work.
 +
{{clr}}
  
==Respawn and resupply==
+
=== Allow players to change class without dying ===
[[image:tut_spawnroom_r4.jpg|thumb|right|200px|Add a resupply somewhere obvious.]]
+
[[image:Tut spawnroom r2.JPG|thumb|right|200px|Fill the room with a func_respawnroom.]]
While this is not obligatory, it is good to have a resupply area inside your respawn. A resupply consists of 2 things: a "[[prop_dynamic]]" representing the resupply locker and a "[[func_regenerate]]" which helps you to the contents of it. Create a prop_dynamic somewhere in the room and change it's model to "models/props_gameplay/resupply_locker.mdl" and name it "resup1". Put it against a wall so it looks nice. Now create a trigger brush which is way bigger than your resupply locker. Attach it to a func_regenerate entity. Set the entity's "Associated Model" to "resup1" and Team to RED. Repeat this as many times as you want to make multiple cabinets.
+
Now create a {{ent|func_respawnroom}} brush-based entity with material <code>tools/toolstrigger</code> that fills the area containing the info_player_teamspawn entities, you want it to touch the floor and be at least 96 units high. You can do this by using the block tool and creating a square with the <code>tools/toolstrigger</code> material, then click <code>To Entity</code>. Name it something like '''respawnroom_red_01''' (depending on how many spawn rooms you may have for that team) and set its team to RED. Note that this brush will also prevent Engineers from placing their buildings.
 +
{{clr}}
  
==Keeping off the nasties==
+
== Adding a resupply cabinet ==
[[image:tut_spawnroom_r5.jpg|thumb|right|200px|Access denied.]]
+
See also: [[TF2/Resupply Areas|Resupply Areas]]
Unfortunately, people like to rampage around in spawnrooms, "spawnkilling" people who just took control of their characters. There, however, is an easy solution. Create a brush in the doorway. Assign the "tools/nodraw" texture to the brush, except for the face that looks at the outside world. This face should be textured with "overlay/no_entry". Tie it to the entity "[[func_respawnroomvisualizer]]". The only property you'll need to change is the "Associated Respawn Room", which should be the func_respawnroom we previously created, the one that goes by the name red_respawn_room. This will let red players go through but block off blu players.
 
  
==Last words==
+
[[image:Tut spawnroom r4.JPG|thumb|right|200px|Add a resupply somewhere obvious.]]
It's easy to create a basic spawnroom. As you can see, it's still extendable, but it's all up to you now. You might want to create a door that only opens for red players, multiple spawn rooms, each associated to a control point, and so on. This is going to be covered in a later tutorial though. Until then, have fun making maps!
+
It may be good to have a resupply area inside your respawn. A resupply consists of two entities:
 +
* A {{ent|prop_dynamic}}, representing the resupply locker.
 +
* A {{ent|func_regenerate}}, which gives it functionality.
 +
Create a <code>prop_dynamic</code> somewhere obvious in the room, set its model to <code>models/props_gameplay/resupply_locker.mdl</code>, and give it a name such as '''resupply_red_1'''. You can also tweak how long the open/close animation takes by editing the min/max animation time option. Usually 0.5 is a good value to use. Now create a <code>func_regenerate</code> brush-based entity with material <code>tools/toolstrigger</code>, making sure it occupies a larger area surrounding the prop. Set its <code>Associated Model</code> to the name given to the <code>prop_dynamic</code> (in this article, '''resupply_red_1'''), and set its team to RED.{{clr}}
 +
 
 +
== Keeping the bullies out ==
 +
See also: [[TF2/Team-Specific Barriers | Team-Specific Barriers]]
 +
[[image:Tut spawnroom r5.JPG|thumb|right|200px|Access denied.]]
 +
Some players like to camp in spawn rooms, killing players right after they spawn. There is, however, an easy solution to this problem which consists of creating a barrier that blocks off the spawnroom entrance from players on the opposing team.
 +
To do this, create a {{ent|func_respawnroomvisualizer}} brush-based entity with material <code>tools/toolsnodraw</code>. Assign the material <code>overlays/no_entry</code> to the side that faces away from the spawn area and be sure to set its <code>Associated Respawn Room</code> to the correct [[func_respawnroom]], for example, '''respawnroom_red_01'''.
 +
{{clr}}
 +
 
 +
== Making a door ==
 +
See also: [[TF2/Team-Specific Doors | Team-Specific Doors]]
 +
 
 +
The final step is to make a door that will seal off (non-vis) the room from most weapons fire. Firstly, place a <code>prop_dynamic</code> in the doorway and set its model to <code>models/props_gameplay/door_slide_large_door.mdl</code>.
 +
 
 +
{{note|There are lots of other door models available. You can choose whatever you would like, but this tutorial uses this model. Also note that the door does not require a name for now, however you can name it if you wish.}}
 +
 
 +
Next, create a {{ent|func_door}} entity. You should try to shape and size the brush close to the size of the prop door. Name it to something that goes along with the current naming scheme (depending on the number of rooms you are going to make), for example, '''door_spawnroom_red_01'''. As this entity will be an unseen physical representation for the prop, texture it with a material that matches the model used for the door, in this case we'll use <code>Metal/wall011</code>.
 +
 
 +
<code>func_door</code> attributes you will have to change individually:
 +
 
 +
*'''Render Mode''': since we don't want the func_door to be visible in-game, well set this to <code>Dont Render / None</code>.
 +
 
 +
*'''Speed''': changing this will effect how fast the door will open and close. Usually, this is set to 400 for a fast moving door, which allows quick passage. Set it to a lower value to make the door close and open at a slower rate.
 +
 
 +
*'''Delay Before Reset''': Set this to -1 so that the door will never close as long as someone is in the doorway. Otherwise, the door will close and NOT reopen until everyone has cleared the trigger. Anything other then a <code>-1</code> value can lead to griefing (i.e. one player locking an entire team in the spawnroom).
 +
 
 +
*'''Lip''': Used to adjust how far the door sticks out of (or goes into if you use a negative number) the surrounding structure. For this tutorial the value is 3. The lip is set in Hammer units.
 +
 
 +
*'''Move direction''': This is the final thing to edit and the most important. We want this door to open upwards, so we'll set it to '''Up'''. However, you may set it to move in any direction, just make sure players can get past the door after spawning. For rotating doors, use the [[func_door_rotating]] entity.
 +
 
 +
In addition, uncheck [[image:boxunchk.png]] the '''Touch Opens''' flag under the '''Flags''' tab, leaving this checked will allow the enemy team to open the door.
 +
 
 +
Now reselect the door prop, and parent it to the <code>func_door</code> you have just created, '''door_spawnroom_red_01'''.
 +
 
 +
Next, create a {{ent|filter_activator_tfteam}}, name it something appropriate, such as '''filter_redteam''', and set the team filter to RED.
 +
{{Note| You can set it to BLU instead, if you are making a BLU Team spawnroom.}}
 +
 
 +
The final thing to make is a {{ent|trigger_multiple}} that will tell the door when to open and close. The trigger should be large enough to accommodate player size and allow for the door to fully reach its open state before the player gets to it. It may be a good idea to stretch the trigger volume so that it can be activated from either side of the door, instead of making two trigger volumes. Also, make sure you set its filter property to the filter you have created for the door ('''filter_redteam''') so only members of the red team can activate the trigger and open the door.  It is probably a good idea to set "Delay before reset" to 0, otherwise the door will remain open once activated.
 +
 
 +
Now it's time to edit the Outputs tab for our trigger_multiple. Your outputs should match those in the table below:
 +
 
 +
:{| {{OutputsTable}}
 +
| [[Image:Io11.png]]
 +
| OnEndTouchAll
 +
| door_spawnroom_red_01
 +
| Close
 +
| &nbsp;
 +
| 0.00
 +
| No
 +
|-
 +
| [[Image:Io11.png]]
 +
| OnStartTouchAll
 +
| door_spawnroom_red_01
 +
| Open
 +
| &nbsp;
 +
| 0.00
 +
| No
 +
|}
 +
 
 +
 
 +
That's it, you just finished making a spawn room! Still, don't forget about lighting and details. A map in Team Fortress 2 may have anywhere from one to three or more spawn rooms per team depending on the map's objectives.
 +
 
 +
== Theory ==
 +
A respawn room's location and arrangement will directly affect the pacing of a map.  It's a good to have a rough idea of how you want your map laid out and how much time it will take players to reach the objectives when choosing their location. The respawn times and the distance to the next major chokepoint (i.e. the next area they are most likely to come into contact with the enemy) will have a major effect on the way the map plays.
 +
 
 +
Your spawnroom should not only provide players with a place to heal up, but a quick break from the action as well. If you're creating a map for public play, keep in mind many TF2 servers have a 10 to 20 second respawn time after a player dies before they can rejoin the action.  If one team can easily exploit the layout of your spawnroom, you'll have players spend that 10 to 20 seconds waiting to respawn only to be greeted by another 10 to 20 second wait when they're killed by the enemy team immediately after spawning. Many players can, and will, exploit any flaws in your map's design.
 +
 
 +
Spawncamping cannot be eliminated from the game, but below are a few pointers on minimalising the effectiveness of spawncamping:
 +
* Try to keep your <code>info_player_teamspawn</code> entities far from the entrance(s), so that when the door is open the respawning team is less vulnerable to weapons' fire.
 +
* Similarly, any resupply cabinets should be far enough back in the room to avoid the above, but close enough to the entrance to make resupplying a quick and easy process (placing them around corners works best).
 +
* Make sure the entrance to the spawnroom is roughly 3 persons wide; if the exit is too narrow, a spawncamper will only have to aim at one spot.
 +
* Also, avoid placing spawn exits at the beginning of long tunnels into the rest of the level, or in cramped spaces; give respawning players multiple routes they can take as soon as they spawn and enough space to avoid weapons' fire on the other side of the door.
 +
* Avoid having windows that allow the opposite team to look into the spawnroom; this will only make it easier for them to know when to reload, seek ammo/health, etc.
 +
* If the spawnroom has two exits, try to ensure they are not within line of sight of each other, so that both cannot be camped by one person at the same time.
 +
* Do NOT place spawn rooms next to important locations such as choke-points, capture points, or the intel. This leads to protracted stalemates. An example of this mistake can be found in 2Fort: the spawn room is right next to the courtyard which must be passed through in order to get to the intel.
 +
 
 +
== See also ==
 +
* [[Team Fortress 2 Level Creation]]
 +
 
 +
== External Links ==
 +
* [http://forums.tf2maps.net/showthread.php?t=198 A Beginner's Guide: The Spawn Room (tf2maps.net)]
 +
* [http://forums.tf2maps.net/showthread.php?t=2513 Adding more detail to spawn rooms! (tf2maps.net)]
 +
 
 +
 
 +
[[Category:Level Design Tutorials]]
 +
[[Category:Team Fortress 2|Creating]]

Latest revision as of 19:11, 20 February 2019

Português-Brasileiro Русский 한국어

Creating your room

A simple room.

First of all, you should choose an area in your map for the spawnroom to be located. It must be large enough to contain however many info_player_teamspawn entities you want to add there without colliding with them. It should also have a hole in the wall for the door that we'll add in later. Other than that it may be of any shape or color. For this example, the room you see on the right will be transformed into a spawnroom for the RED team.

Note.png Note: A spawnroom may also be referred to as a respawn room or simply respawn.

Making it a respawn room

See also: Creating Respawn Areas

Bring the players inside

Now add 16 spaced out player spawns to your room.

First create an info_player_teamspawn in your room, then open its properties box and change the team to RED and the target name to something like team_red_player_01. This naming convention can later help with keeping track of the spawnroom a teampspawn entity is in for debugging and such. Once you are done setting the properties, make 15 additional copies of that info_player_teamspawn entity, making sure each of them have plenty of space. Also, make sure each spawnpoint is raised a small distance off the floor, otherwise they will not work.

Allow players to change class without dying

Fill the room with a func_respawnroom.

Now create a func_respawnroom brush-based entity with material tools/toolstrigger that fills the area containing the info_player_teamspawn entities, you want it to touch the floor and be at least 96 units high. You can do this by using the block tool and creating a square with the tools/toolstrigger material, then click To Entity. Name it something like respawnroom_red_01 (depending on how many spawn rooms you may have for that team) and set its team to RED. Note that this brush will also prevent Engineers from placing their buildings.

Adding a resupply cabinet

See also: Resupply Areas

Add a resupply somewhere obvious.

It may be good to have a resupply area inside your respawn. A resupply consists of two entities:

Create a prop_dynamic somewhere obvious in the room, set its model to models/props_gameplay/resupply_locker.mdl, and give it a name such as resupply_red_1. You can also tweak how long the open/close animation takes by editing the min/max animation time option. Usually 0.5 is a good value to use. Now create a func_regenerate brush-based entity with material tools/toolstrigger, making sure it occupies a larger area surrounding the prop. Set its Associated Model to the name given to the prop_dynamic (in this article, resupply_red_1), and set its team to RED.

Keeping the bullies out

See also: Team-Specific Barriers

Access denied.

Some players like to camp in spawn rooms, killing players right after they spawn. There is, however, an easy solution to this problem which consists of creating a barrier that blocks off the spawnroom entrance from players on the opposing team. To do this, create a func_respawnroomvisualizer brush-based entity with material tools/toolsnodraw. Assign the material overlays/no_entry to the side that faces away from the spawn area and be sure to set its Associated Respawn Room to the correct func_respawnroom, for example, respawnroom_red_01.

Making a door

See also: Team-Specific Doors

The final step is to make a door that will seal off (non-vis) the room from most weapons fire. Firstly, place a prop_dynamic in the doorway and set its model to models/props_gameplay/door_slide_large_door.mdl.

Note.png Note: There are lots of other door models available. You can choose whatever you would like, but this tutorial uses this model. Also note that the door does not require a name for now, however you can name it if you wish.

Next, create a func_door entity. You should try to shape and size the brush close to the size of the prop door. Name it to something that goes along with the current naming scheme (depending on the number of rooms you are going to make), for example, door_spawnroom_red_01. As this entity will be an unseen physical representation for the prop, texture it with a material that matches the model used for the door, in this case we'll use Metal/wall011.

func_door attributes you will have to change individually:

  • Render Mode: since we don't want the func_door to be visible in-game, well set this to Dont Render / None.
  • Speed: changing this will effect how fast the door will open and close. Usually, this is set to 400 for a fast moving door, which allows quick passage. Set it to a lower value to make the door close and open at a slower rate.
  • Delay Before Reset: Set this to -1 so that the door will never close as long as someone is in the doorway. Otherwise, the door will close and NOT reopen until everyone has cleared the trigger. Anything other then a -1 value can lead to griefing (i.e. one player locking an entire team in the spawnroom).
  • Lip: Used to adjust how far the door sticks out of (or goes into if you use a negative number) the surrounding structure. For this tutorial the value is 3. The lip is set in Hammer units.
  • Move direction: This is the final thing to edit and the most important. We want this door to open upwards, so we'll set it to Up. However, you may set it to move in any direction, just make sure players can get past the door after spawning. For rotating doors, use the func_door_rotating entity.

In addition, uncheck Boxunchk.png the Touch Opens flag under the Flags tab, leaving this checked will allow the enemy team to open the door.

Now reselect the door prop, and parent it to the func_door you have just created, door_spawnroom_red_01.

Next, create a filter_activator_tfteam, name it something appropriate, such as filter_redteam, and set the team filter to RED.

Note.png Note:  You can set it to BLU instead, if you are making a BLU Team spawnroom.

The final thing to make is a trigger_multiple that will tell the door when to open and close. The trigger should be large enough to accommodate player size and allow for the door to fully reach its open state before the player gets to it. It may be a good idea to stretch the trigger volume so that it can be activated from either side of the door, instead of making two trigger volumes. Also, make sure you set its filter property to the filter you have created for the door (filter_redteam) so only members of the red team can activate the trigger and open the door. It is probably a good idea to set "Delay before reset" to 0, otherwise the door will remain open once activated.

Now it's time to edit the Outputs tab for our trigger_multiple. Your outputs should match those in the table below:

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnEndTouchAll door_spawnroom_red_01 Close   0.00 No
Io11.png OnStartTouchAll door_spawnroom_red_01 Open   0.00 No


That's it, you just finished making a spawn room! Still, don't forget about lighting and details. A map in Team Fortress 2 may have anywhere from one to three or more spawn rooms per team depending on the map's objectives.

Theory

A respawn room's location and arrangement will directly affect the pacing of a map. It's a good to have a rough idea of how you want your map laid out and how much time it will take players to reach the objectives when choosing their location. The respawn times and the distance to the next major chokepoint (i.e. the next area they are most likely to come into contact with the enemy) will have a major effect on the way the map plays.

Your spawnroom should not only provide players with a place to heal up, but a quick break from the action as well. If you're creating a map for public play, keep in mind many TF2 servers have a 10 to 20 second respawn time after a player dies before they can rejoin the action. If one team can easily exploit the layout of your spawnroom, you'll have players spend that 10 to 20 seconds waiting to respawn only to be greeted by another 10 to 20 second wait when they're killed by the enemy team immediately after spawning. Many players can, and will, exploit any flaws in your map's design.

Spawncamping cannot be eliminated from the game, but below are a few pointers on minimalising the effectiveness of spawncamping:

  • Try to keep your info_player_teamspawn entities far from the entrance(s), so that when the door is open the respawning team is less vulnerable to weapons' fire.
  • Similarly, any resupply cabinets should be far enough back in the room to avoid the above, but close enough to the entrance to make resupplying a quick and easy process (placing them around corners works best).
  • Make sure the entrance to the spawnroom is roughly 3 persons wide; if the exit is too narrow, a spawncamper will only have to aim at one spot.
  • Also, avoid placing spawn exits at the beginning of long tunnels into the rest of the level, or in cramped spaces; give respawning players multiple routes they can take as soon as they spawn and enough space to avoid weapons' fire on the other side of the door.
  • Avoid having windows that allow the opposite team to look into the spawnroom; this will only make it easier for them to know when to reload, seek ammo/health, etc.
  • If the spawnroom has two exits, try to ensure they are not within line of sight of each other, so that both cannot be camped by one person at the same time.
  • Do NOT place spawn rooms next to important locations such as choke-points, capture points, or the intel. This leads to protracted stalemates. An example of this mistake can be found in 2Fort: the spawn room is right next to the courtyard which must be passed through in order to get to the intel.

See also

External Links