Source SDK Files and Directory Structure
Jump to navigation
Jump to search
With the release of Source 2013, the default directory structure was changed to remove the restriction of having to save your game content into the \sourcesdk
directory tree. This document explains how the Source SDK directory structure is set up.
The Directory Structure Explained
The SDK directory structure is now set up so that game content directories are separated from game sources directories.
- Game content files are the actual files necessary to run the game textures, maps, models, etc.
- Game sources are the files that are used to create that game content (the "source" of the game content).
This table explains some of the different game content and game source file types in the SDK:
Note:Since SteamPipe update in 2013, the
username
(tied to Steam account name) folder has been renamed to common
folder.File type | Description | Location |
---|---|---|
.vmf |
Map source files. | sourcesdk_content\<game name>\mapsrc
|
.tga .txt
|
Texture source files. | sourcesdk_content\<game name>\materialsrc
|
.scn .smd .qc |
sourcesdk_content\<game name>\modelsrc
| |
.bsp | Map content files—compiled game maps. | <game name>\maps
|
.mdl .vtx |
Model content files—compiled game models. | <game name>\models
|
.vmt .vtf |
Texture content files—compiled model skins. | <game name>\materials\models
|
.vmt .vtf |
Texture content files—compiled brush textures. | <game name>\materials
|
The following image shows the default locations for these files and folders:
Steam Install Directory | The location where you've installed Steam. |
Game Content | The game content is here, with all the files necessary to run each game under each game directory. Games run on Source 2013 and (in all games since ) (Authoring Tools) will have it's SDK installed in the same location as the game itself. |
SDK Tools | The location of the applications necessary to create and compile SDK content. These applications only works with Source 2009 and earlier. |
Content Sources | Directories for each of the types of game content sources are here, with a set of directories for each game you want to create content for. SDK sample content is also stored here. |
Examples of Using This SDK Directory Structure
Here are some practical examples of how this structure is used:
Compiling a Counter-Strike: Source map
- Launch the Hammer map editor from the SDK Tools Directory.
- Save the map as a VMF into the
cstrike\mapsrc
directory, which is under Content Sources. - Compile the map inside Hammer. The map is compiled as a BSP and automatically placed in the
cstrike\maps
Game Content directory.
Creating a texture for Half-Life 2: Deathmatch
- Create a texture in an image editor, 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 file 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 an SCN model in 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.