Left 4 Dead Infected Populations: Difference between revisions
(→Creating a User-Defined Population: Added some warnings to discourage reckless mapping behavior with population.txt) |
(Results of experimentation...) |
||
Line 195: | Line 195: | ||
==Creating a User-Defined Population== | ==Creating a User-Defined Population== | ||
{{todo|Figure out how to create and use a custom Population and include it with an add-on. | {{todo|Figure out how to create and use a custom Population and include it with an add-on.}} | ||
For the moment, creating a custom infected population does not seem to be supported by the game. If you try to create your own population.txt file and embed it in your VPK, the game will just crash when you try to load your campaign and the linux server will segfault. | |||
{{warning|You should never try to create a custom population for your map by editing the game's official <code>left 4 dead/left4dead/scripts/population.txt</code> file. | {{warning|You should never try to create a custom population for your map by editing the game's official <code>left 4 dead/left4dead/scripts/population.txt</code> file. | ||
You should never overwrite another user's official population.txt file by including one in an archive with your map or by telling them to modify it themselves. However, embedding one in an add-on VPK is fine as it will not overwrite the official one. | You should never overwrite another user's official population.txt file by including one in an archive with your map or by telling them to modify it themselves. However, embedding one in an add-on VPK is fine as it will not overwrite the official one. | ||
Altering the official population.txt file could break it and cause problems with your game installation. It is also possible that this file would be overwritten in an update or by one packaged in a poorly-informed map author's archive, undoing any previous population definitions.}} | Altering the official population.txt file could break it and cause problems with your game installation. It is also possible that this file would be overwritten in an update or by one packaged in a poorly-informed map author's archive, undoing any previous population definitions.}} | ||
{{warning|Specifying a default Left 4 Dead infected population for any area in a campaign makes your campaign unable to be played correctly under the Left 4 Dead 2 Add-on Support compatibility mode. When doing so, Left 4 Dead 2 will attempt to load the infected populations from the first game and while this will work, most of the zombies will glow fluorescent in the dark and none of them will support the damage localization of the second game. As a matter of fact, the holes and wounds created by the weapons on the infected will appear but there won't be any real damage done to the infected skin, making the whole result look awkward and ugly.}} | |||
== See also == | == See also == |
Revision as of 06:56, 14 February 2010
The Basic Idea
Infected populations control which kinds of common infected can be spawned in the different sections of your map.
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
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 common_patient_male01 40 common_worker_male01 15 common_female_nurse01 15 common_surgeon_male01 10 }
This means that any areas with the name "hospital
" would spawn approximately:
- 15% common_male01
- 40% common_patient_male01
- 15% common_worker_male01
- 15% common_female_nurse01
- 10% common_surgeon_male01
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 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
- Load your map in Left 4 Dead.
- Enable cheats by typing "
sv_cheats 1
" into the console. - Type "
nav_edit 1
" in the console to see the nav mesh. - Type "
nav_toggle_place_mode
" into the console and hit enter (or use "nav_set_place_mode
"). You should hear a beep signaling it was turned on. There is a different sound when you disable this. - Type "
nav_use_place <place name>
" in the console. 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 chosen place name. - Paint your nav areas.
- Type "
nav_place_floodfill
" in the console to flood fill, using the chosen place name, all areas that can be reached from the nav area at which your cursor is pointed (as well as the area at which your cursor is pointed). You should use this first to set your map's default spawn type. For instance, if you're making a Hospital map but want to fine-tune a few areas, you want to set the entire map to use "hospital
" so that there are no remaining nav areas using "default
". - You can paint areas individually using "
nav_place_set
". - 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 chosen place name. - You can use "
nav_place_pick
" as a sort of eyedropper for your chosen place name. It will pick the place name from the area you are looking at at and use it as your new chosen place name.
- Type "
- Type "
nav_toggle_place_mode
" into the console and hit enter (or use "nav_set_place_mode
") to turn place mode off. You'll hear a different sound signifying that it has been turned off. - Save the navigation mesh by typing "
nav_save
" into the console. - Use "
nav_edit 0
" to turn off the nav grid display.
List of Useful Commands
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.
List of Official Population Names
Urban
defaulturban
-
- 30% common_male01
- 25% common_female01
- 15% common_male_suit
- 10% common_police_male01
- 10% common_military_male01
- 10% common_worker_male01
police
-
- 50% common_police_male01
- 20% common_male01
- 20% common_female01
- 10% common_military_male01
maintenance
-
- 35% common_worker_male01
- 25% common_male01
- 20% common_female01
- 20% common_military_male01
hospitalgrounds
-
- 20% common_male01
- 20% common_female01
- 15% common_police_male01
- 15% common_military_male01
- 15% common_worker_male01
- 15% common_male_suit
hospital
-
- 40% common_patient_male01
- 15% common_male01
- 15% common_worker_male01
- 15% common_female_nurse01
- 10% common_surgeon_male01
hospitalconstruction
-
- 30% common_worker_male01
- 20% common_patient_male01
- 20% common_female_nurse01
- 20% common_male01
- 10% common_surgeon_male01
airport
-
- 20% common_female01
- 20% common_male_suit
- 15% common_worker_male01
- 15% common_male_baggagehandler_01
- 15% common_tsaagent_male01
- 15% common_male_pilot
airportfinale
-
- 30% common_male_baggagehandler_01
- 20% common_tsaagent_male01
- 20% common_male_pilot
- 10% common_female01
- 10% common_male_suit
- 10% common_worker_male01
Rural
defaultrural
-
- 50% common_male_rural01
- 20% common_female_rural01
- 10% common_police_male01
- 10% common_military_male01
- 10% common_worker_male01
Special
church
Note:This is used with the Info_zombie_spawn located inside of the safe room in the church of Death Toll 3 to spawn a random special infected once the crescendo event is finished.
- 50% boomer
- 25% hunter
- 25% smoker
Default and Others
default
-
- 30% common_male01
- 25% common_female01
- 15% common_police_male01
- 10% common_military_male01
- 10% common_worker_male01
- 10% common_male_suit
test_common_male_suit
-
- 100% common_male_suit
zoo
-
- 20% common_male01
- 10% common_female01
- 10% common_male_rural01
- 10% common_male_suit
- 5% common_female_rural01
- 5% common_female_nurse01
- 5% common_male_baggagehandler_01
- 5% common_male_pilot
- 5% common_military_male01
- 5% common_patient_male01
- 5% common_police_male01
- 5% common_surgeon_male01
- 5% common_TSAAgent_male01
- 5% common_worker_male01
List of Population-Supported Infected Types
Common Infected
- common_female01
- common_female_nurse01
- common_female_rural01
- common_male01
- common_male_baggagehandler_01
- common_male_pilot
- common_male_rural01
- common_male_suit
- common_military_male01
- common_patient_male01
- common_police_male01
- common_surgeon_male01
- common_tsaagent_male01
- common_worker_male01
Special Infected
- boomer
- hunter
- smoker

witch
" or "tank
" in a population will result in a common infected with the witch or tank model and animations.Creating a User-Defined Population
For the moment, creating a custom infected population does not seem to be supported by the game. If you try to create your own population.txt file and embed it in your VPK, the game will just crash when you try to load your campaign and the linux server will segfault.

left 4 dead/left4dead/scripts/population.txt
file.
You should never overwrite another user's official population.txt file by including one in an archive with your map or by telling them to modify it themselves. However, embedding one in an add-on VPK is fine as it will not overwrite the official one.
Altering the official population.txt file could break it and cause problems with your game installation. It is also possible that this file would be overwritten in an update or by one packaged in a poorly-informed map author's archive, undoing any previous population definitions.