Making a map for HL2:DM
This page is half finished, but I will keep adding to it when I can.
Useful links for mapping
Getting Source SDK
To make a map you need the Source SDK. It comes free with certain source engine games, but only if you paid for them. It doesn’t come with the free copy of HL2:DM for example. You get Source SDK if you buy one of these games. You can download, install and launch the SDK from the Tools section in the Library within Steam.
Configuring Source SDK
(Taken from the Steam Users Forums)
Step I.) To begin, load Source SDK.
Step II.) Click on Edit Game Configuration
Step III.) Under Current Game Configuration:, click on add.
Step IV.) A window will appear where you can input the name and directory of the game you wish to map with using Source 2009 SDK.
Step V.) For Name, enter the name of the game you will be loading into SDK. In this case, it will be Half-Life 2: Deathmatch. Other names are suitable.
Step VI.) For Directory, click browse… or manually input the directory of the installed game files. For deathmatch, it will be <install drive\directory>\Valve\Steam\Steamapps\<account name>\half-life 2 deathmatch\hl2mp
Step VIIa.) In completing these steps, you will need to close Source SDK and re-open it.
Step VIIb.) Once the Source SDK menu has reopened, select Source 2009 under Engine Version, and Current Game, select Half-Life 2: Deathmatch.
Step VIII.) Now load Hammer Editor, and from the dropdown menu, select Tools -> Options…
Step IX.) A Game Configurations window will appear, and make sure Half-Life 2 Deathmatch is selected as youConfiguration.
Step X.) Below this you will see Game Data files: where there currently should only be one FGD file loaded -$SteamUserDir\sourcesdk\bin\orangebox\bin\base.fgd – You will need to change this!
Step XI.) Select $SteamUserDir\sourcesdk\bin\orangebox\bin\base.fgd and click Remove.
Step XII.) Once you have done this, click on add, and select hl2mp.fgd from your ..\sourcesdk\bin\orangebox\bin\folder.
Step XIII.) After you completed the final step, it may be necessary to close and restart Hammer to load the new FGD file and hl2mp entities.
Setting up Hammer
With Hammer open, click File – New. You should see the screen divide in to four sections.
Go to the top left section and click on the word “Camera” and choose “3d Textured” or “3d Shaded Textured”
Go to ‘Tools’ – ‘Options’, click the ’2D views’ tab. Tick ‘Default to 15 degree rotations’ and ‘Arrow keys nudge selected object/vertex’
Navigating around Hammer
When using the 3d view in Hammer, you can press z and then navigate round your map using the same keys as other source games, e.g. wasd and the mouse.
Map tips
Your map must be entirely enclosed. Everything must be inside the walls, floor and ceiling that you create. The edges must all be touching and sealed. If you want sky, you put in a ceiling and cover it in skybox texture.
You must have a spawn point! You must put at least one info_player_deathmatch entity in the map for it to load.
Testing your map
To play your map in Deathmatch, you must compile it. First, save the map. Then click file – run (or press f9) and hammer will compile the map. It will then start Deathmatch and load the map. If it doesn’t, either something went wrong, or you unticked the box that tells it to start deathmatch after compiling!
If your map won’t work, you should check the compiler log (the message window that popped up) for errors. If you have trouble understanding the errors, you can copy and paste the whole lot in to this web site and it will check for errors.
File locations
Maps you are working on are stored in C:\Program Files\Steam\steamapps\your name\sourcesdk_content\hl2mp\mapsrc
Maps you have played are stored in C:\Program Files\Steam\steamapps\your name\half-life 2 deathmatch\hl2mp\maps
If you have a 64 bit operating system, then that first part will be C:\Program Files (x86)\
Including extra files
Custom textures / sounds / models must be added to the map .bsp file before distribution. You need Pakrat. Download it here. Pakrat requires Java.
- Unzip Pakrat. Make sure that you have Java installed.
- Double click on Pakrat.jar to open it.
- It automatically goes to file – open. Navigate to your map within the deathmatch maps folder and open it.
- Click ‘Auto’ at the bottom. It should add all the custom files to the list.
- Go to ‘File’ – ‘Save’ and overwrite the original map. (It will create a backup ending in .bak)
- Distribute the newly saved map.
Decompiling
You need vmex if you want to take a map apart to see how it works. Download it here.
