Left 4 Dead Infected Populations

From Valve Developer Community
Jump to navigation Jump to search
English (en)Русский (ru)中文 (zh)Translate (Translate)

Infected populations control which kinds of common infected can be spawned in the different sections of your map.

TSA workers, a baggage handler, a mechanic and citizens in the "Dead Air" terminal.
An uncommon Ceda Agent among Common infected, in the front of the "Vannah" hotel.

For example, infected populations can cause:

  • Patients, nurses, and surgeons to spawn in a hospital
  • Military personnel to spawn in a military base
  • Rural citizens to spawn on a farm
  • Police officers to spawn on a street filled with police cars

The basics

Each defined population has a name and a list of model names with associated percentages. The percentages within each population add up to 100% and define how frequently each type of infected should be spawned within the area.

For example, the "hospital" population is defined as:

hospital
	{
		common_male01		15 //15% chance to spawn this infected
		common_patient_male01 	40 //40% chance to spawn this infected
		common_worker_male01	15 //15% chance to spawn this infected
		common_female_nurse01	15 //15% chance to spawn this infected
		common_surgeon_male01	10 //10% chance to spawn this infected
	}

Additionally, the populations may also allow certain special infected to spawn. This is typically used in conjunction with Info_zombie_spawn. Currently only hunters, boomers, and smokers can be spawned through infected populations.

To specify a default population for the whole map, set "z_population" to the name of the desired population entry.

To specify populations within your map, your nav mesh areas must be given place names corresponding to those defined in population.txt, located within the "scripts" directory of your Left 4 Dead installation.

How To Use Them In a Map

  1. Load your map.
  2. Enable cheats by typing sv_cheats 1 into the console.
  3. Type Nav_Edit 1 in the console to see the nav mesh.
  4. Type Nav_Toggle_Place_Mode into the console and hit enter. You should hear a beep signaling it was turned on. There is a different sound when you disable this.
  5. Type Nav_Use_Place in the console. It will print a list of all available place names.
  6. Type Nav_Use_Place PLACE NAME in the console to pick a place name to paint with. This is like picking the color of a paintbrush in an image editing program. It decides what place name will be used for all of the place commands. This place name will be referred to as your PLACE NAME.
  7. Type z_population PLACE NAME to set the default population for the entire map. If not set, this will use the place name "Default".
  8. Paint areas individually using nav_add_to_selected_set to select various nav areas at once (quicker when using keybinds, like the one fromnav_mode.cfg) and then useNav_Place_Set to assign the PLACE NAME.
  9. You can also turn on a special painting mode with Nav_Toggle_Place_Painting. This command will paint every nav area you look at with the PLACE NAME.
    Warning.pngWarning:This paints every area you look at, instantly. Even the ones way off in the distance or on floors below
    Tip.pngTip:Helpful Commands:
    Nav_Place_Floodfill replaces the PLACE NAME of the area you're aiming at along with all areas connected to it that use the same PLACE NAME with the one you had chosen.
    Nav_Place_Pick is an eyedropper for your PLACE NAME. It will pick the place name from the area you are looking at and use it as your new PLACE NAME.
    Nav_Begin_DragSelecting begins horizontal box selection of nav areas. Nav_End_DragSelecting ends it, which will keep all marked areas in selection. After using these commands, you must toggle Nav_Toggle_Place_Mode back on.
    Nav_Select_Radius 100 selects all navmesh in a radius of 100 units around you to then paint. You may use however many units you want.
  10. Type Nav_Toggle_Place_Mode into the console and hit enter to turn place mode off. You'll hear a different sound signifying that it has been turned off.
  11. Save the navigation mesh by typing Nav_save into the console.
  12. Use Nav_Edit 0 to turn off the nav grid display.

List of Useful Commands

