Hammer Manual Configuration: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (fixed a broken link.)
(Adjusted some of the wording and examples to better account for changes that happened with SteamPipe.)
Line 1: Line 1:
{{lang|Hammer Manual Configuration}}[[Category:Hammer Dialogs]][[Category:Source SDK FAQ]][[Category:Tutorials]]
{{lang|Hammer Manual Configuration}}[[Category:Hammer Dialogs]][[Category:Source SDK FAQ]][[Category:Tutorials]]
==Read This First!==
==Read This First!==
If you launch the Hammer editor with no proper game configurations set up, the Hammer Editor has not automatically configured itself after installing the '''Source SDK'''. You can follow these steps to manually configure it. Before following these steps to repair a bad configuration, it is ''strongly suggested'' that you first attempt to fix your configuration by following the steps outlined in [[Reset the Source SDK Game Configuration]].
If you launch the Hammer editor with no proper game configurations set up, the Hammer Editor has not automatically configured itself after installing the '''Source SDK'''. You can follow these steps to manually configure it. Before following these steps to repair a bad configuration, it is ''strongly suggested'' that you first attempt to fix your configuration by following the steps outlined in [[Reset the Source SDK Game Configuration]].


{{warning|In most cases, Hammer will configure itself and you '''do not''' need to follow this procedure. If you have problems, it is much simpler to [[Reset the Source SDK Game Configuration|reset the game configuration]] instead. Doing this, however will remove your mod configurations}}
{{warning|In most cases, Hammer will configure itself and you '''do not''' need to follow this procedure. If you have problems, it is much simpler to [[Reset the Source SDK Game Configuration|reset the game configuration]] instead. Doing this, however will remove your mod configurations}}
{{ModernNote|The Source SDK Launcher is no longer used with {{src13|4}} games and mods, so the above warning does not apply to them.}}


==Adding a New Game Configuration==
==Adding a New Game Configuration==


# Run '''Hammer''' from the '''Source SDK Launcher'''.
# Launch '''Hammer'''.
# When you see the '''First Time Setup''' dialog box, click the '''No''' button:
# The '''First Time Setup''' dialog box may appear. If it does, click the '''No''' button:
#: [[Image:Setup_NoGameConfig.png]]
#: [[Image:Setup_NoGameConfig.png]]
# This '''Configure Hammer''' dialog should appear next.
# If the '''First Time Setup''' window did appear, this '''Configure Hammer''' dialog should now be open. Otherwise, click '''Options''' in the '''Tools''' menu, and then open the '''Game Configurations''' tab.
#: [[Image:Setup_GameConfig_01.png]]
#: [[Image:Setup_GameConfig_01.png]]
#: If this dialog does not appear, choose '''Options''' from the '''Tools''' menu, and then select the '''Game Configurations''' tab.
# Click on the '''Edit''' button to the right of the '''Configuration''' drop-down list, which will open the '''Edit Game Configurations''' dialog:
# Click on the topmost '''Edit''' button, next to the '''Configuration '''drop-down list. The '''Edit Game Configurations''' dialog appears:
#: [[Image:Setup_EditGameConfig.png]]
#: [[Image:Setup_EditGameConfig.png]]
# Press the '''Add''' button. This will open the '''Add a game '''dialog:
# Press the '''Add''' button. This will open the '''Add a game '''dialog:
#: [[Image:Setup_AddGame.png]]
#: [[Image:Setup_AddGame.png]]
# Type in "Counter-Strike", "cstrike", "Half-Life 2", "HL2DM", "Team Fortress 2", or an equivalent to name your configuration or your mod.  This is the name that will appear in the Source SDK Launcher where it says '''Current Game'''. The exact name is unimportant, what's important is that it makes sense to you. Press '''OK''' to confirm your choice and close the dialog.
# Enter a name for the new configuration, usually the name of the game or mod. Press '''OK''' to confirm your choice and close the dialog.
# Press the '''Close''' button in the '''Edit Game Configurations''' dialog.
# Press the '''Close''' button in the '''Edit Game Configurations''' dialog.


