Survival Gametype (L4D)
This article includes basic instructions for creating a Survival mode map for Left 4 Dead.
All Survival mode maps rely on the BATTLEFIELD or FINALE attributes on your navigation mesh to define the play space for the Survival mode. In Nav edit mode, mark the spaces which will be used for the Survival playspace with BATTLEFIELD or FINALE. Also, the BATTLESTATION attribute can be used to define good holdout spots for the Survivor Bots. This is set up in the same way as finales or Crescendo Events. Also mark the area where players start with the PLAYER_START attribute.
It is possible to control which areas infected can spawn in by either marking all areas with both FINALE and BATTLEFIELD and then removing the FINALE attribute from areas to disable spawning there, or by adding the NO_MOBS and EMPTY attributes to disabled areas.
Use the info_gamemode entity to set up specific map logic if a single .BSP runs in multiple modes. The OnSurvival output will fire when a map is loaded in Survival mode to set up any specific logic you'd like to do in survival mode. This will allow you to enable/disable or spawn func_brush walls, clip brushes, dynamic props, items, etc. You can use point_template and logic_relay entities triggered here for complex changes to the map.
Survivors spawn at info_survivor_position entities for Survival maps. Simply place four of these in your map to signify where the survivors should spawn in survival mode. In the case of a finale map with an escape vehicle which already uses info_survivor_positions, you may need to use the info_gamemode to kill these other positions so the survivors will spawn at the proper positions.
In L4D, all placed items in the map will spawn in survival mode regardless of the normal densities allowed in other modes. If you wish to change the item placement or numbers, you can use the info_gamemode to spawn or kill items.
In L4D2, all item spawns are removed in survival mode. The intended way to spawn items is using a point_template, usually triggered using a info_gamemode. Director controlled entities such as weapon_spawn and weapon_item_spawn do not work.
Mission file and testing
Add your .BSP to the mission file in the modes section as a survival map and it will work through the menu system. See the Deadline_Mission_File as an example. You may also set the game mode directly in the console by setting "
mp_gamemode survival", however, the mission file will require setup before shipping for the game to play in the correct mode online. When you're done, you can create an Add-on that includes your map.