L4D2 Mission Files: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added info about official mutations which can be used.)
(massively overhauled entire page. Turning the "prefab" missionfile into a bare bone example, allowing users to add optional lines.)
Line 8: Line 8:
To debug mission files the game needs to be started with the <code>-allowdebug</code> [[Command_Line_Options|command line option]]. Running the <code>mission_reload</code> console command will attempt to load all mission files, and will print information about any errors encountered.
To debug mission files the game needs to be started with the <code>-allowdebug</code> [[Command_Line_Options|command line option]]. Running the <code>mission_reload</code> console command will attempt to load all mission files, and will print information about any errors encountered.


== File Structure ==
== Base Mission File ==
This is the most bare bones mission file, containing only the things you need.
   "mission"
   "mission"
   {
   {
   // This name identifies the campaign for the matchmaking system. It is not visible in the game UI and can't contain spaces or special characters.
   "Name" "myCampaign" //For matchmaking system. Only letters A-Z and Numbers 0-9 allowed.
  "Name" "myCampaign"
  "Version" "1" //For matchmaking system. Only Numbers 0-9 allowed.
    
    
   // This is also used by the matchmaking system for identification. It has to be an integer (1, 2, 3 etc.).
   // Main Menu representation of Campaign.
  "Version" "1"
 
  // These values control how the campaign shows up in the campaign list and the in-game UI.
   "DisplayTitle" "My Campaign!"
   "DisplayTitle" "My Campaign!"
   "Description" "An epic tale of zombies getting shot in the head."
   "Description" "An epic tale of zombies getting shot in the head."
   "Author" "Me!"
   "Author" "Me!"
    
    
   // This URL is shown for players trying to join a game running the campaign. It should point to a place where players can download it. (Not required for workshop submissions)
   // Where to download the campaign. Seen by people trying to join a server playing this campaign. Not required for workshop submissions.
   "Website" "http://media.steampowered.com/apps/513/deadline2.html"
   "Website" "http://media.steampowered.com/apps/513/deadline2.html"
    
    
   // Material VMT file shown behind the end credits when your campaign completes.
   // VMT shown behind the end credits when your campaign ends. MUST have "vgui/" at the front.
  // Note: This item needs to have "vgui\" at the front. It is assumed for the poster and the map thumbnails.
   "OuttroImage" "vgui/outroTitle_DeadCenter"
   "OuttroImage" "vgui/outroTitle_DeadCenter"
    
    
   // A list of melee weapons that are allowed to spawn in the campaign.  
   // A list of melee weapons that are allowed to spawn in the campaign.  
   // Custom melee weapons can be added by using the melee weapon script name in this list, such as "My_custom_melee.txt" at the end of this string.
   // Custom melee weapons can be added by using the melee weapon script name in this list, such as "My_custom_melee.txt" at the end of this string.
   "meleeweapons" "fireaxe;frying_pan;machete;baseball_bat;crowbar;cricket_bat;tonfa;katana;electric_guitar;knife;golfclub;pitchfork;shovel;My_custom_melee"
   "meleeweapons" "baseball_bat;cricket_bat;crowbar;electric_guitar;fireaxe;frying_pan;golfclub;katana;knife;machete;pitchfork;shovel;tonfa;My_custom_melee" //these are all official melee weapon, plus one extra.
    
    
   // Set these options to "1" to enable the effects.
   // Which set of survivors should be used. 1 for L4D1, 2 for L4D2
  "survivor_set" "2"
 
  // Other options. 0 = Off, 1 = on.  
   "allow_cola" "0" // Allows the Dead Center cola bottles to spawn.
   "allow_cola" "0" // Allows the Dead Center cola bottles to spawn.
   "no_wpn_restore" "0" // On player wipe, don't keep any weapons.
   "no_wpn_restore" "0" // On player wipe, don't keep any weapons.
Line 39: Line 39:
   "no_cs_weapons" "0" // Disables spawning of the German version CS weapons. AS of the "The LAst Stand" Css weapons are available for every version of the game. It is unsure if this strinng is still in use.
   "no_cs_weapons" "0" // Disables spawning of the German version CS weapons. AS of the "The LAst Stand" Css weapons are available for every version of the game. It is unsure if this strinng is still in use.
   "allow_diesel" "0" // Allows the Hard Rain Diesel cans to be used.
   "allow_diesel" "0" // Allows the Hard Rain Diesel cans to be used.
  "survivor_set" "2" // Which set of survivors should be used. 1 for L4D1, 2 for L4D2
    
    
   // Loading screen poster settings.
   // Loading screen poster settings.
   "poster"
   "poster"
   {
   {
   // This sets the material used for the loading screen. The path is relative to materials/vgui/
   // Loadingscreen. VMT must be placed in "materials/vgui/"
   "posterImage"         "LoadingScreen_MyCampaign"
   "posterImage"         "LoadingScreen_MyCampaign"
 
   "posterImage_widescreen" "LoadingScreen_MyCampaign_widescreen" // Optional widescreen version. For 16:9 and 16:10 aspect ratios.
   // This sets an optional material used for widescreen resolutions with the 16:9 and 16:10 aspect ratios.
   "fullscreen" "1" // Fitts loading screen onto entire screen, resizing it if required.
   "posterImage_widescreen" "LoadingScreen_MyCampaign_widescreen"
   "l4d2_names" "1" // Use L4D2 survivor names on loadingscreen or not. "survivor_set" already handles this, making this seemingly useless.
 
   "character_order" "coach;mechanic;gambler;producer" //Order in which survivors appear on the bottom left of loadingscreen
  // This stretches out the loading screen material over the entire screen.
   //"character_order" "biker;manager;teengirl;namvet" //Ditto, but L4D1 names.
   "fullscreen" "1"
   }
 
  // This determines which survivor set names to use in the loading screen.
  "l4d2_names" "1"
 
  // This determines what order the survivors names are listed.
   "character_order" "coach;mechanic;gambler;producer"
 
  // These options relate to L4D1 loading screen text. Unused in L4D2
   // "posterTitle" "#L4D360UI_CampaignTitle_C1"
  // "posterTitle_y" "320"
 
  // "posterTagline" "#L4D360UI_CampaignTagline_C1"
  // "posterTagline_y" "380"
 
  // "gambler_player_name_x" "9999"
  // "gambler_player_name_y" "9999"
 
  // "producer_player_name_x" "9999"
  // "producer_player_name_y" "9999"
 
  // "coach_player_name_x" "9999"
  // "coach_player_name_y" "9999"
 
  // "mechanic_player_name_x" "9999"
  // "mechanic_player_name_y" "9999"
   }
 
  // The modes section lists each of your campaign maps and each mode they support.
  // Depending on how you set up your campaign maps, you can reuse the same bsp for different modes as is the case with coop and versus in this example.
  // This requires setting up entities that show up or operate differently for different modes.
  //
  // Any game mode or mutation can be specified here.
  // Mutations will automatically inherit map entries if they are set for their base mode.
  //
  // Number each map section starting with "1"
  //
  // "Map" is the name of the bsp of the starting map. (do not include an extension or path)
  // "DisplayName" is the name to use for the chapter of the map.
  // "Image" is the image used for the chapter in the lobby and settings.
 
   "modes"
   "modes"
   {
   {
   "coop" //tells the game these maps are in Co-Op mode
   "coop" //Co-Op Game mode.
   {
   {
   "1"
   "1"
   {
   {
   "Map" "my_map1"
   "Map" "my_map1" // BSP file name, without extension
   "DisplayName" "Map 1!"
   "DisplayName" "Map 1!" //Name seen on menu
   "Image" "maps/my_map1"
   "Image" "maps/my_map1" //Thumbnail VMT file, must be saved in "materials\vgui\maps"
  // "TankVariant" "models/infected/hulk_dlc3.mdl" // Sets a custom tank to be used for all tanks in this map. in this case the "Train Car" tank from "The Sacrifice"
  // "revisitable" "1" // Saves spawned items so they can be recreated in subsequent levels (used in Hard Rain).
   }
   }
    
    
  "2"
  // Additional maps listed here, make sure to number them correctly.
  {
  // "2"
  "Map" "my_map2"
  // {
  "DisplayName" "Map 2!"
  // "Map" "my_map2"
  "Image" "maps/my_map2"
  // "DisplayName" "Map 2!"
  // "revisit_source" "my_map1" // Recreates spawned items from an earlier level.
  // "Image" "maps/my_map2"
  "TankVariant" "models/infected/hulk_l4d1.mdl"        //Since TLS all L4D1 maps can use the L4D1 SI, which needs to be specified here
  // }
  "HunterVariant" "models/infected/hunter_l4d1.mdl"
  "SmokerVariant" "models/infected/smoker_l4d1.mdl"
  "BoomerVariant" "models/infected/boomer_l4d1.mdl"
  "TankArmsVariant" "models\v_models\weapons\v_claw_hulk_L4D1.mdl"    //These change all viewmodel arms for those SI aswell.
  "HunterArmsVariant" "models\v_models\weapons\v_claw_hunter_l4d1.mdl"
  "SmokerArmsVariant" "models\v_models\weapons\v_claw_smoker_l4d1.mdl"
  "BoomerArmsVariant" "models\v_models\weapons\v_claw_boomer_l4d1.mdl"
  //{{TODO| Are other options such as "SpitterVariant" also possible?}}
  }
   }
   }
  }
  }
==Game Modes==
The "modes" section defines what Game Modes your map(s) support. You may reuse the same bsp for multiple gamemodes, if it was compiled to allow it. See [[L4D2_Level_Design/Multi-Gamemode_Support|Multi Game Mode Support]], [[Survival_Gametype_(L4D)|Survival Gametype]], [[L4D2_Level_Design/Scavenge_Maps|Scavenge Maps]] and [[Mutation_Gametype_(L4D2)|Mutation Gametype]] for more info.<br>
All maps must be listed in chronological order, but it does not matter which game mode is listed first.
Example:
  "modes"
  {
    '''"coop"'''
    {
    "1"
    {
  "Map" "my_map1"
  "DisplayName" "Map 1!"
  "Image" "maps/my_map1"
    }
    "2"
    {
  "Map" "my_map2"
  "DisplayName" "Map 2!"
  "Image" "maps/my_map2"
    }
    }
    
    
  "versus"  
    '''"versus"'''
  {
    {
  "1"
    "1"
  {
    {
  "Map" "my_map1"
  "Map" "my_map1"
  "DisplayName" "Map 1!"
  "DisplayName" "Map 1!"
  "Image" "maps/my_map1"
  "Image" "maps/my_map1"  
  // "TankVariant" "models/infected/hulk_dlc3.mdl"
  "VersusCompletionScore" "800" //This map awards max 800 points to the score when the saferoom is reached.
  "VersusCompletionScore" "500" // How many distance points the survivors will get in the map.
    }
  "versus_boss_spawning" // Used to control spawn chances and positions of bosses.
    "2"
  {
    {
  "spawn_pos_min" "0.30"
  "Map" "my_map2"
  "spawn_pos_max" "0.90"
  "DisplayName" "Map 2!"
  "tank_chance" "1.00"
  "Image" "maps/my_map2"
  "witch_chance" "0.00"
  "VersusCompletionScore" "1000" //This map is longer and rewards 1000 points.
  "witch_and_tank" "0"
    }
  }
    }
  }
 
  "2"
  {
  "Map" "my_map2"
  "DisplayName" "Map 2!"
  "Image" "maps/my_map2"
  "VersusCompletionScore" "600"
  "versus_boss_spawning"
  {
  "spawn_pos_min" "1.00"
  "spawn_pos_max" "1.00"
  "tank_chance" "0.50"
  "witch_chance" "1.00"
  "witch_and_tank" "1"
  }
  }
}
 
  "survival"
  {
  "1"
  {
  "Map" "my_map2"
  "DisplayName" "Map 2!"
  "Image" "maps/my_map2"
  }
  }
 
  "scavenge"
  {
  "1"
  {
  "Map" "my_scavenge_map"
  "DisplayName" "My Scavnege only map!"
  "Image" "maps/my_scavenge_map"
  }
  }
    
    
  // Mutations are defined the same way as normal modes.
    '''"survival"'''
  "holdout"
    {
  {
    "1"
  "1"
    {
  {
   // Uses my_map2.bsp, but because it is the first map in survival mode, it is listed as number 1.
  "Map" "my_map1"
   "Map" "my_map2"
  "DisplayName" "Map 1!"
  "DisplayName" "Parking Lot" //Fancy name because the survival play area is just the parking lot.
  "Image" "maps/my_map1"
  "Image" "maps/my_map2"  
   }
    }
  }
    }
  "mutation15" //This is Versus-Survival.  
  {
   "1"
  {
  "Map" "my_map1"
  "DisplayName" "Map 1!"
  "Image" "maps/my_map1"
  }
  }
  }
   }
   }
 
 
