Common L4D Mapping Problems

From Valve Developer Community
Jump to navigation Jump to search
This article is a convenient place to discuss and post common mapping problems found in the Left 4 Dead series. Feel free to edit the article with your findings or update existing information.
Todo: Add categories.
Hammer does not appear to be fully configured and I have to configure every time I start up Hammer. I have installed L4D Authoring Tools for the first time. It is missing paths to programs for BSP, VIS, RAD, and the compiled map location. This is extremely frustrating as a first time mapper, what do I do?
Left 4 Dead 2 GameConfig.txt needs to be edited to include the following text:
"Configs"
{
	"Games"
	{
		"l4d2"
		{
			"GameDir"		"..\left4dead2"
			"Hammer"
			{
				"GameData0"		".\left4dead2.fgd"
				"TextureFormat"		"5"
				"MapFormat"		"4"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"..\left4dead2.exe"
				"DefaultSolidEntity"		"func_brush"
				"DefaultPointEntity"		"prop_static"
				"BSP"		".\vbsp.exe"
				"Vis"		".\vvis.exe"
				"Light"		".\vrad.exe"
				"GameExeDir"		"..\"
				"MapDir"		"..\sdk_content\mapsrc"
				"BSPDir"		"..\left4dead2\maps"
				"CordonTexture"		"BLACK"
				"MaterialExcludeCount"		"0"
			}
		}
	}
	"SDKVersion"		"5"
}
GameConfig.txt is located in your Hammer directory (*\Left 4 Dead 2\bin). This is a recent issue caused by an update to the tools or Windows update. Hammer should actually be fully configured from the start. Hopefully a solution restores this config file in a future update to reduce the friction between a newcomer and the authoring tools.


How do I make the infected spawn?
Left 4 Dead series In most cases, this is from not having a navigation mesh. A navigation mesh is crucial in the L4D series. Your map also must have a info_director that is enabled, you also may have to use the console command "director_start" if "director_stop" was used during anytime during a session. For wandering zombies to be spawned when you load the map, the director needs to be able to compute a path from the start to the finish. See Navigation Meshes and the official L4D Level Design Docs for more info
Todo: desribe the the "bare minimum". test with recent build of game.


Why won't the survivor bots move?
In most cases, a nav mesh needs to generated. See Navigation Meshes. If a nav mesh already exists and the problem persists, investigate the nav mesh and the map in Hammer. In one unusual case, an entire nav mesh can be "blocked" due to a sky_camera crossing through it.


Why is the molotov fire / Smoker's smoke cloud not visible in-game?
Left 4 Dead This is usually due to the lack of a env_fog_controller entity. Also, check to make sure there were no errors generated during the map's compile process.


Why won't my rescue closets work?
Rescue closets will not function correctly if there are any nav errors present in the map (the "NAV ERRORS - Map is unplayable!" message appears in game). You will want to make sure the map's nav mesh is properly set-up.
Todo: test with recent build of game for accuracy
Also make sure you're using info_survivor_rescue, not info_survivor_position. You can get some confirmation with some console commands. rescue_show will highlight info_survivor_rescue locations. rescue_update_nav adds/removes anything considered valid/invalid as a rescue closet.


