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

From Valve Developer Community
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'''裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到<code>cstrike\maps</code>'''遊戲內容'''資料夾裡。
# 在'''Hammer'''裡面編譯此地圖。這地圖被編譯成.BSP,並自動的放到'''遊戲內容'''下<code>cstrike\maps</code>資料夾裡。


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


# 在影像編輯程式建立一個圖,將其儲存成.TGA,並放到'''遊戲來源'''下<code>hl2mp\materialsrc</code>資料夾裡。
# 用影像編輯程式建立一個圖,將其儲存成.TGA,並放到'''遊戲來源'''下<code>hl2mp\materialsrc</code>資料夾裡。
# 在Compile the texture with <code>Vtex.exe</code>, which is in the '''SDK Tools Directory'''.
# 在SDK Tools(SDK工具)資料夾中執行<code>Vtex.exe</code>來編譯.TGA。
# The texture is compiled as a .VTF and automatically placed in the <code>hl2mp\materials</code> '''Game Content''' directory.
# 材質會被編譯成.VTF並被自動的放到'''遊戲內容'''<code>hl2mp\materials</code>資料夾裡。
# Create the .VMT material file with a text editor, and save it in the <code>hl2mp\materials</code> '''Game Content''' directory.
# 用文字編輯器建立一個.VMT材質描述檔,並將其存到'''遊戲內容'''<code>hl2mp\materials</code>資料夾裡。


==Creating a model for Half-Life 2:==
==建立一個Half-Life 2的模型:==


# Create a model in Softimage|XSI EXP, and export it as an .SMD in the <code>hl2\modelsrc</code> directory, which is under '''Content Sources'''.
# 使用塑模軟體(如:Maya、3DsMAX、XSI EXP)建立一個模型,將其匯出成.SMD到'''遊戲來源'''下<code>hl2\modelsrc</code>資料夾裡。
# Create the .QC model definition file with a text editor, and save it in the <code>hl2\modelsrc</code> directory, which is under '''Content Sources'''.
# 使用文字編輯器建立一個.QC模型描述檔,並將其存到'''遊戲來源'''<code>hl2\modelsrc</code>資料夾裡。
# Compile the model with <code>Studiomdl.exe</code>, which is in the '''SDK Tools''' Directory.
# 用SDK Tools(SDK工具)資料夾中執行<code>Studiomdl.exe</code>,編譯.SMD與.QC。
# The model is compiled as a .MDL and automatically placed in the <code>hl2\models</code> '''Game Content''' directory.
# 模型將編譯成.MDL並自動的放到'''遊戲內容'''<code>hl2\models</code>資料夾裡。


For in-depth descriptions of these procedures, see the appropriate section of the Source SDK Documentation.
更深入的這些程序,參見Source SDK的文件。=
 
[[category:Source_SDK_FAQ]]


{{otherlang:zh-tw}} {{otherlang:zh-tw:en|Source_SDK_Files_and_Directory_Structure}}
{{otherlang:zh-tw}} {{otherlang:zh-tw:en|Source_SDK_Files_and_Directory_Structure}}

Revision as of 01:47, 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. 在SDK Tools(SDK工具)資料夾中執行Vtex.exe來編譯.TGA。
  3. 材質會被編譯成.VTF並被自動的放到遊戲內容hl2mp\materials資料夾裡。
  4. 用文字編輯器建立一個.VMT材質描述檔,並將其存到遊戲內容hl2mp\materials資料夾裡。

建立一個Half-Life 2的模型:

  1. 使用塑模軟體(如:Maya、3DsMAX、XSI EXP)建立一個模型,將其匯出成.SMD到遊戲來源hl2\modelsrc資料夾裡。
  2. 使用文字編輯器建立一個.QC模型描述檔,並將其存到遊戲來源hl2\modelsrc資料夾裡。
  3. 用SDK Tools(SDK工具)資料夾中執行Studiomdl.exe,編譯.SMD與.QC。
  4. 模型將編譯成.MDL並自動的放到遊戲內容hl2\models資料夾裡。

更深入的這些程序,參見Source SDK的文件。=

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