The Hammer Editor is a program developed by Valve Software designed for map making in the Source, or GoldSRC engines. In this tutorial we are going to focus on the version of hammer known as Hammer 4, which is designed for use in the Source Engine.
Pre-Source 2013 Games(HL2, CS:S, DOD:S):
To find your hammer.exe file in games running on versions of source from before the new Source 2013 although more difficult than after 2013 versions, is still fairly easy, just navigate to the directory where your game is installed,
go into the bin folder, and scroll down to hammer.exe, then run the program.
Counter-Strike: Global Offensive:
For Counter-Strike: Global Offensive it is a bit different, first you have to open steam, then hover your mouse over the button on the top of the screen that says Library, it will open a small menu, then click tools, now you have to navigate on the page to the tool named Counter-Strike: Global Offensive - SDK, right click it, and click install game, once that is done downloading, open the program, it will bring up a small grey menu, then click Hammer Editor.
- Now that you have opened up hammer, you should be greeted with a page that looks something like this:
- Code: Select all
-toconsole -dev -console +sv_lan 1
It may look intimidating if you have never used mapping software before, but I assure you it is very simple, and I will do my best to explain what everything does.
Let's start with the the tools, you can see these on the lefthand side of the screen, these are used for pretty much everything in hammer, to select them, simply click them, or use the keyboard shortcuts that I will explain later in the tutorial.
This tool will be used quite a bit, because it is used to move around brushes(blocks) that have previously been placed. To use it just select it, and click on the block that you wish to move around, or resize.
This is a tool that is useless, and I have never used, it is for zooming in and out on the 2d views(the views with the grid), the scrollwheel does a much better job, so just use it. But if you really want to use the magnify tool,
select the tool, move your mouse over the 2d view that you wish to zoom in or out on, and right click to zoom out, left click to zoom in.
This tool very difficult for me to explain, it is not nessasary, but is useful in some cases, if you want to learn more about it you can read about it on the Developer Wiki.
This tool is used a lot, it is used for placing entities in your level. To use it select the tool, and look in the bottom right corner of your screen, you should see 2 boxes, one saying Objects, and one categories, in objects type the name of the entity you wish to create, and click in your level to place that entity(then move the entity to make sure it's on grid), you can see a list of entity names here.
This is by far the most used of all the tools, it's used for creating brushes(blocks) that make up almost everything in your level. To use this select the tool, then look on the right side of the screen, there should be a square with a brick texture(default), click the browse button next to that brick texture, then click the filter box on the bottom of the textures screen, and search for nodraw, and double click the first result, then click and hold in any of the 2d views, and while still holding down the mouse button drag to the other corner of where you wish your brush to be, then press enter.
Texture Application Tool:
This tool is extremely useful, because it is used to put a texture on one face of a brush. Select the tool, and a menu will come up, click browse on that menu, and find a texture that you wish to apply to your brush, then once you have that texture selected in the menu, right click on the side of the brush that you wish to texture, and it will automatically apply that texture to the brush.
Apply Texture Tool:
I do not suggest the use of this tool in most cases, since it will replace all textures on the brush, including nodraw, which you want on all parts of the brush not visible. To use it select the brush you want to apply the texture to, then choose a texture from the texture menu, and then select the tool.
This tool is used rarely, because the overlay tool does a better job of the same thing, it places a decal of your choice on any existing brush. To use it first select the tool, then open the textures menu, search for decal, find a decal that you like, and select it, then click on any brushes in your map, and it will place the decal on that brush.
This tool is a better version of the Apply Decal Tool. To use this tool do everything that you did with the Apply Decal Tool, but after that is all done, you are now able to resize your decal.
This tool is used to slice your brush to make different shapes, and angles. To use it, first select the brush you want to slice, then select the tool, now drag from one part of the brush that you selected to another part, you will notice that one side is red, and one is white, the red side will be deleted, if you want to change which side is which, press [Shift-X] until the side you want deleted is red, or both sides are white, which means both will be kept.
I do not endorse the use of this tool, it can create invalid shapes that can cause your map to not properly compile.
To use it select the brush that you want to edit, then click the tool, there will be white, and yellow dots created on that brush in the 2d views, now drag around those dots, and create your own shape.
To run your map, first make sure you close it in with brushes, if you don't it will cause your map to "leak", which causes many issues with lighting, water, etc, then either go to File>Run Map, or press F9, on that page it will have a bunch of check boxes, and a dialog window called Additional Game Parameters, in that dialog box paste this:
and leave everything else the same, then click OK, and it will run your map.
I will add more to this tutorial in the future, as it doesn't explain everything, if you have anything that you want explained in it, please reply with what you think I should explain in this tutorial, and I will do my best to try to add it.