z_population
Sets the default population for all nav areas that do not specify a place name.
nav_set_place_mode <0/1>
Sets the editor into or out of place mode. Place mode allows labeling of area with place names.
nav_toggle_place_mode
Toggle the editor into and out of place mode. Place mode allows labeling of area with place names.
nav_toggle_place_painting
Toggles place painting mode. When place painting, pointing at an area will 'paint' it with the chosen place name.
nav_place_list
Lists all place names used in the map.
nav_mark_unnamed
Marks all areas with no place name. Useful for finding stray areas missed while place painting.
nav_use_place <optional: place name>
If used without arguments, all available place names will be listed. If a place name argument is given, it becomes the chosen place name.
nav_place_floodfill
Sets the place name of the area at which your cursor is pointed to the chosen place name, and 'flood-fills' the chosen place name to all areas that can be reached from the area at which your cursor is pointed.
nav_place_pick
Changes the chosen place name to the place of the area under the cursor.
nav_place_replace
Replaces all instances of the first place name with the second place name.
nav_place_set
Sets the place name of all selected areas to the chosen place name.

Left 4 Dead Populations

Urban


Rural


Special


Default and Others


Left 4 Dead 2 Populations

L4D2 used its own L4D2 Common Infected on all L4D1 maps until The "Last Stand" update added all L4D1 Common Infected, along with new Uncommon Infected models and populations to the L4D1 maps.
This caused all L4D1 populations, such as "Hospital" to have two variants. One variant using L4D2 CI and one using L4D1 CI. This section lists all populations, including the old L4D1 versions using only L4D2 CI. The new "L4D1 CI" populations are listed separately below.
The populations are listed by map specific populations, but any campaign can make use of any other populations as filler.

Default / Shared


Dead Center


The Passing


Dark Carnival


Swamp Fever


Hard Rain


The Parish


The Sacrifice

Uses L4D2 CI


No Mercy

Uses L4D2 CI


Dead Air

Uses L4D2 CI


Special populations

These are special populations that exist in L4D2, but should not actually be used.


L4D1 Populations in L4D2

These are all updated L4D1 populations using L4D1 CI.

Default / Shared


The Sacrifice


Dead Air


No Mercy


List of Population-Supported Infected Types

Here are all names you could use in a population without encountering unwanted bugs.

Left 4 Dead

A list of all L4D1 CI.
can be used in L4D and L4D2. (Click to enlarge)

Common Infected

These infected are available in L4D1 and L4D2. Three of these are only available in L4D2.

Female
  • common_female01
  • common_female_baggagehandler_01 (only in Left 4 Dead 2)
  • common_female_nurse01
  • common_female_rural01
  • common_female01_suit (only in Left 4 Dead 2)
Male
  • common_male01
  • common_male02 (only in Left 4 Dead 2)
  • common_male_baggagehandler_01
  • common_male_pilot
  • common_male_rural01
  • common_male_suit
  • common_military_male01
  • common_patient_male01_l4d2
  • common_police_male01 (in Left 4 Dead 2, the police may drop a baton if the mission file allows for it)
  • common_surgeon_male01
  • common_tsaagent_male01
  • common_worker_male01

Special Infected

  • boomer
  • hunter
  • smoker
Warning.pngWarning:Attempting to use "witch" or "tank" in a population will result in a common infected with the witch or tank model and animations.

Left 4 Dead 2

A list of all L4D2 CI.
Can only be used in L4D2. (Click to enlarge)

Common Infected

These infected are only available in L4D2.

Female
  • common_female_formal
  • common_female_tanktop_jeans
  • common_female_tanktop_jeans_rain
  • common_female_tshirt_skirt
  • common_female_tshirt_skirt_swamp
Male
  • common_male_biker
  • common_male_dressshirt_jeans
  • common_male_formal
  • common_male_polo_jeans
  • common_male_tanktop_jeans
  • common_male_tanktop_jeans_rain
  • common_male_tanktop_jeans_swamp
  • common_male_tanktop_overalls
  • common_male_tanktop_overalls_rain
  • common_male_tanktop_overalls_swamp
  • common_male_tshirt_cargos
  • common_male_tshirt_cargos_swamp

