Common L4D Mapping Problems

From Valve Developer Community
< Zh
Revision as of 13:44, 17 June 2025 by Nescius (talk | contribs)
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
Info content.png
This page has not been fully translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
This notice is put here by LanguageBar template and if you want to remove it after updating the translation you can do so on this page.


本界面未翻译完,且是基于原英文界面翻译的,欢迎各位来添加新内容或补完。

这篇文章为讨论与发布求生之路系列中常见的地图问题提供了非常便利的场所. 你可以随意编辑文章,并在本文章留下你发现的新问题与解决办法!
待完善: 需要添加分类.
Hammer 似乎没有完全配置好并且每次我启动Hammer时我都要再配置一遍. 这是我第一次安装求生之路开发者工具(L4D Authoring Tools).它缺少BSP, VIS, RAD等程序的路径, 以及编译后地图的路径. 作为一名初学者这让人感到恼火,我该咋整?
求生之路2 GameConfig.txt 需要包含以下内容:
"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 文件是位于你的Hammer路径 (*\Left 4 Dead 2\bin) 中的配置文件. 这是由于工具更新或系统更新导致的主要问题. Hammer 实际上应该从一开始就进行全面配置. 真希望在未来的更新中可以恢复此配置文件,以减少新人与制作工具之间的摩擦.


怎么让感染者生成?
求生之路系列求生之路系列 大多数情况下, 这是没有导航网格造成的. 导航网格在求生之路系列中至关重要. 你的地图也必须拥有启用的 导演 , 同样,如果你在会话期间使用过“director_stop”命令,那你应该再输入一次“director_start”. 为了让游荡的小丧尸会在你加载地图后生成, 导演必须计算出一条从起点到终点的路径. 请参阅 导航网格 以及官方求生之路地图制作文档来得到更多信息
待完善: 描述的并不全面. 用最新游戏版本进行测试.


为啥生还者机器人不会移动?
大多数情况下, 你需要生成一系列导航网格. 请参阅 导航网格. 如果导航网格已经生成而问题依旧存在, 请仔细检查你的导航网格和地图. 其中一个原因,是整个导航网格都被 "阻挡" 因为 sky_camera 实体映射的远景整个穿过了它.


为什么燃烧瓶的火焰例子 / Smoker的烟雾粒子在游戏中不可见?
求生之路 这通常是因为缺少 env_fog_controller 实体. 此外,确保你地图编译过程中没有报错.


为什么我的救援小房间(Rescue_closet)没用?
在导航网格存在错误 ( "NAV ERRORS - Map is unplayable!" 的信息显示在屏幕上)时,救援小房间是无法正常运作的.你得确保你的导航网格没有任何问题.
待完善: 在最新的游戏版本进行测试来保证准确性
同时也确保你放置的是“info_survivor_rescue”而不是“info_survivor_position”.你可以通过控制台来获得调试功能. rescue_show 指令会高亮 info_survivor_rescue 的位置. rescue_update_nav 会添加/移除任何有效/无效的救援房间区域.


我该怎么在对抗模式和生还者模式下运行我的地图?
求生之路 要让你在对抗和生还者中运行你的地图, 先将 控制台变量 "mp_gamemode" 更改为 "versus"(对抗) 或 "survival"(生还者) (分别地), 然后用“map”指令加载你的地图. 所以如果你想在生还者模式下 运行"warehouse.bsp"地图, 你得在控制台输入 (当在游戏主界面时) "mp_gamemode survival; map warehouse". 类似地, 如果你想切换回战役模式,输入 "mp_gamemode coop; map warehouse". (笔记 1: "coop"和 "campaign" 在使用 mp_gamemode 命令时是同义词) (笔记 2: 如果你已经在一个本地运行的游戏中, 你可以使用 "mp_gamemode" 指令来改变游戏类型, 然后输入 "changelevel" 指令.)
求生之路2 使用控制台指令 map <地图名称> 游戏模式 (survival, coop, versus, 或者 scavenge). 当客户端是第一次被启动时, map <地图名称> 游戏会默认以战役模式启动,除非之后用其它模式启动.


为什么当我用开发者工具中的Tools Mode启动游戏时不会加载我的自定义地图?
求生之路 当加载求生之路1的Tools Mode时, 按 F10 转换到游戏模式, 然后打开控制台并输入 sv_lan 1.
待完善: 这还需要确认
求生之路2 同上,控制台在窗口左下角可以拉出来. 同样输入 sv_lan 1.


为什么下雨掉在地面/物件上时的粒子效果几乎看不见 / 非常透明?
你必须在编译地图前开启编译HDR来让下雨粒子可见.


为什么游戏无法辨认/播放我放在声音目录中的自定义声音即使它们格式是正确的?
求生之路 sound cache (sound.cache)文件需要先用 snd_buildsoundcachefordirectory 指令生成一次. For 求生之路系列求生之路系列, sound.cache can be each individual sound directory.
求生之路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.


在我为了测试一些小改动而没有编译vrad启动地图后, 地图变得全亮了, 但现在即使我编译了vrad,我的地图仍然是全亮的.
求生之路系列求生之路系列 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.


为什么求生之路忽略了我放置的 info_survivor_position ? 只能使用 info_player_start?
logic_auto实体的 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.
待完善: test with latest build of both games.


我该如何获取并播放像官方求生之路战役那样的音乐?
求生之路 求生之路1以特有的“音乐导演”(Music director)而闻名. 音乐导演会基于当前战役遭遇的“事件”来播放特定的音乐.你可以学习如何为你的地图添加基本的音乐, as well as how to customize your own music by following the guide here: L4D Custom Music Tutorial
求生之路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.


为什么当我的地图以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.


当所有玩家死亡后,新的一局他们会直接生成在结束安全屋, 有啥解决办法吗?
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.
求生之路系列求生之路系列 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.
求生之路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.


我的求生之路1地图在求生之路2启动/保存过一次后就没法在Hammer里打开了.搞什么飞机?
VMF文件有一丁点不一样. VMF文件可以作为文本文档被编辑 (像 Notepad++之类的). 用逗号来替换掉转义符 (0x1B).


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.
求生之路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.
求生之路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?
求生之路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.

常见的错误文本以及它们什么意思

一般错误

***VPK: FindFile Attempting to use full path with VPK file!
N/A, 此错误可以被安全地忽略掉


WARN: CL4DBasePanel::UpdateProgressBar called outside of level loading, discarded!
[待完善]


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
确保你启动游戏时的附加项里有 "+sv_lan 1"。


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.png注意: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.

与导航网格相关的错误

以下的网格错误都会导致 "NAV ERRORS - Map is unplayable!" 在地图加载时出现在屏幕上 .

另见 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.
确保你地图相对应的nav文件与地图bsp文件在同一路径下


Missing Battlefield check found N areas
[待完善]


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.png注意:Nav_generate can leave certain essential meshes from being connected, sometimes manual connection is required.
Note.png注意: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.


为什么当我在控制台输入nav_delete时游戏会崩溃?
先输入 director_stop 然后输入 nb_delete_all 以确保你在编辑导航网格时生还者机器人和感染者都被移除掉.

另见