Skip to content

Compiling and Running Maps

BHSPitMonkey edited this page Feb 27, 2013 · 7 revisions

These are the configurations built into Hammer for compiling and running maps. See also: Issue #6


NOTE! Due to a bug in the SDK tools, you must invoke these utilities from the %sourcesdk%\bin\orangebox\ directory. If you don't, it will not be able to find the resources it needs.


Notes/examples for the $placeholders below:

  • $gamedir: ...\Steam\SteamApps...\Team Fortress 2\tf
  • $game_exe: ...\Steam\SteamApps...\hl2.exe
  • $bspdir: ...\Steam\SteamApps...\Team Fortress 2\tf\maps
  • $path: path to directory containing the VMF
  • $file: filename of the VMF
  • $bsp_exe: ...\Steam\SteamApps...\vbsp.exe
  • $vis_exe: ...\Steam\SteamApps...\vvis.exe
  • $light_exe: ...\Steam\SteamApps...\vrad.exe

Default

$bsp_exe -game $gamedir $path\$file
$vis_exe -game $gamedir $path\$file
$light_exe -game $gamedir $path\$file
Copy File $path\$file.bsp $bspdir\$file.bsp
$game_exe -dev -console -allowdebug -game $gamedir +map $file

Fast

$bsp_exe -game $gamedir $path\$file
$vis_exe -fast -game $gamedir $path\$file
$light_exe -bounce 2 -noextra -game $gamedir $path\$file
Copy File $path\$file.bsp $bspdir\$file.bsp
$game_exe -allowdebug -game $gamedir +map $file

HDR Full Compile

$bsp_exe -game $gamedir $path\$file
$vis_exe -game $gamedir $path\$file
$light_exe -both -game $gamedir $path\$file
Copy File $path\$file.bsp $bspdir\$file.bsp
$game_exe -dev -console -allowdebug -game $gamedir +map $file

HDR Full Compile -final (slow!)

$bsp_exe -game $gamedir $path\$file
$vis_exe -game $gamedir $path\$file
$light_exe -both -final -game $gamedir $path\$file
Copy File $path\$file.bsp $bspdir\$file.bsp
$game_exe -dev -console -allowdebug -game $gamedir +map $file

Only Entities

$bsp_exe -onlyents -game $gamedir $path\$file
Copy File $path\$file.bsp $bspdir\$file.bsp
$game_exe -allowdebug -game $gamedir +map $file

Run Map in Engine Fullscreen

$game_exe -fullscreen -dev -console -allowdebug -game $gamedir +map $file

Run Map in Engine Windowed

$game_exe -sw -dev -console -allowdebug -game $gamedir +map $file

Example (Default configuration)

"c:\steam\steamapps\bhspitmonkey\sourcesdk\bin\orangebox\bin\vbsp.exe" -game "s:\steam\steamapps\bhspitmonkey\team fortress 2\tf" "d:\outdoor"
"c:\steam\steamapps\bhspitmonkey\sourcesdk\bin\orangebox\bin\vvis.exe" -game "s:\steam\steamapps\bhspitmonkey\team fortress 2\tf" "d:\outdoor"
"c:\steam\steamapps\bhspitmonkey\sourcesdk\bin\orangebox\bin\vrad.exe" -game "s:\steam\steamapps\bhspitmonkey\team fortress 2\tf" "d:\outdoor"
cp "d:\outdoor.bsp" "c:\steam\steamapps\bhspitmonkey\team fortress 2\tf\maps\outdoor.bsp"
"c:\steam\steamapps\bhspitmonkey\team fortress 2\hl2.exe" -dev -console -allowdebug -game "c:\steam\steamapps\bhspitmonkey\team fortress 2\tf" +map "outdoor"
Clone this wiki locally