==Setting Game Directory and Basic Parameters==
==Setting Game Directory and Basic Parameters==
# You should now be back in the '''Configure Hammer''' dialog with your entry in the '''Configuration''' drop-down list:
# You should now be back in the '''Configure Hammer''' dialog with your configuration selected in the '''Configuration''' drop-down list:
#: [[Image:Setup_GameConfig_02.png]]
#: [[Image:Setup_GameConfig_02.png]]
# Press '''Add''' to the right of the '''Game Data''' files list. An '''Open''' dialog will appear:
# Press '''Add''' to the right of the '''Game Data''' files list. An '''Open''' dialog will appear:
#: [[Image:Setup_AddGameOpen.png]]
#: [[Image:Setup_AddGameOpen.png]]
# Open the appropriate .FGD file for your configuration:
# Select the appropriate .FGD file for your game or mod:
#* For a '''Counter-Strike: Source''' configuration, click on <code>cstrike.fgd</code> and then the '''Open''' button.
#* For a '''Counter-Strike: Source''' configuration, click on <code>cstrike.fgd</code> and then the '''Open''' button.
#* For a '''Half-Life 2''' configuration, click on <code>halflife2.fgd</code> and then the '''Open''' button.
#* For a '''Half-Life 2''' configuration, click on <code>halflife2.fgd</code> and then the '''Open''' button.
Line 33: Line 35:
#: [[Image:Setup_GameConfig_03.png]]
#: [[Image:Setup_GameConfig_03.png]]
# Type <code>0.25</code> into the '''Default texture scale''' field. Type <code>tools\toolsskybox</code> into the '''Cordon texture''' field.
# Type <code>0.25</code> into the '''Default texture scale''' field. Type <code>tools\toolsskybox</code> into the '''Cordon texture''' field.
# Under '''Game Executable Directory''', hit '''Browse''' and go to where you have the the game installed.
# Under '''Game Executable Directory''', hit '''Browse''' and select the folder where the game executable (such as hl2.exe) is located.
#: For example:
#: For example, the directory for a '''Counter-Strike''' configuration might be:
#:: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\counter-strike source</code>
#:: <code>$SteamUserDir\Counter-Strike Source</code>
#: where ''username'' should be your Steam Login name.
# Under '''Game Directory''', enter the path of the folder that contains <code>gameinfo.txt</code>.
#: Use the Following for a mod:
#: For example, the game directory for a '''Half-Life 2''' configuration might be:
#:: <code>$SteamUserDir\half-life 2</code>
#:: <code>$SteamUserDir\Half-Life 2\hl2</code>
# Under '''Game Directory''', copy what you entered into '''Game Executable Directory''', paste it into '''Game Directory''', and add the game directory to the end. The game directory for Counter-Strike is <code>\cstrike</code>. For Half-Life 2, it is <code>\hl2</code>. For Half-Life 2 Deathmatch, it is <code>\hl2mp</code>.
#: For mods located in the <code>sourcemods</code> folder, the game directory would be of the form:
#* For example, for a '''Counter-Strike''' configuration, your '''Game Directory''' might be:
#:: <code>C:\Program Files (x86)\Steam\steamapps\sourcemods\mod</code>
#: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\counter-strike source\cstrike</code>
# Under '''Hammer Map Directory''', you should enter the folder where you wish to save your .VMF map source files.
#* For a '''Half-Life 2''', your '''Game Directory''' might be:
#: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\half-life 2\hl2</code>
#* For a '''Half-Life 2 Deathmatch''', your '''Game Directory''' might be:
#: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\half-life 2 deathmatch\hl2mp</code>
#: Again, where ''username'' should be your Steam Login name.
#* For a '''Mod''', your '''Game Directory''' will be:
#: <code>$SteamDir\steamapps\SourceMods\''MODDIR''</code>
#: ''MODDIR'' should be the game directory name of your mod.
# Under '''Hammer Map Directory''', you should enter in where you wish to save your .VMF map source files. Using the [[Source SDK Files and Directory Structure]], you should enter the appropriate <code>mapsrc</code> directory:
#* Example for '''Counter-Strike''':
#* Example for '''Counter-Strike''':
#: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\sourcesdk_content\cstrike\mapsrc</code>
#: <code>C:\Program Files (x86)\Steam\steamapps\common\sourcesdk_content\cstrike\mapsrc</code>
#* Example for '''Half-Life 2''':
#* Example for '''Half-Life 2''':
#: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\sourcesdk_content\hl2\mapsrc</code>
#: <code>C:\Program Files (x86)\Steam\steamapps\common\sourcesdk_content\hl2\mapsrc</code>
#* Example for '''Half-Life 2 Deathmatch''':
#* Example for '''Half-Life 2 Deathmatch''':
#: <code>C:\Program Files\Valve\Steam\SteamApps\''username''\</code><code>sourcesdk_content\hl2mp\mapsrc</code>
#: <code>C:\Program Files (x86)\Steam\steamapps\common\sourcesdk_content\hl2mp\mapsrc</code>
#* Example for a '''MOD''':
#: This directory will be the folder you are doing your work from


