Pl/Source SDK Files and Directory Structure

From Valve Developer Community
< Pl
Revision as of 05:06, 11 September 2008 by Rob3rto (talk | contribs)
Jump to navigation Jump to search

Wraz z nową wersją SDK, struktura domyślna katalogu zostanie zmieniona by usunąć ograniczenie zapisywania zawartości twojej gry w drzewie katalogu \sourcesdk. Ten dokument wyjaśnia w jaki sposób jest zbudowana struktura katalogu Source SDK.

Wyjaśnienie struktury katalogu

Struktura katalogu SDK jest już zmieniona więc zawartość gry jest oddzielona od katalogów źródłowych gry.

  • Zawartość gry to pliki potrzebne do uruchomienia gry — tekstury, mapy, modele, itp.
  • Źródło gry to pliki używane do stworzenia zawartości gry ("źródło" zawartości gry).

Ta tabelka wyjaśnia niektóre różnice występujące pomiędzy typami plików zawartości gry a jej źródłem w SDK:

Typ pliku Opis Lokalizacja
.VMF Pliki źródłowe map. sourcesdk_content\<game name>\mapsrc
.TGA .TXT Pliki źródłowe tekstur. sourcesdk_content\<game name>\materialsrc
.SCN .SMD .QC Pliki źródłowe modeli. sourcesdk_content\<game name>\modelsrc
.BSP Pliki map — skompilowane mapy. <game name>\maps
.MDL .VTX Pliki modeli — skompilowane modele. <game name>\models
.VMT .VTF Pliki tekstur modeli — skompilowane tekstury modeli skins. <game name>\materials\models
.VMT .VTF Pliki tekstur — skompilowane tekstury. <game name>\materials

Następujący obrazek pokazuje domyślną lokalizację tych plików i folderów:

Developer-contentfolders.jpg

Steam Install Directory Lokalizacja w której zainstalowałeś Steam.
Game Content Tutaj znajduje się zawartość gry, z wszystkimi plikami potrzebnymi do uruchomienia każdej gry pod każdym katologiem gry.
SDK Tools Lokalizacja aplikacji potrzebnych do tworzenia i kompilacji zawartości SDK..
Content Sources Katalogi dla każdego rodzaju źródła gry znajdują się tutaj, z zestawem katalogów dla każdej gry w którym stworzysz jej zawartość. Przykłady SDK są zapisane właśnie tutaj.

Przykłady używania struktury katalogów SDK

Kompilowanie mapy CS:S

  1. Uruchom edytor map Hammer z Katalogu narzędzi SDK.
  2. Zapisz utworzoną mapę jako plik VMF w katalogu cstrike\mapsrc, który jest pod Źródłami gry.
  3. Skompiluj mapę w Hammerze. Mapa zostanie skompilowana do pliku BSP i automatycznie umieszczona w cstrike\maps katalogu Zawartości gry.

Creating a texture for HL2:DM

  1. Create a texture in an image editor, and save it as a TGA in the hl2mp\materialsrc directory, which is under Content Sources.
  2. Compile the texture with Vtex.exe, which is in the SDK Tools Directory.
  3. The texture is compiled as a VTF file 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 HL2

  1. Create an SCN 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:en Template:Otherlang:en:es, Template:Otherlang:en:fr, Template:Otherlang:en:jp, Template:Otherlang:en:pl, Template:Otherlang:en:zh-tw.