Survival Gametype (L4D)

From Valve Developer Community
Revision as of 04:06, 16 July 2021 by Rectus (talk | contribs) (Undo revision 243841 by MrFunreal (talk) Please make it clear the using both FINALE and BATTLEFIELD is an unsupported hack if you are going to do this.)
Jump to: navigation, search
English Español Русский 简体中文

This article includes basic instructions for creating a Survival mode map for Left 4 Dead.

Starting Survival

Survival rounds begin by triggering any form of panic event.
Any entity capable of telling the Director to force a Panic Event will work. Such as func_button, func_button_timed, trigger_finale, trigger_once, prop_car_alarm or even that one song on the Jukebox.
This is set up in the same method as starting a finale or crescendo event.


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, which will then prefer to stick to that area. 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.

For pure survival maps, 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. Note that this will break navigation for other game modes.
The entire mesh can quickly be marked by entering Nav edit mode and using the console command "nav_select_radius 1000000000" followed by "mark battlefield" and "mark finale".


Survivors spawn at info_survivor_position entities.
Unfortunately finale maps use the same entity to "teleport" the survivors away when approaching the escape vehicle. If your survival map is also the finale of a campaign, or if your map uses the info_survivor_position for anything but the survival spawnpoint, you will need to delete those. Else your players might spawn at the wrong place.
Delete the extra info_survivor_position entities via the Info_gamemode entity, using the output "OnSurvival - info_survivor_position used by finale - kill".


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.
In order to spawn items, you must give every intended survival item a name. You may give all of them the same name to make it easier.
Add a point_template, give it a unique name which lists all survival item names in its "Template" lines.
Add a info_gamemode entity with the output "OnSurvivalPostIO - Point_template - ForceSpawn". Using "OnSurvival" instead of "OnSurvivalPostIO" will cause ammo and ammo upgrade spawnpoints not to be spawned.
Director controlled entities such as weapon_spawn and weapon_item_spawn do not work.

info_gamemode - other uses

Maps are able to load different entities, depending on which gamemode the map is run in. As mentioned in the previous section, survival gamemodes in L4D2 require a info_gamemode and point_template to spawn any items in survival gamemode at all.
The same two entities can be used to load func_brush walls, clip brushes, prop_dynamic, items, or any other sort of entity into your map for survival gamemodes. Like adding barricade props to stop players from reaching the end map saferoom.
Alternatively, you could use info_gamemode along with a logic_relay to delete items you do not wish to have in survival, like Alarm cars which when shot would start the survival round prematurely.

Mission file and testing

Before you can test your map in survival mode, you must add your map to the mission files "survival" mode section.


 		"Map" "mymap"
 		"DisplayName" "My survival Map"
 		"Image" "maps/preview_01"	

The map can be loaded into survival either through the main menu, or using the console via the Command "map mapname_here survival". The latter allows you to use sv_cheats 1 while on survival mode.

See also