== Usable official Mutations ==
===Available Game Modes===
As mentioned, you can use mutations to force your maps to be played in that specific gamemode.<br>
These are all available gamemodes. Also showing what gamemode a mutation is based on.<br>
Here is a list of all official mutation script names, with their official names<br>
This [https://left4dead.fandom.com/wiki/Mutations#Revealed_Mutations Left4Dead fan wikipedia page] explains what each of those mutations do.
This [https://left4dead.fandom.com/wiki/Mutations#Revealed_Mutations Left4Dead fan wikipedia page] explains what each of those mutations do  
{| class="wikitable"
{| class="wikitable"
|-
|-
! Script name !! Official name
! Script name !! Official name !! Base
|-
|-
mutation1 || Last Man On Earth     
Coop || - || -
|-
|  Realism || - || -
|-
|  Survival || - || -
|-
|  Versus || - || -
|-
|  Scavenge || - || -
|-
|  Dash || - || -
|-   
|  Holdout || - || -
|-         
|-         
mutation2 || Headshot!     
Shootzones || - || -
|-   
|  Gunbrain || GunBrain || Coop
|-           
|  Tankrun || Tank Run || Coop
|-         
|-         
mutation3 || Bleed Out     
Rocketdude || RocketDude || Coop
|-             
|  L4d1 || Left 4 Dead 1 Coop || Coop
|-         
|-         
mutation4 || Hard Eight     
L4d1vs || Left 4 Dead 1 Versus || Versus
|-         
|-         
mutation5 || Four Swordsmen     
L4d1survival || Left 4 Dead 1 Survival || Survival
|-
|  Mutation1 || Last Man On Earth || Coop
|-
|  Mutation2 || Headshot! || Coop
|-         
|-         
mutation6 || Nothing     
Mutation3 || Bleed Out || Coop
|-         
|-         
mutation7 || Chainsaw Massacre     
Mutation4 || Hard Eight || Coop
|-         
|-         
mutation8 || Ironman     
Mutation5 || Four Swordsmen || Coop
|-         
|-         
mutation9 || Last Gnome On Earth     
Mutation7 || Chainsaw Massacre || Coop
|-         
|-         
mutation10 || Room For One     
Mutation8 || Ironman || Coop
|-         
|-         
mutation11 || Healthpackalypse!     
Mutation9 || Last Gnome On Earth || Coop
|-         
|-         
mutation12 || Realism Versus     
Mutation10 || Room For One || Coop
|-         
|-         
mutation13 || Follow the Liter     
Mutation11 || Healthpackalypse! || Versus
|-         
|-         
mutation14 || Gib Fest      
Mutation12 || Realism Versus || Versus      
|-         
|-         
mutation15 || Versus Survival     
Mutation13 || Follow the Liter || Scavenge     
|-         
|-         
mutation16 || Hunting Party     
Mutation14 || Gib Fest || Coop
|-         
|-         
mutation17 || Lone Gunman     
Mutation15 || Versus Survival || Survival
|-         
|-         
mutation18 || Bleed Out Versus     
Mutation16 || Hunting Party || Coop
|-         
|-         
mutation19 || Taaannnkk!     
Mutation17 || Lone Gunman || Coop
|-         
|-         
mutation20 || Healing Gnome     
Mutation18 || Bleed Out Versus || Versus
|-         
|-         
community1 || Special Delivery     
Mutation19 || Taaannnkk! || Versus
|-         
|-         
community2 || Flu Season     
Mutation20 || Healing Gnome || Coop
|-         
|-         
community3 || Riding My Survivor     
Community1 || Special Delivery || Coop
|-         
|-         
community4 || Nightmare     
Community2 || Flu Season || Coop
|-         
|-         
community5 || Death's Door     
Community3 || Riding My Survivor || Versus
|-         
|-         
community6 || Confogl     
Community4 || Nightmare || Survival
|-
|  Community5 || Death's Door || Coop
|-         
|-         
dash || Dash     
Community6 || Confogl || Versus  
|-       
| l4d1 || Left 4 Dead 1 Coop     
|-       
|  l4d1vs || Left 4 Dead 1 Versus    
|-       
|  l4d1survival || Left 4 Dead 1 Survival     
|-       
|  gunbrain || GunBrain     
|-       
|  holdout || Holdout     
|-       
|  shootzones || Shootzones     
|-       
|  tankrun || Tank Run     
|-       
|  rocketdude || RocketDude     
|}
|}


Mutations will automatically inherit map settings of whatever game mode the mutation is based on. unless otherwise specified<br>
Example:
  '''"Versus"'''
  {
  "1"
  {
  "Map" "my_map1"
  "DisplayName" "Map 1!"
  "Image" "maps/my_map1"
  "VersusCompletionScore" "800"
  "versus_boss_spawning"
  {
  "tank_chance" "1"
  "witch_chance" "1"
  }
  }
  }
  '''"Mutation18"''' // Bleed Out Versus. Same as regular Versus, but with halfed Tank and Witch spawn chance to make it easier for survivors.
  {
  "1"
  {
  "Map" "my_map1"
  "DisplayName" "Map 1!"
  "Image" "maps/my_map1"
  "VersusCompletionScore" "800"
  "versus_boss_spawning"
  {
  "tank_chance" "0.5"
  "witch_chance" "0.5"
  }
  }
  }
==Optional Per-Map Settings==
The following settings can be added to any map listing in the missionfile, to make the settings only affect that specific map.<br>
===Revisiting maps===
Some maps, like in Hard Rain can be "Revisited". This allows you to keep all existing item spawns in the same locations, but all the ones you had used are now gone on the way back.<br>
This only works if the items in both maps are in the exact same location, with same orientation. This can be achieved by using the same vmf as base for both maps, but the saferooms being reversed on the "way back", along with optional visual changes.<br>
Example:
  "1"
  {
    "Map" "my_map1"
    "DisplayName" "Map 1!"
    "Image" "maps/my_map1"
 
    '''"revisitable" "1"''' // Keep track of all used items on this map. We'll be coming back to this one.
  }
 
  "2"
  {
    "Map" "my_map2"
    "DisplayName" "Map 2!"
    "Image" "maps/my_map2"
 
    '''"revisit_source" "my_map1"''' // We're back, but going the other way. All items osed on the here specified maps will no longer be available.
  }
{{todo|Find out if it is possible to chain revisits. As in one "hub" map with tons of supplies, which start to dwindle as we progress.}}
===Swapping Special Infected Models===
We have the ability to swap all Special Infected on a map with the same different model. This is mostly used to make use of the L4D1 versions of the Boomer, Hunter, Smoker and Tank.<br>
Swapping all tanks to "Sacrifice" Train Car tank
  "TankVariant" "models/infected/hulk_dlc3.mdl"
  "TankArmsVariant" "models/v_models/weapons/v_claw_hulk_dlc3.mdl"
Using L4D1 SI
  "TankVariant" "models/infected/hulk_l4d1.mdl"       
  "HunterVariant" "models/infected/hunter_l4d1.mdl"
  "SmokerVariant" "models/infected/smoker_l4d1.mdl"
  "BoomerVariant" "models/infected/boomer_l4d1.mdl"
  "TankArmsVariant" "models/v_models/weapons/v_claw_hulk_L4D1.mdl"   
  "HunterArmsVariant" "models/v_models/weapons/v_claw_hunter_l4d1.mdl"
  "SmokerArmsVariant" "models/v_models/weapons/v_claw_smoker_l4d1.mdl"
  "BoomerArmsVariant" "models/v_models/weapons/v_claw_boomer_l4d1.mdl"
Using Bride Witch
  "WitchVariant" "models/infected/witch_bride.mdl"
{{TODO|Are other options such as "SpitterVariant" also possible?}}
===Versus map settings===
Versus maps allow optional modifications to alter the spawning of bosses.
  "versus_boss_spawning"
  {
  "spawn_pos_min" "0.10" // {{todo|Properly document effects of this}}
  "spawn_pos_max" "0.90" // {{todo|Properly document effects of this}}
  "allow_boss_mix" "1" // {{todo|Properly document effects of this}}
"witch_and_tank" "1"// {{todo|Properly document effects of this}}
"tank_chance" "1.0" // tank spawn chance multiplier. can be set to 0 to stop tank spawns
  "witch_chance" "1.0" // witch spawn chance multiplier. can be set to 0 to stop witch spawns
  }


== See also ==
== See also ==
* [[L4D 2 Campaign Add-on Tutorial]]
* [[L4D 2 Campaign Add-on Tutorial]]
 
* [[List_of_L4D2_Missions_Files|List of L4D2 Missions Files]]
[[Category:Left 4 Dead 2]]
[[Category:Left 4 Dead 2]]

Revision as of 17:36, 16 February 2021

Left 4 Dead 2 Left 4 Dead 2 mission files are metadata scripts that describes the structure and content of a campaign. They are used by the game UI, matchmaking, and the game server.

Mission files are .txt files that are stored in the missions directory, for example left4dead2\addons\deadline2\missions\mycampaign.txt. It is strongly recommended that the file is given an unique name to avoid conflicts with other campaigns.

Official mission files can be found in List of L4D2 Missions Files and Deadline_Mission_File

Debugging

To debug mission files the game needs to be started with the -allowdebug command line option. Running the mission_reload console command will attempt to load all mission files, and will print information about any errors encountered.

Base Mission File

This is the most bare bones mission file, containing only the things you need.

 "mission"
 {
 	"Name"		"myCampaign"	//For matchmaking system. Only letters A-Z and Numbers 0-9 allowed.
  	"Version"	"1"		//For matchmaking system. Only Numbers 0-9 allowed.
 
 	// Main Menu representation of Campaign.
 	"DisplayTitle"	"My Campaign!"
 	"Description"	"An epic tale of zombies getting shot in the head."
 	"Author"	"Me!"
 
 	// Where to download the campaign. Seen by people trying to join a server playing this campaign. Not required for workshop submissions.
 	"Website"	"http://media.steampowered.com/apps/513/deadline2.html"
 
 	// VMT shown behind the end credits when your campaign ends. MUST have "vgui/" at the front.
 	"OuttroImage"	"vgui/outroTitle_DeadCenter"
 
 	// A list of melee weapons that are allowed to spawn in the campaign. 
 	// Custom melee weapons can be added by using the melee weapon script name in this list, such as "My_custom_melee.txt" at the end of this string.
 	"meleeweapons"	"baseball_bat;cricket_bat;crowbar;electric_guitar;fireaxe;frying_pan;golfclub;katana;knife;machete;pitchfork;shovel;tonfa;My_custom_melee" //these are all official melee weapon, plus one extra.
 
 	// Which set of survivors should be used. 1 for L4D1, 2 for L4D2
 	"survivor_set"		"2"	
 	
 	// Other options. 0 = Off, 1 = on. 
 	"allow_cola"		"0"	// Allows the Dead Center cola bottles to spawn.
 	"no_wpn_restore"	"0"	// On player wipe, don't keep any weapons.
 	"no_female_boomers"	"0"	// Disables spawning of the Boomette.
 	"no_cs_weapons"		"0"	// Disables spawning of the German version CS weapons. AS of the "The LAst Stand" Css weapons are available for every version of the game. It is unsure if this strinng is still in use.
 	"allow_diesel"		"0"	// Allows the Hard Rain Diesel cans to be used.
 
 	// Loading screen poster settings.
 	"poster"
 	{
 		// Loadingscreen. VMT must be placed in "materials/vgui/"
 		"posterImage"		        "LoadingScreen_MyCampaign"
 		"posterImage_widescreen"	"LoadingScreen_MyCampaign_widescreen" // Optional widescreen version. For 16:9 and 16:10 aspect ratios.
 		"fullscreen"			"1" // Fitts loading screen onto entire screen, resizing it if required.  		
 		"l4d2_names"			"1" // Use L4D2 survivor names on loadingscreen or not. "survivor_set" already handles this, making this seemingly useless.		
 		"character_order"		"coach;mechanic;gambler;producer"  //Order in which survivors appear on the bottom left of loadingscreen
 		//"character_order"		"biker;manager;teengirl;namvet"  //Ditto, but L4D1 names.		
 	}  
 	"modes"
 	{
 		"coop" //Co-Op Game mode. 
 		{
 			"1"
 			{
 				"Map"		"my_map1" // BSP file name, without extension
 				"DisplayName"	"Map 1!" //Name seen on menu
 				"Image"		"maps/my_map1" //Thumbnail VMT file, must be saved in "materials\vgui\maps"
 			}
 
 		//	Additional maps listed here, make sure to number them correctly.
 		//	"2"
 		//	{
 		//		"Map"		 "my_map2"
 		//		"DisplayName"	 "Map 2!"
 		//		"Image"		 "maps/my_map2"
 		//	}			
 		}
 	}
 }

Game Modes

The "modes" section defines what Game Modes your map(s) support. You may reuse the same bsp for multiple gamemodes, if it was compiled to allow it. See Multi Game Mode Support, Survival Gametype, Scavenge Maps and Mutation Gametype for more info.

All maps must be listed in chronological order, but it does not matter which game mode is listed first. Example:

 "modes"
 {
 	  "coop"
 	  {
 		  "1"
 		  {
 			"Map"		"my_map1"
 			"DisplayName"	"Map 1!"
 			"Image"		"maps/my_map1" 
 		  }			
 		  "2"
 		  {
 			"Map"		"my_map2"
 			"DisplayName"	"Map 2!"
 			"Image"		"maps/my_map2" 
 		  }			
 	  }
 
 	  "versus"
 	  {
 		  "1"
 		  {
 			"Map"		"my_map1"
 			"DisplayName"	"Map 1!"
 			"Image"		"maps/my_map1" 
 			"VersusCompletionScore"	"800" //This map awards max 800 points to the score when the saferoom is reached.
  		  }			
 		  "2"
 		  {
 			"Map"		"my_map2"
 			"DisplayName"	"Map 2!"
 			"Image"		"maps/my_map2"  
 			"VersusCompletionScore"	"1000" //This map is longer and rewards 1000 points.
  		  }			
 	  }
 
 	  "survival"
 	  {
 		  "1"
 		  {
 			// Uses my_map2.bsp, but because it is the first map in survival mode, it is listed as number 1.
 			"Map"		"my_map2"
 			"DisplayName"	"Parking Lot" //Fancy name because the survival play area is just the parking lot.
 			"Image"		"maps/my_map2" 
 		  }			
 	  }
 }

Available Game Modes

These are all available gamemodes. Also showing what gamemode a mutation is based on.
This Left4Dead fan wikipedia page explains what each of those mutations do.

Script name Official name Base
Coop - -
Realism - -
Survival - -
Versus - -
Scavenge - -
Dash - -
Holdout - -
Shootzones - -
Gunbrain GunBrain Coop
Tankrun Tank Run Coop
Rocketdude RocketDude Coop
L4d1 Left 4 Dead 1 Coop Coop
L4d1vs Left 4 Dead 1 Versus Versus
L4d1survival Left 4 Dead 1 Survival Survival
Mutation1 Last Man On Earth Coop
Mutation2 Headshot! Coop
Mutation3 Bleed Out Coop
Mutation4 Hard Eight Coop
Mutation5 Four Swordsmen Coop
Mutation7 Chainsaw Massacre Coop
Mutation8 Ironman Coop
Mutation9 Last Gnome On Earth Coop
Mutation10 Room For One Coop
Mutation11 Healthpackalypse! Versus
Mutation12 Realism Versus Versus
Mutation13 Follow the Liter Scavenge
Mutation14 Gib Fest Coop
Mutation15 Versus Survival Survival
Mutation16 Hunting Party Coop
Mutation17 Lone Gunman Coop
Mutation18 Bleed Out Versus Versus
Mutation19 Taaannnkk! Versus
Mutation20 Healing Gnome Coop
Community1 Special Delivery Coop
Community2 Flu Season Coop
Community3 Riding My Survivor Versus
Community4 Nightmare Survival
Community5 Death's Door Coop
Community6 Confogl Versus

Mutations will automatically inherit map settings of whatever game mode the mutation is based on. unless otherwise specified
Example:

 "Versus"
 {
 	"1"
 	{
 		"Map"		"my_map1"
 		"DisplayName"	"Map 1!"
 		"Image"		"maps/my_map1" 
 		"VersusCompletionScore"	"800"
 		"versus_boss_spawning"
 		{
 			"tank_chance"		"1"
 			"witch_chance"		"1"
 		}
 	}			
 }
 "Mutation18" // Bleed Out Versus. Same as regular Versus, but with halfed Tank and Witch spawn chance to make it easier for survivors.
 {
 	"1"
 	{
 		"Map"		"my_map1"
 		"DisplayName"	"Map 1!"
 		"Image"		"maps/my_map1" 
 		"VersusCompletionScore"	"800"
 		"versus_boss_spawning"
 		{
 			"tank_chance"		"0.5"
 			"witch_chance"		"0.5"
 		}
 	}			
 }

Optional Per-Map Settings

The following settings can be added to any map listing in the missionfile, to make the settings only affect that specific map.

Revisiting maps

Some maps, like in Hard Rain can be "Revisited". This allows you to keep all existing item spawns in the same locations, but all the ones you had used are now gone on the way back.
This only works if the items in both maps are in the exact same location, with same orientation. This can be achieved by using the same vmf as base for both maps, but the saferooms being reversed on the "way back", along with optional visual changes.
Example:

 "1"
 {
   "Map"		"my_map1" 
   "DisplayName"	"Map 1!"
   "Image"		"maps/my_map1"
 	
   "revisitable" "1" // Keep track of all used items on this map. We'll be coming back to this one.
 }
 
 "2"
 {
   "Map"		"my_map2" 
   "DisplayName"	"Map 2!"
   "Image"		"maps/my_map2"
 
   "revisit_source" "my_map1" // We're back, but going the other way. All items osed on the here specified maps will no longer be available.
 }
Todo: Find out if it is possible to chain revisits. As in one "hub" map with tons of supplies, which start to dwindle as we progress.

Swapping Special Infected Models

We have the ability to swap all Special Infected on a map with the same different model. This is mostly used to make use of the L4D1 versions of the Boomer, Hunter, Smoker and Tank.

Swapping all tanks to "Sacrifice" Train Car tank

 "TankVariant"		"models/infected/hulk_dlc3.mdl"
 "TankArmsVariant"	"models/v_models/weapons/v_claw_hulk_dlc3.mdl"

Using L4D1 SI

 "TankVariant" 		"models/infected/hulk_l4d1.mdl"         
 "HunterVariant" 	"models/infected/hunter_l4d1.mdl"
 "SmokerVariant" 	"models/infected/smoker_l4d1.mdl"
 "BoomerVariant"	"models/infected/boomer_l4d1.mdl"
 "TankArmsVariant"	"models/v_models/weapons/v_claw_hulk_L4D1.mdl"     
 "HunterArmsVariant"	"models/v_models/weapons/v_claw_hunter_l4d1.mdl"
 "SmokerArmsVariant"	"models/v_models/weapons/v_claw_smoker_l4d1.mdl"
 "BoomerArmsVariant"	"models/v_models/weapons/v_claw_boomer_l4d1.mdl"

Using Bride Witch

 "WitchVariant"	"models/infected/witch_bride.mdl"
Todo: Are other options such as "SpitterVariant" also possible?

Versus map settings

Versus maps allow optional modifications to alter the spawning of bosses.

 "versus_boss_spawning"
 {

"spawn_pos_min" "0.10" //

Todo: Properly document effects of this

"spawn_pos_max" "0.90" //

Todo: Properly document effects of this

"allow_boss_mix" "1" //

Todo: Properly document effects of this

"witch_and_tank" "1"//

Todo: Properly document effects of this
	"tank_chance"		"1.0" // tank spawn chance multiplier. can be set to 0 to stop tank spawns
 	"witch_chance"		"1.0" // witch spawn chance multiplier. can be set to 0 to stop witch spawns
 }

See also