Common L4D Mapping Problems: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(More precisions on CModelLoader::FindModel: NULL name)
No edit summary
 
(35 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{toc-right}}
{{toc-right}}
<div style="text-align:center;font-size:1.25em;margin:1em; border:solid 1px black;">'''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.'''</div>
{{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?
: {{l4d2}} GameConfig.txt needs to be edited to include the following text:
<pre>"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"
}</pre>
: 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.


; Why does a newly compiled map crash L4D after being loaded?
: Left 4 Dead requires the file "stringtable_dictionary.dct" to be [[Bspzip|embedded]] inside the BSP to open it.  If the file is not present L4D will pack the file inside the BSP, but will crash in the process.  To prevent this from happening, you can configure [[Hammer]] to automatically pack a "stringtable_dictionary.dct" file into your BSP during the compile process. To do this, follow the tutorial [http://forums.l4dmaps.net/showthread.php?t=396 here]. The "stringtable_dictionary.dct" file itself can be obtained from that tutorial, or extracted from an official L4D map using a tool like [[Pakrat]].
; How do I make the infected spawn?  
; How do I make the infected spawn?  
: Your map must have a [[info_director]] that is enabled, you also may have to use the console command "director_start". 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''
: {{l4ds}} 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?
; Why won't the survivor bots move?
: The most likely cause is a faulty or missing ".nav" file. ''See [[Navigation Meshes]]''
: In most cases, a nav mesh needs to generated. ''See [[L4D_Level_Design/Nav_Meshes|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?
; Why is the molotov fire / Smoker's smoke cloud not visible in-game?
: This is usually due to the lack of a <code>[[env_fog_controller]]</code> entity.  Also, check to make sure there were no errors generated during the map's compile process.
: {{l4d}} This is usually due to the lack of a <code>[[env_fog_controller]]</code> entity.  Also, check to make sure there were no errors generated during the map's compile process.
 
 
; Why won't my rescue closets work?
; 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.
: 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?
; How do I play my map in Versus Mode or Survival Mode?
: 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.)
: {{l4d}} 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.)
; I followed the tutorial [http://www.fpsbanana.com/tuts/7416 here] to use L4D resources in Hammer, but some textures I use still don't show up in-game (they appear as purple and black checkers). Why is this?
: {{l4d2}} Use console command <code>map <MAP NAME> MODE (survival, coop, versus, or scavenge)</code>. When the client is first started, <code>map <MAP NAME></code> will load in coop mode by default on start up and whatever mode loaded before that.
: Textures in the texture browser in [[Hammer]] aren't necessarily available resources in Left 4 Dead. Many materials in Hammer are found in the "source materials.gcf" and "source 2007 shared materials.gcf" files under "SteamApps", which Left 4 Dead doesn't mount. To test if they are readily available, click the "Open Source" button when in the texture browser. If the material is part of the L4D resources, some program should open with the [[VMT]] file you selected. If nothing happens, the material is likely not included with Left 4 Dead and should not be used inside the map. <!-- previous content removed, lets not encourage distributing copyrighted content to non-owners in a matter likely violates the EULA... -->
 
; Why does the copy of Hammer included with the L4D SDK take several minutes to launch?
 
: L4D utilizes a different file structure from other Source based games. Hammer also searches through all the game's textures, models, VGUI materials and sounds as well as loading different shaders. These checks can equate to thousands of individual process events.
; Why doesn't my custom map load when using in tools mode loaded from the Authoring Tools menu?
; Why doesn't my custom map load when using -tools mode?
: {{l4d}} 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}}
: When loading the -tools mode version of L4D, press F10 to switch to the game, bring down the console and set sv_lan 1.
: {{l4d2}} 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?
; 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.
: 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?
; Why doesn't the game recognise/play custom sounds I place in the sound directory even though they are in the correct format?
: Custom sounds in L4D require that you pakrat the sounds into the bsp file before they will play. If you are using a custom soundscape, pakrating will not work, instead you must rebuild the audio cache before the engine will read your soundscape. Ingame, type snd_rebuildaudiocache into the console. When it is finished your sounds will work ingame. Unfortunately every downloader of your campaign will need to manually enter this command for your soundscapes to work.
: {{l4d}} The sound cache (sound.cache) needs to be generated with <code>snd_buildsoundcachefordirectory</code>. For {{l4ds}}, sound.cache can be each individual '''sound''' directory.
{{Tip|Once you rebuild the sound cache, you may include your _master.cache and custom sounds within your VPK (pakratting the cache into the bsp may be more reliable), which will allow your campaigns custom sounds to work without them being bspzip'd or having clients run snd_rebuildaudiocache.}}
: {{l4d2}} The sound cache needs to be generated with <code>snd_buildsoundcachefordirectory</code>, 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.
; 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.
: 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.  
: {{l4ds}} 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?
; 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.
: 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?
; How do I get music to play like in official L4D campaigns?
: 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]]
: {{l4d}} 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]]
: {{l4d2}} You can start off by changing the map [[List_of_L4D2_Campaign_Music|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?
; 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.
: 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?
; 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.
: 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?
; 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.
: 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.
: {{l4ds}} 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.
: {{l4d2}} 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.
: {{l4d2}} 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.
: {{l4d2}} One way to keep a survivor from talking when alone is with console command <code>ai_talk_idle_enabled 0</code>
; 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#Elevators|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?
: {{l4d2}} 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 [[Developer|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 ==
== Error messages and what they mean ==


Line 41: Line 138:
; <nowiki>***VPK: FindFile Attempting to use full path with VPK file!</nowiki>
; <nowiki>***VPK: FindFile Attempting to use full path with VPK file!</nowiki>
: N/A, but this error can be safely ignored
: N/A, but this error can be safely ignored
; <nowiki>WARN: CL4DBasePanel::UpdateProgressBar called outside of level loading, discarded!</nowiki>
; <nowiki>WARN: CL4DBasePanel::UpdateProgressBar called outside of level loading, discarded!</nowiki>
: {{todo}}
: {{todo}}
; <nowiki>Engine Error: 81/ - weapon_ammo_spawn: UTIL_SetModel: not precached: models/props_unique/spawn_apartment/coffeeammo.mdl</nowiki>
; <nowiki>Engine Error: 81/ - weapon_ammo_spawn: UTIL_SetModel: not precached: models/props_unique/spawn_apartment/coffeeammo.mdl</nowiki>
: {{todo}}
: 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
; Steam Validation Rejected
: Make sure that you have "+sv_lan 1" set in your game's launch options.
: Make sure that you have "+sv_lan 1" set in your game's launch options.
; <nowiki>Engine Error: CModelLoader::FindModel: NULL name</nowiki>
; <nowiki>Engine Error: CModelLoader::FindModel: NULL name</nowiki>
: This can be caused due to compiling the map using an outdated FGD. Older FGDs do not have the new values for the <code>env_fog</code> and <code>light_environment</code> 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.
: This can be caused due to compiling the map using an outdated FGD. Older FGDs do not have the new values for the <code>env_fog</code> and <code>light_environment</code> 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.
; <nowiki>Assert, File: U:\dev\terror\src\tier0\memstd.cpp, Line: 1623, Assert: ***: OUT OF MEMORY! attempted allocation size: 536873088 ****</nowiki>
; <nowiki>Assert, File: U:\dev\terror\src\tier0\memstd.cpp, Line: 1623, Assert: ***: OUT OF MEMORY! attempted allocation size: 536873088 ****</nowiki>
: 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|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 "'''[[Common_L4D_Mapping_Problems#FAQ|Why does a newly compiled map crash after being loaded in L4D?]]'''" above.}}
: 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|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 "'''[[Common_L4D_Mapping_Problems#FAQ|Why does a newly compiled map crash after being loaded in L4D?]]'''" above.}}
=== Navigation mesh related errors ===
=== 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.
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.
; 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 <code>nav_analyze</code> in the console after changes are made to the ".bsp".
: 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 <code>nav_analyze</code> in the console after changes are made to the ".bsp".
; Missing [[Navigation Meshes|nav file]].
; Missing [[Navigation Meshes|nav file]].
: {{todo}}
: {{todo}}
; Missing Battlefield check found N areas
; Missing Battlefield check found N areas
: {{todo}}
: {{todo}}
; GetGoalArea: Cannot find SPAWN_RESCUE_CLOSET area in FINALE, thus cannot guarantee reachability of goal area.
; 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 <code>mark RESCUE_CLOSET</code> 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 <code>mark CHECKPOINT</code> and <code>mark PLAYER_START</code> respectively.  
: 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 <code>mark RESCUE_CLOSET</code> 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 <code>mark CHECKPOINT</code> and <code>mark PLAYER_START</code> respectively.  
; <nowiki>GetGoalArea: Cannot find end area - no checkpoint or finale located.</nowiki>
; <nowiki>GetGoalArea: Cannot find end area - no checkpoint or finale located.</nowiki>
: This error is due to lack of one of the following:
: This error is due to lack of one of the following:
Line 69: Line 185:
:# Not identifying a navigation mesh with <code>mark CHECKPOINT</code>.
:# Not identifying a navigation mesh with <code>mark CHECKPOINT</code>.
:# Not identifying a navigation mesh with <code>mark FINALE</code>.
:# Not identifying a navigation mesh with <code>mark FINALE</code>.
:# Not properly using a [[trigger_changelevel]] with its correct [[info_landmark]] or not using it at all.
:# Not properly using a [[info_changelevel]] with its correct [[info_landmark]] or not using it at all.
 
 
; <nowiki>ComputeFlowDistances: ERROR - Cannot compute flow.</nowiki>
; <nowiki>ComputeFlowDistances: ERROR - Cannot compute flow.</nowiki>
: 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 <code>nav_connect</code> or <code>nav_splice</code>), 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|<code>Nav_generate</code> can leave certain essential meshes from being connected, sometimes manual connection is required.}}{{note|It is possible to remove the "NAV ERRORS - Map is unplayable!" error message.  One method found is to make sure your map has an <code>info_player_start</code>, <code>info_director</code>, 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 "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 <code>nav_connect</code> or <code>nav_splice</code>), 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|<code>Nav_generate</code> can leave certain essential meshes from being connected, sometimes manual connection is required.}}{{note|It is possible to remove the "NAV ERRORS - Map is unplayable!" error message.  One method found is to make sure your map has an <code>info_player_start</code>, <code>info_director</code>, 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?
; The game crashes when using nav_delete?
: Use director_stop and then nb_remove_all to make sure all survivor bots and infected are removed before editing your nav mesh.
: 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 ==
== See also ==
* [[Left 4 Dead Level Creation]]
* [[Left 4 Dead Level Creation]]
* [[Left 4 Dead 2 Level Creation]]
* [[Left 4 Dead Navigation Meshes]]
* [[Left 4 Dead Navigation Meshes]]
* [[L4D Mapping Notes]]
* [[L4D Mapping Notes]]
Line 82: Line 203:


[[Category:Left 4 Dead]]
[[Category:Left 4 Dead]]
[[Category:Left 4 Dead 2]]

Latest revision as of 13:53, 17 June 2025

English (en)中文 (zh)Translate (Translate)
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 seriesLeft 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 seriesLeft 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 seriesLeft 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 seriesLeft 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 info_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