ContentBuilder is a flexible command-line utility designed to automate the asset compilation pipeline for Source Engine projects.
This makes ContentBuilder especially useful for:
- Teams or individuals who want to include automated map builds in larger workflows (e.g., continuous integration, automated testing, or packaging pipelines).
- Anyone seeking a Source 2–style workflow within Source 1.
By streamlining repetitive compile tasks, ContentBuilder helps keep your workflow fast, consistent, and efficient.
ContentBuilder allows developers to:
- Compile and package multiple asset types.
- Control exactly what gets built and how.
- Generate reports instead of compiling.
- Separate warnings and errors into dedicated logs.
- Manage performance with multi-threading and 32/64-bit tools.
- Prepare builds ready for Steam or Workshop release.
ContentBuilder uses external tools, such as SceneImageBuilder, ResourceCopy, MapBuilder, you need to donwload them in order for ContentBuilder to work. Additionally, ContentBuilder is designed to integrate with the Source 1 ecosystem, which means it also utilizes tools such as vtex.exe, studiomdl.exe, captioncompiler.exe, and vpk.exe.
ContentBuilder in action:
2025-09-24.19-10-21.mp4
Drag the executable in the bin\x64or bin if on 32 bits games.
To build ContentBuilder, follow these steps:
- Start with a clean copy of the Source SDK 2013 source code (works with both SP & MP).
- Drag and drop the contents of this repository into your SDK source directory.
- Overwrite any existing files when prompted.
- Regenerate the Visual Studio solution files (e.g., by running
createallprojects.bat). - Open the solution in Visual Studio and compile it. The
contentbuilder.exeexecutable will then be ready to use.
- Materials (textures)
- Models
- Scenes
- Captions (subtitles)
- Maps
- VPK packages
- Addons (if compiled with
MP_ADDON_SUPPORT) (NOT WORKING AT THE MOMENT)
- Force Build (
-fb): Rebuilds all assets, even if they are up to date. - Partial Build (default): Only builds assets that are out of date. (NOT WORKING AT THE MOMENT)
- Info Build (
-info): Generates a detailed report of which assets would be built without compiling them. - Steam Build (
-steambuild): Prepares assets for a Steam release.- Automatically enables VPK generation.
- Cleans the game directory from residual files (.log, .ptr, .lin).
- Addon Build (
-addonbuild): Packages addons into a .bsp for Workshop release. (NOT WORKING AT THE MOMENT) -skipmaterial: Skip texture compilation.-skipmodel: Skip model compilation.-skipscene: Skip scene compilation.-skipcaption: Skip caption compilation.-skipmap: Skip map compilation.-vpk: Generate VPK packages.
-threads Nor-proc N: Set maximum simultaneous compile threads. Avaivle for MaterialBuilder, ModelBuilder, CaptionBuilder-toolsforce32bits: Force usage of 32-bit tools.-toolsforce64bits: Force usage of 64-bit tools.
- A main log is generated at:
_build\contentbuilder.log - The logger separates output into multiple files:
- General log
- Warnings log
- Errors log
- Logs help distinguish important issues from normal messages.
Since Source 1 lacks a built-in system to sync source content with game assets, ContentBuilder enforces its own structure. Everything is relative to the -game <gamedir>.
| Builder | Source Extensions | Final Extensions | Description | Source Folder | Destination Folder |
|---|---|---|---|---|---|
| MaterialBuilder | .tga, .png, .psd, .vmt |
.vtf, .vmt |
Textures and materials | \materialsrc |
\materials |
| ModelBuilder | .qc, .smd, .dmx |
.mdl, .vtx, .phy, .vvd, .ani |
3D models | \modelsrc |
\models |
| CaptionBuilder | .txt |
.dat |
Close captions | \resource\closecaptionsrc |
\resource |
| SceneBuilder | .vcd |
.image |
Valve Choreography Data (scenes) | \scene |
\scene |
| MapBuilder | .vmf |
.bsp |
Source maps | \mapsrc |
\maps |
| VpkBuilder | All compiled game content | .vpk |
Valve Pack files (VPK archives) | <gamedir> |
<gamedir> |
Each builder corresponds to a compile tool. By default, these tools are assumed to exist in the bin or bin\x64 directory (the same location as contentbuilder.exe).
You can modify the command line of the builders. To add a command, specify it inside the BuildParam KeyValue.
CaptionBuilder
{
BuildParams "-v -l"
}Only include the command-specific arguments in BuildParam, as ContentBuilder will automatically append:
-game <gamedir> <filename>
The full format is:
<Tool Path> <BuildParams> -game <gamedir> <filename>
For SceneBuilder and VpkBuilder, the format is:
<Tool Path> <BuildParams> -game <gamedir>
Example:
"C:\SteamLibrary\steamapps\common\Source SDK Base 2013 Multiplayer\bin\x64\captioncompiler.exe" -v -l -game "D:\generic_test" "D:\generic_test\resource\closecaptionsrc\closecaption_brazilian.txt"Unless a compile type is skipped, the build order is as follows:
- MaterialBuilder → runs
vtex.exeto compile all textures. - ModelBuilder → runs
studiomdl.exeto compile all models. - CaptionBuilder → runs
captioncompiler.exeto compile all closecaption files. - SceneBuilder → runs
sceneimagebuilder.exeto compile all Valve Choreography Data files. - MapBuilder → runs
mapbuilder.exeto compile all source map files. - VpkBuilder → runs
vpk.exeto create Valve Pack files.
ContentBuilder loads its configuration from scripts/tools/contentbuilder_settings.txt
This file defines all the settings required for compilation.
Take the example bellow as the base of your settings file.
ContentBuilder
{
// For any builder (except VpkBuilder) exclude these files, folders, or extensions
Exclude
{
// Folders
ExcludeFileOrFolder "mapsrc\dev"
ExcludeFileOrFolder "mapsrc\prefab"
ExcludeFileOrFolder "mapsrc\instances"
// Files
ExcludeFileOrFolder "materialsrc\dev\test.psd"
ExcludeFileOrFolder "modelsrc\template.qc"
}
// Do not remove these commands for vtex.exe — ContentBuilder behavior depends on them
MaterialBuilder
{
BuildParams "-nopause -deducepath -nop4"
}
ModelBuilder
{
BuildParams "-nop4"
}
SceneBuilder
{
BuildParams ""
}
CaptionBuilder
{
BuildParams ""
}
MapBuilder
{
BuildParams "-preset Final"
}
VpkBuilder
{
BuildParams "-M"
// Exclusions specific to VPK builds
Exclude
{
// Extensions
ExcludeFileOrFolder ".vcd"
ExcludeFileOrFolder ".ptr"
ExcludeFileOrFolder ".lin"
ExcludeFileOrFolder ".vpk"
// Files
ExcludeFileOrFolder "gameinfo.txt"
ExcludeFileOrFolder "contentbuilder_settings.txt"
// Folders
ExcludeFileOrFolder "_build"
ExcludeFileOrFolder "mapsrc"
ExcludeFileOrFolder "materialsrc"
ExcludeFileOrFolder "modelsrc"
ExcludeFileOrFolder "resource/closecaptionsrc"
}
}
}- Your
gameinfo.txtmust be valid for the compiler to run, if not, the compile will fail. Which can lead to UNDEFINED behaviour.
- Steam: Profile Link
- Twitter/X: @47Z14
- Discord:
carlossuarez7285