== Setting up the Build Programs ==
== Setting up the Build Programs ==
# Click on the '''Build Programs''' tab:
# Click on the '''Build Programs''' tab:
#: [[Image:Setup_BuildPrograms.png]]
#: [[Image:Setup_BuildPrograms.png]]
# Copy and paste the '''Game executable Directory''' you entered into the '''Game Configurations''' tab previously, then add <code>\hl2.exe</code> on the end.
# In '''Game Executable''', enter the path of the .exe file used to launch the game.
#* For example, for a '''Counter-Strike''' configuration, your '''Game Executable ''' might be:
#* For example, for a '''Counter-Strike''' configuration, your '''Game Executable ''' might be:
#: <code>$SteamUserDir\counter-strike source\hl2.exe</code>
#: <code>$SteamUserDir\counter-strike source\hl2.exe</code>
Line 71: Line 62:
#: <code>$SteamUserDir\half-life 2 deathmatch\hl2.exe</code>
#: <code>$SteamUserDir\half-life 2 deathmatch\hl2.exe</code>


# For '''BSP executable''', enter the location of the <code>vbsp.exe</code>:
# In '''BSP executable''', enter the location of <code>vbsp.exe</code>:
#: <code>Orange Box: $SteamUserDir\sourcesdk\bin\orangebox\bin\vbsp.exe</code>
#: ''EXEDIR''\bin\vbsp.exe</code>
#: <code>Ep1 Engine: $SteamUserDir\sourcesdk\bin\ep1\bin\vbsp.exe</code>
#:: ''EXEDIR''</code> is the value that was entered into '''Game Executable Directory''' field earlier.
# For '''VIS executable''', enter the location of the <code>vvis.exe</code>:
# In '''VIS executable''', enter the location of the <code>vvis.exe</code>:
#: <code>Orange Box: $SteamUserDir\sourcesdk\bin\orangebox\bin\vvis.exe</code>
#: ''EXEDIR''\bin\vvis.exe</code>
#: <code>Ep1 Engine: $SteamUserDir\sourcesdk\bin\ep1\bin\vvis.exe</code>
#:: ''EXEDIR''</code> is the value that was entered into '''Game Executable Directory''' field earlier.
# For '''RAD executable''', enter the location of the <code>vrad.exe</code>:
# In '''RAD executable''', enter the location of the <code>vrad.exe</code>:
#: <code>Orange Box: $SteamUserDir\sourcesdk\bin\orangebox\bin\vrad.exe</code>
#: ''EXEDIR''\bin\vrad.exe</code>
#: <code>Ep1 Engine: $SteamUserDir\sourcesdk\bin\ep1\bin\vrad.exe</code>
#:: ''EXEDIR''</code> is the value that was entered into '''Game Executable Directory''' field earlier.
# For '''Place compiled maps in this directory before running the game''', add <code>\maps</code> the end of the '''Game Directory''':
# In '''Place compiled maps in this directory before running the game''', enter the '''Game Directory''' with <code>\maps</code> appended to the end of it:
#* Example for '''Counter-Strike''':
#* Example for '''Counter-Strike''':
#: <code>$SteamUserDir\counter-strike source\cstrike\maps</code>
#: <code>$SteamUserDir\counter-strike source\cstrike\maps</code>
Line 88: Line 79:
#: <code>$SteamUserDir\half-life 2 deathmatch\hl2mp\maps</code>
#: <code>$SteamUserDir\half-life 2 deathmatch\hl2mp\maps</code>
#* Example for '''MOD''':
#* Example for '''MOD''':
#: <code>$SteamDir\steamapps\SourceMods\''MODDIR''\maps</code>
#: <code>C:\Program Files (x86)\Steam\steamapps\sourcemods\''MODDIR''\maps</code>
#:: ''MODDIR'' is the name of your game directory for your mod.
#:: ''MODDIR'' is the name of your game directory for your mod.


# Press '''OK'''. Hammer is now configured for use.
# Press '''OK'''. Hammer is now configured for use.

Revision as of 03:31, 15 August 2023

English (en)Español (es)한국어 (ko)Русский (ru)中文 (zh)Translate (Translate)

Read This First!

If you launch the Hammer editor with no proper game configurations set up, the Hammer Editor has not automatically configured itself after installing the Source SDK. You can follow these steps to manually configure it. Before following these steps to repair a bad configuration, it is strongly suggested that you first attempt to fix your configuration by following the steps outlined in Reset the Source SDK Game Configuration.

Warning.pngWarning:In most cases, Hammer will configure itself and you do not need to follow this procedure. If you have problems, it is much simpler to reset the game configuration instead. Doing this, however will remove your mod configurations