Uncommon Infected

L4D2

  • common_male_ceda
  • common_male_clown
  • common_male_fallen_survivor
  • common_male_jimmy
  • common_male_mud
  • common_male_riot
  • common_male_roadcrew
  • common_male_roadcrew_rain
  • common_male_parachutist
Note.pngNote:Parachutist is a fallen survivor that looks like the dead parachutist hanging in Swamp Fever.

L4D1 Counterparts

  • common_male_ceda_l4d1
  • common_male_fallen_survivor_l4d1
  • common_male_mud_l4d1
  • common_male_riot_l4d1
  • common_male_roadcrew_l4d1
  • common_male_baggagehandler_02
Note.pngNote:Baggagehandler_02 is a baggagehandler from the airport, but with ear protection. They're essentially the same as roadcrew.
Note.pngNote:The L4D1 fallen survivor has the helicopter pilot model as available bodygroup.
Icon-Bug.pngBug:Common_male_riot_l4d1 is unfinished and broken.  [todo tested in ?]

This or this mod will fix Common_male_riot_l4d1.

Special Infected

  • boomer
  • charger
  • hunter
  • jockey
  • smoker
  • spitter
  • tank
  • witch
  • witch_bride
Warning.pngWarning:Use "witch_bride" in a population will result in game crash due to no precached bride witch model. To avoid it you either need to spawn one bride witch model using prop_dynamic entity at some unreachable part of the map plus giving the entity a name, seconds later have the bride witch spawned using info_zombie_spawn entity with witch_bride population and make the logic_auto remove the entity. Another way is to add the following lines to your "reslists\mapname.lst if you think about using Content Streaming, only works for official games. Also removing the need of placing a prop_dynamic entity with the Witch Bride model.
"left4dead2_dlc1\models\infected\witch_bride.ani"
"left4dead2_dlc1\models\infected\witch_bride.dx90.vtx"
"left4dead2_dlc1\models\infected\witch_bride.mdl"
"left4dead2_dlc1\models\infected\witch_bride.phy"
"left4dead2_dlc1\models\infected\witch_bride.vvd"
"left4dead2_dlc1\materials\models\infected\witch\witch_bride_dress.vmt"
"left4dead2_dlc1\materials\models\infected\witch\witch_bride_dress.vtf"
"left4dead2_dlc1\materials\models\infected\witch\witch_bride_veil.vmt" 
"left4dead2_dlc1\materials\models\infected\witch\witch_bride_veil.vtf" 

Creating a User-Defined Population

Population file changes will only affect the maps listed in all Mission Files contained the same addon VPK.
Example: Including the "Campaign10" and "Campaign11" mission files to the VPK file to only have "Death Toll" and "Dead Air" use the modified population.

Note.pngNote:For L4D2, modify the population.txt found in "left 4 dead 2\update\pak01_dir.vpk". It contains the newest populations for L4D1 maps, which would be missing otherwise.


For new population groups, open population.txt, scroll to the very bottom and add the following after the last population entry, but before the final closing curly bracket }.

	custom_population_1
	{
		common_male_tankTop_jeans	55
		common_male_riot 45
	}

Use as many model names as you want, but make sure the numbers add up to exactly 100.
Place the modified population.txt into the "Scripts" subfolder of whatever folder will later become your addon VPK.

To enable custom populations to be placed into the nav mesh, temporarily pack the custom population file into an addon VPK, because the nav mesh nav_use_place command will only allow using the populations from the currently loaded population file.

Warning.pngWarning:Editing the nav-mesh while the population.txt addon is disabled/uninstalled will cause the assigned custom populations to swap to "Defaulturban". Therefore make sure to never uninstall this population addon until you're completely finished with the navmesh, else your assignments will be saved with the wrong population.

See also