L4D2 Mission Files
Jump to navigation
Jump to search
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.
File Structure
"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" "my_campaign"
// This is also used by the matchmaking system for identification. It has to be an integer (1, 2, 3 etc.).
"Version" "1"
// These values control how the campaign shows up in the campaign list and the in-game UI.
"DisplayTitle" "My Campaign!"
"Description" "An epic tale of zombies getting shot in the head."
"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.
"Website" "http://www.example.com"
// Material VMT file shown behind the end credits when your campaign completes.
// Note: This item needs to have "vgui\" at the front. It is assumed
// for the poster and the map thumbnails.
"OuttroImage" "vgui/outroTitle_DeadCenter"
// A list of melee weapons that are allowed to spawn in the campaign.
// The knife is only available for players with the German version.
"meleeweapons" "electric_guitar;frying_pan;fireaxe;crowbar;cricket_bat;katana;baseball_bat;golfclub;knife"
// Set these options to "1" to enable the effects.
"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.
"allow_diesel" "0" // Allows the Hard Rain Diesel cans to be used.
"survivor_set" "1" // Which set of survivors should be used. 1=L4D1, 2=L4D2
// Loading screen poster settings.
"poster"
{
// This sets the material used for the loading screen. The path is relative to materials/vgui/
"posterImage" "LoadingScreen_MyCampaign"
// This sets an optional material used for widescreen resolutions with the 16:9 and 16:10 aspect ratios.
"posterImage_widescreen" "LoadingScreen_MyCampaign_widescreen"
// This stretches out the loading screen material over the entire screen.
"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.
// "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"
{
"coop"
{
"1"
{
"Map" "my_map1"
"DisplayName" "Map 1!"
"Image" "maps/my_map1"
// "TankVariant" "models/infected/hulk_dlc3.mdl" // Sets a custom tank model per-map.
// "revisitable" "1" // Saves spawned items so they can be recreated in subsequent levels (used in Hard Rain).
}
"2"
{
"Map" "my_map2"
"DisplayName" "Map 2!"
"Image" "maps/my_map2"
// "revisit_source" "my_map1" // Recreates spawned items from an earlier level.
}
}
"versus"
{
"1"
{
"Map" "my_map1"
"DisplayName" "Map 1!"
"Image" "maps/my_map1"
// "TankVariant" "models/infected/hulk_dlc3.mdl"
"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.
{
"spawn_pos_min" "0.30"
"spawn_pos_max" "0.90"
"tank_chance" "1.00"
"witch_chance" "0.00"
"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.
"holdout"
{
"1"
{
"Map" "my_map1"
"DisplayName" "Map 1!"
"Image" "maps/my_map1"
}
}
}
}