Zh-tw/Source SDK Files and Directory Structure: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 53: Line 53:
# 在'''Hammer'''裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到<code>cstrike\maps</code>'''遊戲內容'''資料夾裡。
# 在'''Hammer'''裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到<code>cstrike\maps</code>'''遊戲內容'''資料夾裡。


==Creating a texture for Half-Life 2: Deathmatch:==
==建立一個新材質給Half-Life 2: Deathmatch:==


# Create a texture in an image editing application, and save it as a .TGA in the <code>hl2mp\materialsrc</code> directory, which is under '''Content Sources'''.
# 在影像編輯程式建立一個圖,將其儲存成.TGA,並放到'''遊戲來源'''下<code>hl2mp\materialsrc</code>資料夾裡。
# Compile the texture with <code>Vtex.exe</code>, which is in the '''SDK Tools Directory'''.
# 在Compile the texture with <code>Vtex.exe</code>, which is in the '''SDK Tools Directory'''.
# The texture is compiled as a .VTF and automatically placed in the <code>hl2mp\materials</code> '''Game Content''' directory.
# The texture is compiled as a .VTF and automatically placed in the <code>hl2mp\materials</code> '''Game Content''' directory.
# Create the .VMT material file with a text editor, and save it in the <code>hl2mp\materials</code> '''Game Content''' directory.
# Create the .VMT material file with a text editor, and save it in the <code>hl2mp\materials</code> '''Game Content''' directory.

Revision as of 01:31, 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

下面的圖顯示這些檔案、資料夾預設的位置:

Developer-contentfolders.jpg

Steam Install Directory(Steam資料夾) 這是您安裝Steam的資料夾
Game Content(遊戲內容) 遊戲內容的位置在這裡,所有執行遊戲所必要的檔案(在其遊戲的資料夾中)。
SDK Tools(SDK工具) 這位置是SDK用來建立或編譯遊戲來源成遊戲內容的程式工具區。
Content Sources(遊戲來源) 各種遊戲來源的位置,用來建立遊戲內容的存放區。示例也放在這裡。

使用SDK資料夾結構的例子

這邊有實際的例子,說明這結構是如何使用:

編譯一個CS:S地圖:

  1. 在SDK Tools(SDK工具)資料夾中執行Hammer關卡編輯器(工具)。
  2. 將地圖儲存成.VMF到遊戲來源cstrike\mapsrc資料夾裡。
  3. Hammer裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到cstrike\maps遊戲內容資料夾裡。

建立一個新材質給Half-Life 2: Deathmatch:

  1. 在影像編輯程式建立一個圖,將其儲存成.TGA,並放到遊戲來源hl2mp\materialsrc資料夾裡。
  2. 在Compile the texture with Vtex.exe, which is in the SDK Tools Directory.
  3. The texture is compiled as a .VTF and automatically placed in the hl2mp\materials Game Content directory.
  4. 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:

  1. Create a model in Softimage|XSI EXP, and export it as an .SMD in the hl2\modelsrc directory, which is under Content Sources.
  2. Create the .QC model definition file with a text editor, and save it in the hl2\modelsrc directory, which is under Content Sources.
  3. Compile the model with Studiomdl.exe, which is in the SDK Tools Directory.
  4. 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.

Template:Otherlang:zh-tw Template:Otherlang:zh-tw:en