Template:ModernNote

Adding a New Game Configuration

  1. Launch Hammer.
  2. The First Time Setup dialog box may appear. If it does, click the No button:
    Setup NoGameConfig.png
  3. If the First Time Setup window did appear, this Configure Hammer dialog should now be open. Otherwise, click Options in the Tools menu, and then open the Game Configurations tab.
    Setup GameConfig 01.png
  4. Click on the Edit button to the right of the Configuration drop-down list, which will open the Edit Game Configurations dialog:
    Setup EditGameConfig.png
  5. Press the Add button. This will open the Add a game dialog:
    Setup AddGame.png
  6. Enter a name for the new configuration, usually the name of the game or mod. Press OK to confirm your choice and close the dialog.
  7. Press the Close button in the Edit Game Configurations dialog.

Setting Game Directory and Basic Parameters

  1. You should now be back in the Configure Hammer dialog with your configuration selected in the Configuration drop-down list:
    Setup GameConfig 02.png
  2. Press Add to the right of the Game Data files list. An Open dialog will appear:
    Setup AddGameOpen.png
  3. Select the appropriate .FGD file for your game or mod:
    • For a Counter-Strike: Source configuration, click on cstrike.fgd and then the Open button.
    • For a Half-Life 2 configuration, click on halflife2.fgd and then the Open button.
    • For a Half-Life 2 Deathmatch configuration, click on hl2mp.fgd and then the Open button.
    • For a Team Fortress 2 configuration, click on tf.fgd and then the Open button.
  4. Now you'll be back in the Configure Hammer dialog with these fields filled out:
    Setup GameConfig 03.png
  5. Type 0.25 into the Default texture scale field. Type tools\toolsskybox into the Cordon texture field.
  6. Under Game Executable Directory, hit Browse and select the folder where the game executable (such as hl2.exe) is located.
    For example, the directory for a Counter-Strike configuration might be:
    $SteamUserDir\Counter-Strike Source
  7. Under Game Directory, enter the path of the folder that contains gameinfo.txt.
    For example, the game directory for a Half-Life 2 configuration might be:
    $SteamUserDir\Half-Life 2\hl2
    For mods located in the sourcemods folder, the game directory would be of the form:
    C:\Program Files (x86)\Steam\steamapps\sourcemods\mod
  8. Under Hammer Map Directory, you should enter the folder where you wish to save your .VMF map source files.
    • Example for Counter-Strike:
    C:\Program Files (x86)\Steam\steamapps\common\sourcesdk_content\cstrike\mapsrc
    • Example for Half-Life 2:
    C:\Program Files (x86)\Steam\steamapps\common\sourcesdk_content\hl2\mapsrc
    • Example for Half-Life 2 Deathmatch:
    C:\Program Files (x86)\Steam\steamapps\common\sourcesdk_content\hl2mp\mapsrc

Setting up the Build Programs

  1. Click on the Build Programs tab:
    Setup BuildPrograms.png
  2. In Game Executable, enter the path of the .exe file used to launch the game.
    • For example, for a Counter-Strike configuration, your Game Executable might be:
    $SteamUserDir\counter-strike source\hl2.exe
    • For a Half-Life 2 configuration, your Game Executable might be:
    $SteamUserDir\half-life 2\hl2.exe
    • For a Half-Life 2 Deathmatch configuration, your Game Executable might be:
    $SteamUserDir\half-life 2 deathmatch\hl2.exe
  1. In BSP executable, enter the location of vbsp.exe:
    EXEDIR\bin\vbsp.exe
    EXEDIR is the value that was entered into Game Executable Directory field earlier.
  2. In VIS executable, enter the location of the vvis.exe:
    EXEDIR\bin\vvis.exe
    EXEDIR is the value that was entered into Game Executable Directory field earlier.
  3. In RAD executable, enter the location of the vrad.exe:
    EXEDIR\bin\vrad.exe
    EXEDIR is the value that was entered into Game Executable Directory field earlier.
  4. In Place compiled maps in this directory before running the game, enter the Game Directory with \maps appended to the end of it:
    • Example for Counter-Strike:
    $SteamUserDir\counter-strike source\cstrike\maps
    • Example for Half-Life 2:
    $SteamUserDir\half-life 2\hl2\maps
    • Example for Half-Life 2 Deathmatch:
    $SteamUserDir\half-life 2 deathmatch\hl2mp\maps
    • Example for MOD:
    C:\Program Files (x86)\Steam\steamapps\sourcemods\MODDIR\maps
    MODDIR is the name of your game directory for your mod.
  1. Press OK. Hammer is now configured for use.