Zh-tw/Source SDK Files and Directory Structure: Difference between revisions
< Zh-tw
Jump to navigation
Jump to search
No edit summary |
|||
Line 51: | Line 51: | ||
# 在SDK Tools(SDK工具)資料夾中執行'''Hammer'''關卡編輯器(工具)。 | # 在SDK Tools(SDK工具)資料夾中執行'''Hammer'''關卡編輯器(工具)。 | ||
# 將地圖儲存成.VMF到'''遊戲來源'''下<code>cstrike\mapsrc</code>資料夾裡。 | # 將地圖儲存成.VMF到'''遊戲來源'''下<code>cstrike\mapsrc</code>資料夾裡。 | ||
# 在'''Hammer''' | # 在'''Hammer'''裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到<code>cstrike\maps</code>'''遊戲內容'''資料夾裡。 | ||
==Creating a texture for Half-Life 2: Deathmatch:== | ==Creating a texture for Half-Life 2: Deathmatch:== |
Revision as of 01:27, 1 January 2007
Source SDK中檔案與資料夾結構
隨著最新的SDK發行,原本預定的資料夾結構位置已經移除了將內容儲存在\sourcesdk資料夾下的限制。這份文件將說明Source SDK的資料夾結構。
說明資料夾結構
SDK資料夾結構已經設定成遊戲內容資料夾從遊戲來源資料夾分開。
- 遊戲內容的檔案是實際上會被用來執行遊戲用的 - 材質、地圖、模型等等。
- 遊戲來源的檔案是用來創造遊戲內容用的(遊戲內容的「資源」、「來源」)。
這份表格將說明SDK中各種不同的遊戲內容檔案型態和遊戲來源檔案型態:
檔案型態 | 描述 | 位置 |
---|---|---|
.VMF |
地圖來源檔案。 | sourcesdk_content\<遊戲名稱>\mapsrc
|
.TGA .TXT |
材質來源檔案。 | sourcesdk_content\<遊戲名稱>\materialsrc
|
.SCN .SMD .QC |
模型來源檔案。 | sourcesdk_content\<遊戲名稱>\modelsrc
|
.BSP |
地圖檔案(內容)-已編譯過的地圖來源檔案。 | <遊戲名稱>\maps
|
.VMT .VTF |
材質檔案(內容)-已編譯過的材質來源檔案。 | <遊戲名稱>\materials
|
.MDL .VTX |
模型檔案(內容)-已編譯過的模型、道具來源檔案。 | <遊戲名稱>\models
|
下面的圖顯示這些檔案、資料夾預設的位置:
Steam Install Directory(Steam資料夾) | 這是您安裝Steam的資料夾 |
Game Content(遊戲內容) | 遊戲內容的位置在這裡,所有執行遊戲所必要的檔案(在其遊戲的資料夾中)。 |
SDK Tools(SDK工具) | 這位置是SDK用來建立或編譯遊戲來源成遊戲內容的程式工具區。 |
Content Sources(遊戲來源) | 各種遊戲來源的位置,用來建立遊戲內容的存放區。示例也放在這裡。 |
使用SDK資料夾結構的例子
這邊有實際的例子,說明這結構是如何使用:
編譯一個CS:S地圖:
- 在SDK Tools(SDK工具)資料夾中執行Hammer關卡編輯器(工具)。
- 將地圖儲存成.VMF到遊戲來源下
cstrike\mapsrc
資料夾裡。 - 在Hammer裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到
cstrike\maps
遊戲內容資料夾裡。
Creating a texture for Half-Life 2: Deathmatch:
- Create a texture in an image editing application, and save it as a .TGA in the
hl2mp\materialsrc
directory, which is under Content Sources. - Compile the texture with
Vtex.exe
, which is in the SDK Tools Directory. - The texture is compiled as a .VTF and automatically placed in the
hl2mp\materials
Game Content directory. - Create the .VMT material file with a text editor, and save it in the
hl2mp\materials
Game Content directory.
Creating a model for Half-Life 2:
- Create a model in Softimage|XSI EXP, and export it as an .SMD in the
hl2\modelsrc
directory, which is under Content Sources. - Create the .QC model definition file with a text editor, and save it in the
hl2\modelsrc
directory, which is under Content Sources. - Compile the model with
Studiomdl.exe
, which is in the SDK Tools Directory. - The model is compiled as a .MDL and automatically placed in the
hl2\models
Game Content directory.
For in-depth descriptions of these procedures, see the appropriate section of the Source SDK Documentation.