How do I play my map in Versus Mode or Survival Mode?
Left 4 Dead To play your map in Versus or Survival mode, first set the CVAR "mp_gamemode" to "versus" or "survival" (respectively), then load your map using the "map" command. So if you wanted to play your map "warehouse.bsp" in survival mode, you would type in the console (while on the main menu) "mp_gamemode survival; map warehouse". Similarly, if you wanted to switch back to regular campaign mode, type "mp_gamemode coop; map warehouse". (Note 1: "coop" and "campaign" are synonymous when using the mp_gamemode command) (Note 2: If you're already in a game running locally, you can switch gametypes by using the "mp_gamemode" command, then the "changelevel" command.)
Left 4 Dead 2 Use console command map <MAP NAME> MODE (survival, coop, versus, or scavenge). When the client is first started, map <MAP NAME> will load in coop mode by default on start up and whatever mode loaded before that.


Why doesn't my custom map load when using in tools mode loaded from the Authoring Tools menu?
Left 4 Dead When loading the tools mode version of L4D, press F10 to switch to the game, bring down the console and set sv_lan 1.
Todo: needs confirmation for l4d1
Left 4 Dead 2 The console is available in the lower-left corner of window. Set sv_lan 1.


Why is the rain particles splash when hitting the floor/objects nearly impossible to see / very transparent?
You must compile your map with HDR enabled for the rain splash effect to be clearly visible.


Why doesn't the game recognise/play custom sounds I place in the sound directory even though they are in the correct format?
Left 4 Dead The sound cache (sound.cache) needs to be generated with snd_buildsoundcachefordirectory. For Left 4 Dead series, sound.cache can be each individual sound directory.
Left 4 Dead 2 The sound cache needs to be generated with snd_buildsoundcachefordirectory, whether it is the official sound directory or add-on. The add-on also must be packed with the updated sound.cache in order for sounds to work. Testing for working sounds can be done via console (with or without a map loaded) and in-game. Please see L4D2 Custom Sound and Music Tutorial.


After compiling my map without vrad to quickly test small changes, the map became full bright, but now even when I compile with vrad, my map is still fully lit up.
Left 4 Dead series The game engine automatically sets mat_fullbright 1 when loading a map that hasn't been compiled with vrad. However, L4D does not turn it off automatically when loading a map that has been compiled with vrad. If you leave L4D open during development in a window and reload your map after a full vrad compile, you must manually set mat_fullbright 0. After setting mat_fullbright to "0", you may need to reload your map for it to display correctly.


Why does L4D ignore my info_survivor_position? I can only use info_player_start?
There is a bug with logic_auto's onmapspawn in conjunction with using it to call an info_directors forcesurvivor input which does not allow it to function properly unless your map is loaded as a campaign. Instead, set up the info_director to have a name then in the info_directors output, have it trigger itself once to call forcesurvivorpositions with 0.00 delay, then again with releasesurvivorpositions with 0.01 delay.
Todo: test with latest build of both games.


How do I get music to play like in official L4D campaigns?
Left 4 Dead L4D has what is known as the Music Director. The music director will play music based on certain 'Events' occuring througout the campaign. You can learn how to add default music to your campaign, as well as how to customize your own music by following the guide here: L4D Custom Music Tutorial
Left 4 Dead 2 You can start off by changing the map Music Post-Fix String to an official one and then eventually create a custom one if desired. Note that some music will only play when you have a proper nav mesh with specific attributes! You can also customize your music to your liking using a combination of per-map soundscripts and following the L4D2 Custom Sound and Music Tutorial.


Why does the grass textures have misaligned/floating detail props (grass, bushes) when I compile and run my map?
This is a bug with the default detail type. For now, you can use the rural detail sprites as an alternative. To use them, simply open your map in Hammer, go to Map on the top menu, and select Map Properties. From here, find the Detail Material File entry and change it from detail/detailsprites to detail/ruraldetailsprites Compile and test ingame to see the changes.


Why does the game randomly crash to desktop only when my campaign is ran as a VPK?
There are two common reasons for this. One is that you have custom content in your map that you either forgot to include with the VPK or is pathed wrong. As an example a single custom sprite missing from your VPK directory when referenced in the map, will crash L4D to desktop. The other common reason is having custom models in your map. There is a bug where sometimes custom models will crash the game to desktop with an error in shader.dll as soon as the model is within your PVS (is being drawn by the engine). Valve is working on this issue, but in the meantime the work around is to bspzip your custom models into the BSP files themself, instead of leaving them within the VPK directory struture.


When all the players die, they respawn in the ending safe house, any ideas?
As long as your info_landmarks are named and referenced correctly by coresponding info_changelevels, the reason for this bug is usually that you are marking the NAV MESH with PLAYER_START on maps that are NOT the very first map in your campaign, as well, you must have 2 areas on your map marked as CHECKPOINT (Minus the finale map), the start area of your current map, and the ending safehouse. Even the very first map which has an area marked PLAYER_START, must ALSO be marked CHECKPOINT. What is happening here, is that when you only have the end safe house marked as CHECKPOINT, the director when reloading the map looks for the nearest CHECKPOINT to the info_player_start, thus you must make sure you have the area with your info_player_start marked as CHECKPOINT as well.


Cubemaps - I placed cubemaps and built them in game (buildcubemaps). When editing and compiling the map looked fine but now it is all shiny when I reload the map.
Left 4 Dead series After you build your cubemaps, bring up the console and type "disconnect". Then, when you're at the main menu, with the console still open, type "mat_reloadallmaterials" and "mat_reloadtextures". After that's done, type "map mapname". That should fix any weird reflection issues. Or you can just restart your client after you build your cubemaps, but that's considered a waste of time to some.


Some the lighting with my textures are very dark and/or pitch black. What has VRAD done to my map? What have I done? OR Shadows have suddenly appeared in my map where there should not be any shadows.
Left 4 Dead 2 One possible cause of dark textures is misalignment or stretching of textures. It could be caused by rotating textures that were selected along with entities. Hide all entities with autovis, realigned textures back to normal, then re-compile. Everything should look correct now.
  • Other possible causes mentioned by the community. They are not fully tested but may help:
    • Origins of brush entities that affect VRAD (such as func_detail) deviate from their default origins
    • Brushes (world or entity) that don't seem to have any volume. One mapper observed brushes suspiciously textured with toolswhite, something that was never used to his recollection. Without being if face edit mode, mark objects textured with any unusual texture and see if they are visible in any viewport.


My L4D1 map won't load in Hammer after loading/saving it in L4D2. What happened?
The VMF formats are slightly different. The VMF can be loaded as a readable text file for editing (with something like Notepad++). Substitute the escape character (0x1B) with commas.


The Half-Life Model Viewer (HLMV) is unable to access models stored in the official VPK. I can't open or see any models using that program.
Left 4 Dead 2 In the external model folder (..\left4dead2\models), add an empty folder of the same name for the folder you would like to access in HLMV. You should be able to instantly access that folder once it is created.


The survivor screams/yells/talks/calls out for others constantly when alone. For example, Nick regularly yells out, "Hellooooo???" It is really annoying when I'm working on my navigation mesh.
Left 4 Dead 2 One way to keep a survivor from talking when alone is with console command ai_talk_idle_enabled 0


Survivors refuse to walk into an elevator car or func_tracktrain (ferry, cable car, boat, etc.). What do I have to do to get them in there like in official maps?
For elevators, please see Sorting out navigation flow for elevators. func_tracktrain must be touchable by bots and a proper escape_route must be going through the nav that is stringed to the other end of the path track. So, for example, a dynamic model parented to func_tracktrain must high enough to collide with players, not the model collision hull.


The add-on that I'm testing with others has been reported to have missing models and textures. How do I have a tester report those missing assets in a fast and accurate way?
Left 4 Dead 2 Missing textures and models are not reported by the console when the game is loaded normally. Ask the tester to load the map while in dev mode and see what missing models and textures are output by the console. Either get a log of that output or ask for a copy of the relevant portion.


My textures look degraded/low quality/muddled/bad/ugly/blurry in-game even though it looks fine/sharp/fabulous/good in Hammer. What is happening and how do I fix this?
Check Page Pooled Memory settings in your client video settings. It should be set to high for highest texture fidelity. Page Pool Memory set to Low will degrade textures.

Error messages and what they mean

General

***VPK: FindFile Attempting to use full path with VPK file!
N/A, but this error can be safely ignored


WARN: CL4DBasePanel::UpdateProgressBar called outside of level loading, discarded!
[Todo]


Engine Error: 81/ - weapon_ammo_spawn: UTIL_SetModel: not precached: models/props_unique/spawn_apartment/coffeeammo.mdl
Can be fixed by spawning a prop_dynamic with the modelname or by listing the model in the reslist (.LST) file. MAY need textures mentioned as well!


Steam Validation Rejected
Make sure that you have "+sv_lan 1" set in your game's launch options.


Engine Error: CModelLoader::FindModel: NULL name
This can be caused due to compiling the map using an outdated FGD. Older FGDs do not have the new values for the env_fog and light_environment entities, therefore you are compiling a BSP with missing information. Some people (AKA me) also experienced this crash with certain props. For example, the Howitzer Handle from Crash Course (models/props_vehicles/m119howitzer_01_handle.mdl). When Default Animation is filled with a valid animation (ie: idle), the game crashes with this message.


Assert, File: U:\dev\terror\src\tier0\memstd.cpp, Line: 1623, Assert: ***: OUT OF MEMORY! attempted allocation size: 536873088 ****
If the map crashed once, you can try relaunching L4D and load your map again. It should load up fine the second time. Also try turning Multicore Rendering off, if turned on.
Note.pngNote:If you're compiling without the official SDK, the 2 errors below are likely due to the BSP missing a "stringtable_dictionary.dct" file. For more information on fixing this, see "Why does a newly compiled map crash after being loaded in L4D?" above.

Navigation mesh related errors

These nav errors will all cause the message "NAV ERRORS - Map is unplayable!" to be displayed in game when the map is loaded.

Also see Sorting out navigation flow.

The nav file was built for an older compile.
This error message means the ".nav" file for a map is older then the ".bsp" itself. This should not be a problem unless the map's layout was changed after the ".nav" file was created. This can be remedied by running nav_analyze in the console after changes are made to the ".bsp".


Missing nav file.
[Todo]


Missing Battlefield check found N areas
[Todo]


GetGoalArea
Cannot find SPAWN_RESCUE_CLOSET area in FINALE, thus cannot guarantee reachability of goal area.
Regarding respawn closets; there are 2 essential steps for making them work properly. Place 3 Info survivor position entities in a room or closet then in game use the mark RESCUE_CLOSET console command to identify the closet/room as a rescue area. This process is explained in Navigation Meshes. Equally important is labeling the "player start" and checkpoint meshes using mark CHECKPOINT and mark PLAYER_START respectively.


GetGoalArea: Cannot find end area - no checkpoint or finale located.
This error is due to lack of one of the following:
  1. A missing Prop door rotating checkpoint entity.
  2. Not identifying a navigation mesh with mark CHECKPOINT.
  3. Not identifying a navigation mesh with mark FINALE.
  4. Not properly using a trigger_changelevel with its correct info_landmark or not using it at all.


ComputeFlowDistances: ERROR - Cannot compute flow.
The "Flow" of the map refers to the ability of the AI to travel from the spawn location to the designated Saferoom/finale checkpoint. If there are any breaks in the navigation mesh (meshes that are not connected via nav_connect or nav_splice), L4D cannot compute the path necessary to travel the map. The map need to be fully playable for the game to compute the flow. Which means a fully working spawn room and a fully working safe room are mandatory.
Note.pngNote:Nav_generate can leave certain essential meshes from being connected, sometimes manual connection is required.
Note.pngNote:It is possible to remove the "NAV ERRORS - Map is unplayable!" error message. One method found is to make sure your map has an info_player_start, info_director, and a nav mesh, then follow the steps in "The safe house and changing levels " and "Building the navigation mesh" in Your First Left 4 Dead Map.


The game crashes when using nav_delete?
Use director_stop and then nb_delete_all to make sure all survivor bots and infected are removed before editing your nav mesh.

See also