游民星空 > 攻略秘籍 > 攻略 > 正文

《生存之旅:Left4Dead》单人模式解成就个人研究

2008-11-28 17:01:14 来源:本站原创 作者:佚名 编辑:dsgames568 我要投稿

英文不好的人
請準備Yahoo字典 

You'll need Gibbed's vpk extractor which you can download on this site and Notepad++, a notepad clone with a lot of extra features, look for it on Google. (You can use regular notepad too but Notepad++ makes it easier)

Step1, editing whitelist.cfg:
- Use the Vpk extractor on pak01_dir.vpk and extract everything in the left4dead folder.
- In the left4dead folder, open the file whitelist.cfg with notepad. This file tells the game in which folders it can look for custom things. You'll see a line like "add" "materials/console/...". Add this to the whitelist.cfg file:
"add" "materials/models/..."

Now the game can look for custom materials in that folder too, but that alone doesn't do it, the game will still use the materials in the vpk files if they are available there. For example, lets say we want to edit the pistol's texture.

Step2, editing pak01_dir.vpk:
- Right click on pak01_dir.vpk and open it with Notepad++. Look at the first few lines, look familiar? It should, it's identical to the content of the .vmt files. This is what tells the game to use the materials from the vpk files.
- We want the pistol, so do a search for v_pistol until you find the following block of text:
materials/models/v_models/pistol/v_pistol_reference
{
$basetexture "models\v_models\pistol\v_pistol_reference
$bumpmap ....
...... etc
}
- You can do 2 things, you could remove that entire block of text and save the file, it does no harm but if you remove something too much it could lead to errors so I don't recommend it. A safer way, do some renaming. Change the basetexture line in the above block of text to:
$basetexture "models\v_models\pistol\v_pistol_reference2
- Rename the vtf file in your materials folder to v_pistol_reference2.vtf

Now the game will look for v_pistol_reference2.vtf in the vpk file but obviously won't find it. Since you allowed the game to look in materials/models folder for custom content, it will find the file and use it from there.

http://i35.tinypic.com/2ivd98x.jpg

In the lower part of the pak01_dir.vpk file you'll also find model info, you might think this but you can't add custom models by removing or editing anything there. Do NOT change any of the model info in this file unless you know what you're doing.
You can change view and world models by editing the weapon_ script files in the left4dead/scripts folder. Look for the "viewmodel" line. But don't get your hopes up because you won't get custom models to work without serious errors.
Modderfreak, you say you've decompiled and recompiled L4D weapons before, then you must have noticed the "animation is out of bounding box" warning on the weapon bone. The result is that the model appears outside the screen when you recompile it. If you fix this warning by editing the smd files in notepad then you completely mess up the animations since all animations are affected and you have no way of knowing the correct position of this bone.
I'm still trying to find a way around it but right now it looks like we're going to need a new mdldecompiler

大意如下
1.你需要Gibbed's vpk extractor來解壓縮L4D的VPK檔

2.你需要Notepad來修改pak01_dir.vpk這個索引檔

3.編輯白名單
再到left4dead資料夾下開啟whitelist.cfg這個檔

"add" "materials/models/..."
這一行,也就是指定的自訂模型路徑加入白名單

4.
用vpk extracter 來載入...\Left4Dead\left4dead\pak01_dir.vpk
再按Extract將所有被包裝起來的materials解到...\Left4Dead\left4dead\

到解開的...\Left4Dead\left4dead\materials\models\
裡找到你要改的Skin名稱,再用Notepad++編輯...\Left4Dead\left4dead\pak01_dir.vpk這個索引檔
以Pistol為例,要改的Skin名稱是v_pistol_reference.vtf,找到pak01_dir.vpk 裡面這段碼

<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="black"><tr align="left" valign="middle" bgcolor="#FFFFFF"><td bgcolor="#FFFFFF">materials/models/v_models/pistol/v_pistol_reference
{
$basetexture "models\v_models\pistol\v_pistol_reference
$bumpmap ....
...... etc
}</td></tr></table>

之後將寫死的
$basetexture "models\v_models\pistol\v_pistol_reference
改成你要的檔名
例如把v_pistol_reference
改成v_pistol_DDeagle
存檔後只要將正確(你自已剛才改的)檔名放到正確的路徑下就可以使用了
照剛才的例子
 v_pistol_DDeagle.vtf
正確的檔名及路徑是
...\Left4Dead\left4dead\materials\models\v_models\pistol\v_pistol_DDeagle.vtf


ok
那怎麼編輯VTF檔呢
你要有Photoshop 7.0以上任何版本
然後裝vtf檔案格式的外掛(裝法請見隨附的Readme即可)
再將你用VPK Extracter解開來的VTF 檔用Photoshop開啟
(記得,VPK 解壓縮要把materials解到...\Left4Dead\left4dead\下
雖然你也可以解到其他目錄)
Photoshop修完另存新檔,檔名用你第4步改好的檔名,檔案格式選vtf
如果要用相同檔名蓋過,最好將原檔備份,否則就要用VPK Extracter重新解壓縮

揉依啊揉依
換上這件Kitty外套吧

(圖是別人改的)

(zoey的vtf在 ...\Left4Dead\left4dead\materials\models\player\teenagirl…沒記錯的話)

生存之旅 攻略秘籍专区

更多相关内容请关注:生存之旅专区

上一页 1 2
友情提示:支持键盘左右键“← →”翻页
标签:攻略
游民星空APP
随手浏览游戏攻略
code
    没有任何记录
单机游戏下载
休闲娱乐
综合热点资讯
游民星空联运游戏