Configuring Hammer for Half-Life: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(22 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar}}
| ru = Half-Life Level Creation/Configuring Hammer for Half-Life:ru}}


{{Back|Half-Life Level Creation}}
[[File:Hammer Editor 3.4 Splash Screen.png|right|250px]]
Half-Life maps are designed using Hammer Editors 3.3 through 3.5, and are powered by the [[GoldSource|GoldSource Engine]], the predecessor to the current Hammer 4.X series, AKA the [[Source SDK]]. Half-Life maps can only be developed and compiled using the GoldSource Engine. This tutorial assumes you have already downloaded some form of the GoldSource Hammer Editor, so finding and installing it will not be covered on this page.


==Configuring Hammer for Half-Life==
[[File:Hammer Editor 3.4 Splash Screen.png|thumb|Hammer 3.4's Splash screen|right|250px]]
In order for the Hammer Editor to make maps for Half-Life, it needs access to certain files and programs, such as compilers, entity files, and so-on. This page will give you a quick run through on how to set everything up, and get on your way to map making.
{{HL1}} Half-Life maps are designed using Hammer Editors 3.3 through 3.5, and are powered by the {{goldsrc|4}}, the predecessor to the current {{hammer4|4}} series, AKA the [[Source SDK]]. If you don't already have Half-Life 1's editor, [steam://run/254430 click here to download]. In order for the Hammer Editor to make maps for Half-Life, it needs access to certain files and programs, such as compile tools, game data, and so-on. This page will give you a quick run through on how to set everything up, and get on your way to map making.
{{note|Once you have successfully configured the Hammer Editor to your liking, click '''Apply''', '''OK''', and restart Hammer for your changes to take full effect.}}
{{note|This guide assumes you have a regular Steam installation of everything. You may have to follow alternate or additional steps if you:
* Have Steam, Half-Life, or SDK files installed on a drive that is not <code>C:\</code>
* Have Half-Life/SDK files NOT under your Steam folder.
* Obtained your copy of Half-Life through any non-Steam distributor, or CD-ROM.}}
{{note|If you are using J.A.C.K. for Half-Life and Day of Defeat some info on this page will not be needed to configure J.A.C.K.}}


==Game Configurations==
[[File:Hammer 3.4 Edit Game Configuration Screen.png|right|250px]]
Launch Hammer from Steam. (Steam will call it "''Half-Life SDK''".) Click on '''Tools''', '''Options...''' to open the configuration window. Go to the tab labeled '''Game Configurations'''.


:Launch the Hammer Editor, and open the Tools menubar at the top of screen, and click on Options at the bottom of the bar. The In-Game Configurations console will open, where you can set new configuration settings.
===Configuration===
Hammer allows you to setup multiple configurations, so if you want to make maps for more than one GoldSource game, you can make maps for each on the same editor. This section allows you to add, remove, or edit different configurations.  


Click '''Edit''' (the wide one at the top, not the smaller one below), '''Add''', and name your configuration whatever you want. Click '''OK''', '''Close'''.


===Game Configurations===
===Game Data Files===
Click '''Add'''. Select the file at <code>common\Half-Life SDK\Hammer Editor\fgd\half-life\halflife.[[fgd]]</code>. This file ''should'' exist there. If it doesn't, you can make it yourself by copying all the information on [[Half-Life.fgd|this page]]. You can select and use extra FGDs, but anything in them not coded to work in the Half-Life engine will not work. For example: the CS hostage entity.


:In the Configurations Console click on the tab labeled ''Game Configurations'' and complete the following steps.
{{note|ALL filepaths you enter for configurations need to be absolute, meaning they start with <code>C:\</code> and include the full path to the folder or file.}}


The '''Texture Format''' option should now say '''WAD3 (Half-Life / TFC)''' and the '''Map Type''' option should now say '''HalfLife / TFC'''. These should be the only options listed for either.


* '''Configuration:'''
===Default PointEntity class===
The FGD tells Hammer to automatically select <code>aiscripted_sequence</code> from the [[entity]] list when using the [[Entity Tool]]. You can change the default to any valid [[point entity]] you want.


Hammer allows you to setup multiple configurations, so if you want to make maps for more than one GoldSource game, you can make maps for each on the same editor. This section allows you to add, remove, or edit different configurations. We're going to add a new one, and name it ''Half-Life'' (it doesn't matter what you name it, as long as it helps you remember which game configuration it is). To create a new configuration first click the ''Edit'' button, this will open a dialog box with the options to ''Add'', ''Remove'', or ''Copy'' a Game Configuration, we're going to ''Add'' one, and name it ''Half-Life''.
===Default SolidEntity class===
The FGD tells Hammer to automatically select <code>button_target</code> from the entity list when you tie a brush to an entity. You can change the default to any valid [[brush entity]] you want.


* '''Game Data Files:'''
===Game Executable Directory===
This is the folder containing hl.exe. Select the folder <code>common\Half-Life</code>.


The Game Data files are the FGD files you want to use to build your map. An FGD file provide the entities for use in your editor, each game has it's own FGD. We're going to use the Half-Life FGD file, which if you're using the Half-Life SDK variant of Hammer available on Steam, is located in ''C:/ProgramFiles(X86)/Steam/SteamApps/Common/Half-Life SDK/Hammer Editor/fgd/half-life/halflife.fgd''. If you're using another version, then you'll have to manually download the FGD file somewhere off the internet. To add the FGD, click ''Add'', and locate the file on your computer. You can use multiple FGD files in a single configuration, just know that many entities(primarily NPCs) won't appear in the game other than the one they're from, so any NPCs from Opposing Force will not appear in a Blue-Shift map, and vice versa.
===Mod Directory===
Set this to the folder containing everything specific to your mod/game, such as <code>common\Half-Life\bshift</code>. If you're not mapping for a mod, you can set it to the <code>valve</code> folder, but it shouldn't make a difference.{{confirm}}


* '''Game Executable Directory:'''
===Game Directory===
This is the folder holding game-specific files, such as models, animations, textures, etc. For Half-Life, this is at <code>common\Half-Life\valve</code>.


The Game Executable Directy is where the game executable(playable game file) is located, not the executable itself. The exe directory for Half-Life is ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life''.
===RMF Directory===
This is where Hammer will save all files related to your map every time you [[Saving and Compiling|compile]]. The engine looks in <code>common\Half-Life\[your game folder]\maps</code> for maps, however, Hammer will generate quite a few files related to your map when saving or compiling, so you may find it preferable to have a separate folder to contain them all (usually named <code>bspsrc</code>). Compiled map files can be stored in another folder, which we will get to configuring near the end.


* '''Mod Directory:'''
==Build Programs==
Now go to the tab labeled '''Build Programs'''. These are the programs that process your level geometry, determine where to optimize for visibility, and add lighting to your map. Many mappers use [[Zoner's Half-Life Tools]] (ZHLT), a fan made modification of the original tools developed for Half-Life containing many fixes and improvements. If you use those tools, you will have to give filepaths for those instead of the ones talked about below.


The Mod Directory is similar to the Game Executable Directory, it's the directory location for a Half-Life modification, such as Team Fortress Classic, or Counter-Strike, and is located inside the ''Half-Life'' file location listed earlier. Because we are configuring Half-Life itself, and not a Half-Life mod, this field can be left completely blank.
{{Bug|
Hammer might not recognize the compiler executables and throw an error at compile time if the paths contain more than one whitespace. You can:
* Remove whitespaces in the paths. So you can move or rename the <code>common\Half-Life SDK\Hammer Editor\tools</code> folder.
* Wrap the paths in double quotes like so: <code>"<steamapps>\common\Half-Life SDK\Hammer Editor\tools\<executable>.exe"</code>
}}


* '''Game Directory:'''
===Game Executable===
A .exe file to open when the map finishes compiling. Unless you have some non-gaming purpose for Hammer, this should ''probably'' be <code>common\Half-Life\hl.exe</code>.


(This may not be completely accurate, so if i'm wrong please correct this, if i'm right, then just delete this message and let me know in your edit summary)
===CSG executable===
The Game Directory is the location of the game's files, such as models, animations, textures, etc. For Half-Life, this is located at ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve''.
CSG takes your brush geometry and turns it into something readable by the engine. It also adds entities, like <code>[[info_player_start]]</code> to your map. This is at <code>common\Half-Life SDK\Hammer Editor\tools\qcsg.exe</code>.


* '''RMF Directory:'''
===BSP executable===
BSP generates [[visleafs]], based off the geometry made by CSG. This is at <code>common\Half-Life SDK\Hammer Editor\tools\qbsp2.exe</code>.


This is where Hammer will save your' maps RMF(compiled map) files every time you compile your level. All RMF files must be saved in ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve/maps'', this is where the game looks when launching maps.
===VIS executable===
VIS determines what is visible from within each visleaf, which is used to save RAM for computers. This is at <code>common\Half-Life SDK\Hammer Editor\tools\vis.exe</code>.


===Build Programs===
===RAD executable===
The Build Programs for your configuration are the files and programs that compile your map, primarily the BSP geometry, lighting, and VisLeafs. Many GoldSource map makers nowadays use ''Zoner's Half-Life Tools'', a fan made modification of the original BSP, VIS, RAD, and CSG build programs developed for Half-Life, if you'd like to use Zoner's tools and don't have them you can download them here(add link later).
RAD<!---is totally sick, bro---> adds unchanging and toggleable lighting into your map, so it won't look so flat and boring. Dynamic lighting, like the HEV flashlight, is done directly in the game. This is at <code>common\Half-Life SDK\Hammer Editor\tools\qrad.exe</code>.


===Compiled Map Directory===
This is where the game usually looks for maps. This should be <code>common\Half-Life\[game]\maps</code>.


:In the Configuration Console, click the tab labeled ''Build Programs'' and complete the following steps.
==Textures==
Go to the tab labeled '''Textures'''. Textures are the images used to make your cubes and cylinders look like crates and barrels. GoldSource textures are stored inside of large image library files known as WAD3 files. You can insert any WAD files you wish, whether they come from other GoldSource games, the internet, or if you make them yourself. It's highly recommended however that you do not edit any of the default WAD files that come with your game, especially if your game is not a Steam purchased copy.


If using Valve's default compilation tools, it is recommended you only add the WADs you need for the map you are editing to prevent unnecessary asset loading in-game. Most newer, community-made compilation tools automatically exclude WADs that are not being used by the map.


* '''Game executable:'''
Look in <code>common\Half-Life SDK\Texture Wad Files\</code> for WADs.


The actual executable file of the game you want to map for, this allows Hammer to run the game whenever you compile your map, allowing you to test your map in the game itself. This field is not mandatory for level creation, but it is highly recommended for quicker and easier map testing. For the Steam version of Half-Life, this file is located at ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/hl.exe''
==Saving and Compiling==
When you've successfully configured your Hammer Editor to your liking, click '''OK''', restart Hammer, and test to make sure you've configured Hammer correctly. If you've created more than one configuration, you can choose which to use on startup.


* '''CSG executable:'''
Quickly test your map by making a medium-sized box, right clicking it in a 2D view, and clicking '''Make Hollow''', adding an <code>info_player_start</code> entity, and a <code>light</code> entity, then compiling with all settings on '''Normal'''. If all went well you should see something like this:


(I don't know what CSG does, can someone help me out here?) If you are using the Half-Life SDK provided by Steam, this file is located at (coming soon). If you are using Zoner's Tools, or any non Steam version of GoldSource, the file is located in whatever file you saved it to.
[[File:Goldsource basic box.jpg|300px|thumbnail|none|Tada!]]


* '''BSP executable:'''  
==Running your Map without Hammer==
It shouldn't happen, but if you're unable to run your map directly from Hammer, keep the game open ''while'' you edit your map. When compiling finishes, open the console by pressing <code>`</code>, and type <code>restart</code>, or if the map's not already open, <code>map mapname</code> to load/reload the map with your changes added.


The BSP compiler generates and compiles a map's BSP geometry.  If you are using the Half-Life SDK provided by Steam, this file is located at ''Hammer Editor\tools\qbsp2.exe''. If you are using Zoner's Tools, or any non Steam version of GoldSource, the file is located in whatever file you saved it to.
{{note|Not being able to run your map directly from Hammer is a warning sign that something is wrong with your compile. If your map isn't changing in-game even when you change it in Hammer and recompile, '''something is wrong'''.}}


* '''VIS executable:'''
[[Category:Level Design]]
 
[[Category:Tutorials]]
The VIS compiler generates and compiles a map's VisLeaf properties, cutting the map into smaller portions to make way for compiling techniques that are easy on your' computer's processor.  If you are using the Half-Life SDK provided by Steam, this file is located at ''Hammer Editor\tools\vis.exe''. If you are using Zoner's Tools, or any non Steam version of GoldSource, the file is located in whatever file you saved it to.
[[Category:Half-Life]]
 
[[Category:Hammer]]
* '''RAD executable:'''
 
(i think RAD has something to do with lighting)  If you are using the Half-Life SDK provided by Steam, this file is located at ''Hammer Editor\tools\qrad.exe''. If you are using Zoner's Tools, or any non Steam version of GoldSource, the file is located in whatever file you saved it to.


* '''Place compiled maps in this directory before running the game:'''


This step is very similar to the RMF Directory from the Game Configuration settings. Set this location to ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve/maps''.
{{stub}}
 
 
===Textures===
Textures are the images used to make your squares and cylinders look like crates and barrels. GoldSource textures are stored inside of large image library files known as WAD3 files. You can insert any WAD files you wish, whether they come from other GoldSource games, the internet, or if you make them yourself. It's highly recommended however that you do not edit any of the default WAD files that come with your game, especially if your game is not a Steam purchased copy.
 
 
:In the Configuration Console, click the tab labeled ''Textures'' and add the following default Half-Life WAD files.
 
 
'''Half-Life SDK:''' ''/Half-Life SDK/Texture Wad Files/halflife.wad''
 
'''Half-Life:''' ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve/halflife.wad''
 
'''Half-Life SDK:''' ''/Half-Life SDK/Texture Wad Files/liquids.wad''
 
'''Half-Life:''' ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve/liquids.wad''
 
'''Half-Life SDK:''' ''/Half-Life SDK/Texture Wad Files/xeno.wad''
 
'''Half-Life:''' ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve/xeno.wad''
 
'''Half-Life SDK:''' ''/Half-Life SDK/Texture Wad Files/decals.wad''
 
'''Half-Life:''' ''C:/ProgramFiles(X86)/Steam/Steamapps/Common/Half-Life/Valve/decals.wad''
 
===Finishing Up===
 
When you've successfully configured your Hammer Editor to your liking, click OK/Apply, restart Hammer, and get to work.
 
[[Category:Level Design Tutorials]]
[[Category:Half-Life]]

Latest revision as of 11:38, 15 November 2024

English (en)Translate (Translate)


Hammer 3.4's Splash screen

Half-Life Half-Life maps are designed using Hammer Editors 3.3 through 3.5, and are powered by the GoldSrc GoldSrc, the predecessor to the current Hammer Hammer 4.x series, AKA the Source SDK. If you don't already have Half-Life 1's editor, click here to download. In order for the Hammer Editor to make maps for Half-Life, it needs access to certain files and programs, such as compile tools, game data, and so-on. This page will give you a quick run through on how to set everything up, and get on your way to map making.

Note.pngNote:Once you have successfully configured the Hammer Editor to your liking, click Apply, OK, and restart Hammer for your changes to take full effect.
Note.pngNote:This guide assumes you have a regular Steam installation of everything. You may have to follow alternate or additional steps if you:
  • Have Steam, Half-Life, or SDK files installed on a drive that is not C:\
  • Have Half-Life/SDK files NOT under your Steam folder.
  • Obtained your copy of Half-Life through any non-Steam distributor, or CD-ROM.
Note.pngNote:If you are using J.A.C.K. for Half-Life and Day of Defeat some info on this page will not be needed to configure J.A.C.K.

Game Configurations

Hammer 3.4 Edit Game Configuration Screen.png

Launch Hammer from Steam. (Steam will call it "Half-Life SDK".) Click on Tools, Options... to open the configuration window. Go to the tab labeled Game Configurations.

Configuration

Hammer allows you to setup multiple configurations, so if you want to make maps for more than one GoldSource game, you can make maps for each on the same editor. This section allows you to add, remove, or edit different configurations.

Click Edit (the wide one at the top, not the smaller one below), Add, and name your configuration whatever you want. Click OK, Close.

Game Data Files

Click Add. Select the file at common\Half-Life SDK\Hammer Editor\fgd\half-life\halflife.fgd. This file should exist there. If it doesn't, you can make it yourself by copying all the information on this page. You can select and use extra FGDs, but anything in them not coded to work in the Half-Life engine will not work. For example: the CS hostage entity.

Note.pngNote:ALL filepaths you enter for configurations need to be absolute, meaning they start with C:\ and include the full path to the folder or file.

The Texture Format option should now say WAD3 (Half-Life / TFC) and the Map Type option should now say HalfLife / TFC. These should be the only options listed for either.

Default PointEntity class

The FGD tells Hammer to automatically select aiscripted_sequence from the entity list when using the Entity Tool. You can change the default to any valid point entity you want.

Default SolidEntity class

The FGD tells Hammer to automatically select button_target from the entity list when you tie a brush to an entity. You can change the default to any valid brush entity you want.

Game Executable Directory

This is the folder containing hl.exe. Select the folder common\Half-Life.

Mod Directory

Set this to the folder containing everything specific to your mod/game, such as common\Half-Life\bshift. If you're not mapping for a mod, you can set it to the valve folder, but it shouldn't make a difference.[confirm]

Game Directory

This is the folder holding game-specific files, such as models, animations, textures, etc. For Half-Life, this is at common\Half-Life\valve.

RMF Directory

This is where Hammer will save all files related to your map every time you compile. The engine looks in common\Half-Life\[your game folder]\maps for maps, however, Hammer will generate quite a few files related to your map when saving or compiling, so you may find it preferable to have a separate folder to contain them all (usually named bspsrc). Compiled map files can be stored in another folder, which we will get to configuring near the end.

Build Programs

Now go to the tab labeled Build Programs. These are the programs that process your level geometry, determine where to optimize for visibility, and add lighting to your map. Many mappers use Zoner's Half-Life Tools (ZHLT), a fan made modification of the original tools developed for Half-Life containing many fixes and improvements. If you use those tools, you will have to give filepaths for those instead of the ones talked about below.

Icon-Bug.pngBug:

Hammer might not recognize the compiler executables and throw an error at compile time if the paths contain more than one whitespace. You can:

  • Remove whitespaces in the paths. So you can move or rename the common\Half-Life SDK\Hammer Editor\tools folder.
  • Wrap the paths in double quotes like so: "<steamapps>\common\Half-Life SDK\Hammer Editor\tools\<executable>.exe"
  [todo tested in ?]

Game Executable

A .exe file to open when the map finishes compiling. Unless you have some non-gaming purpose for Hammer, this should probably be common\Half-Life\hl.exe.

CSG executable

CSG takes your brush geometry and turns it into something readable by the engine. It also adds entities, like info_player_start to your map. This is at common\Half-Life SDK\Hammer Editor\tools\qcsg.exe.

BSP executable

BSP generates visleafs, based off the geometry made by CSG. This is at common\Half-Life SDK\Hammer Editor\tools\qbsp2.exe.

VIS executable

VIS determines what is visible from within each visleaf, which is used to save RAM for computers. This is at common\Half-Life SDK\Hammer Editor\tools\vis.exe.

RAD executable

RAD adds unchanging and toggleable lighting into your map, so it won't look so flat and boring. Dynamic lighting, like the HEV flashlight, is done directly in the game. This is at common\Half-Life SDK\Hammer Editor\tools\qrad.exe.

Compiled Map Directory

This is where the game usually looks for maps. This should be common\Half-Life\[game]\maps.

Textures

Go to the tab labeled Textures. Textures are the images used to make your cubes and cylinders look like crates and barrels. GoldSource textures are stored inside of large image library files known as WAD3 files. You can insert any WAD files you wish, whether they come from other GoldSource games, the internet, or if you make them yourself. It's highly recommended however that you do not edit any of the default WAD files that come with your game, especially if your game is not a Steam purchased copy.

If using Valve's default compilation tools, it is recommended you only add the WADs you need for the map you are editing to prevent unnecessary asset loading in-game. Most newer, community-made compilation tools automatically exclude WADs that are not being used by the map.

Look in common\Half-Life SDK\Texture Wad Files\ for WADs.

Saving and Compiling

When you've successfully configured your Hammer Editor to your liking, click OK, restart Hammer, and test to make sure you've configured Hammer correctly. If you've created more than one configuration, you can choose which to use on startup.

Quickly test your map by making a medium-sized box, right clicking it in a 2D view, and clicking Make Hollow, adding an info_player_start entity, and a light entity, then compiling with all settings on Normal. If all went well you should see something like this:

Tada!

Running your Map without Hammer

It shouldn't happen, but if you're unable to run your map directly from Hammer, keep the game open while you edit your map. When compiling finishes, open the console by pressing `, and type restart, or if the map's not already open, map mapname to load/reload the map with your changes added.

Note.pngNote:Not being able to run your map directly from Hammer is a warning sign that something is wrong with your compile. If your map isn't changing in-game even when you change it in Hammer and recompile, something is wrong.


Stub

This article or section is a stub. You can help by expanding it.