Snarkpit Articles


In this tutorial I will be explaining how to configure Hammer to use Steam and run it when you wish to compile your maps. The configuration I will cover will be for Half-Life, one mod which is supported by Steam, and one 3rd Party mod, just so all aspects are covered. For the sake of this tutorial I will use my email address, adamnaser@comcast.net as the steam sub-directory.

Software you should have:
  • GCF Scape by Nemesis Tools
    This tool allows you to extract anything out of the *.GCF files, including *.WAD files.
    Download
  • Zoner?s Half-Life Tools:
    A much better set of compiler tools then the standard Hammer compilers.
    Download
(Note: at this point the author originally suggested creating different folders to keep copies of your MAP, PTS, LOG and RMF files in, but it is not necessary to do so -Lep)

Hammer:
Open Hammer up, if it isn?t your first time opening Hammer on the current installation, go to Tools ? Options

Options Window:
Configuring Hammer:


The General, 2D Views, and 3DViews tabs are up to you. Include the textures you want to use, remember you put them in the game?s game directory (valve, dod, cstrike, etc..).

Game Configurations:
Create a new configuration for your game/mod by clicking Edit ? Add, the name doesn't matter.

Game Data Files:
This is the FGD for Half-Life or any sort of mods. Hammer comes with some FGDs, but there are newer versions available:

Half-Life
Day of Defeat
Counter-Strike
TFC
DMC
Ricochet
Opposing Force

Note that mods usually come with their own up-to-date FGD.

Game Executable Directory:
Change this to where ever you have steam installed.
?Steam

Mod Directory:
Because Steam is the parent application now everything is treated as a mod, even Half-Life.
For Half-Life:
?SteamAppsadamnaser@comcast.nethalf-lifevalve

Steam Supported Mod: Day of Defeat:
?SteamAppsadamnaser@comcast.netday of defeatdod

3rd Pary Mod: Sven Co-op:
?SteamAppsadamnaser@comcast.nethalf-lifesvencoop
Game Directory:
This is the directory for the game you?re running.
For Half-Life:
?SteamAppsadamnaser@comcast.nethalf-life

Steam Supported Mod: Day of Defeat:
?SteamAppsadamnaser@comcast.netday of defeat

3rd Pary Mod: Sven Co-op:
?SteamAppsadamnaser@comcast.nethalf-life
(Use the Half-Life directory for 3rd party mods)

RMF Directory:
This is the default folder for saving your RMF files. Note this should be a folder under the Steam/SteamApps directory!

Build Programs:


Select the configuration for the game/mod you're working on.

Game Executable:
This is the steam executable?s path. Something like:
C:Steamsteam.exe

CSG, BSP, VIS, and RAD compilers are wherever you installed them, so enter their paths underneath if you want to compile with Hammer. You will need to create a maps directory within your mod directory and place compiled maps there before you can play them.
For Half-Life:
?SteamAppsadamnaser@comcast.nethalf-lifevalvemaps

Steam Supported Mod: Day of Defeat:
?SteamAppsadamnaser@comcast.netday of defeatdodmaps

3rd Pary Mod: Sven Co-op:
...SteamAppsadamnaser@comcast.nethalf-lifeSvenCoopmaps
Compile Dialog and Commands:
First press F9 to bring up the ?Run Map? window. If it is in ?Normal? mode, click ?Advanced?.

Create a New Dialog:
This step is necessary if you want Hammer to manage the compiling of your map; however, easy as it may be, it does increase compile time significantly. If your map is taking several minutes/hours to compile, check the files page for programs that can help.

Click Edit ? New then click ok. Add the following commands:
Command: $csg_exe
Parameter: $path$file

Command: $bsp_exe
Parameter: $path$file

Command: $vis_exe
Parameter: $path$file

Command: $light_exe
Parameter: $path$file

Command: Copy File
Parameter: $path$file.bsp $bspdir$file.bsp

Command: $game_exe
Parameter: -applaunch 70 -dev +map $file.bsp
Notice the -applaunch parameter- its value will depend on what mod you're loading:

Cstrike: 10
TFC: 20
DOD: 30
DMC: 40
OP4: 50
RIC: 60
HL: 70

If you?re using a 3rd party mod you still use 70, but remember to add a -game modname parameter, e.g. -applaunch 70 ?game svencoop ?dev +map $file.bsp for Sven Co-op.

That?s it! That wasn?t so hard was it? Couple this with Valve releasing the LAN add-on to Steam, there won?t be much whining left to do regarding Steam.

I hope this tutorial is useful and if you have any questions email me (look in my profile or anywhere in this tutorial) or post a question on this page.


Post ReplyView Topic
Discussion
[author]
Posted by Crono on Thu Jul 29th 2004 at 9:23pm

If you're mapping for half-life, yes ... but on your computer lol
0 starsPosted by $loth on Wed Jul 28th 2004 at 1:20pm

Where would you put the wads? In the SteamAppsadamnaser@comcast.nethalf-lifevalve folder?
0 starsPosted by Vash on Fri Mar 19th 2004 at 5:19am

Tis a 1000/5, but seeing as I cannot go that high, I'll give you the next best thing...

5/5 smiley
[author]
Posted by Crono on Wed Feb 25th 2004 at 5:03am

Thanks Omega, Something to remember when using model viewing in Hammer with Steam is that, you must be able to actually select the models, which means you have to extract them (meaning there's technically two copies on your Hard drive) so that Hammer can use them.

Also, as you'll probably find, once you start importing models, you have to create a res file for the map. Seems like a lot of work, huh? But I think it's becoming a very stable and reliable system such that more games then just half-life can rely on.
0 starsPosted by omegaslayer on Fri Feb 20th 2004 at 2:54am

Great this works nice tut, now i have to configure the model rendering in WC, along with the sprites.
[author]
Posted by Crono on Fri Jan 16th 2004 at 8:04pm

Yeah . . . . like I said I can't edit the tutorial, If I could I would. And that last comment was to clear up a lot of confusion people might have about how it actually works. Sorry about the length.

Honestly, I feel like a morron for posting the tutorial and then an hour later finding a completly different way, practically on accident!! Which happens to be easier and more diverse.

[EDIT]
I wasn't explaining the tutorial in that post, I found other ways to make this work better, but it's being annoying. Such as, Hammer insists on putting compiled maps in the /SteamApps/ directory, which is not in any of the settings. It's doing some pretty random things suddenly. But for the most part, doing it the way I suggested in the tutorial will work just fine. I'm trying to figureout the reason why it's being so odd. If anyone wants to help out, by all means do so. If you can tell me why Hammer insists on everything being in the /SteamApps/ Directory whence compiling finishes (literally, before the copy commands) then you get extra brownie points . . .[/EDIT]
0 starsPosted by Gollum on Fri Jan 16th 2004 at 2:23pm

Yikes - comments that are almost as long as the tutorial, in order to explain the tutorial.

Don't forget that clarity of expression is fundamental to writing a tutorial, together with a well-defined and focused objective.

*Hides gmdm2 tutes under the carpet*
[author]
Posted by Crono on Fri Jan 16th 2004 at 12:56pm

All that is needed to compile a map into a bsp is the .map file.
And yeah Sinner, you're right, but that's exactly what this is doing.

If you're using a 3rd party compiler console then why would you configure hammer at all? Past the FGD file and the Wad files needed for the actual map editing. Unless you want hammer to call the 3rd party compile dialog . . . which it can probably do.

All that's going on when you compile with hammer is a series of calls to certain programs (or compilers) in whatever order you want.

Ok, let me see if I can briefly explain what I was talking about in the previous comment.

When compiling in Hammer, in the Advanced compiler Dialog you list the commands.

I took out the Change Directory command, because it will default at the rmfs path directory (e.g. if your rmf is saved on your desktop, your desktops path in hammer is the same as saying $path) thus allowing you to have the rmf anywhere instead of in the $gamedir directory.

Now, as you said, once the map is compiled into a bsp, all you need is the bsp in the maps directory. ($bspdir) which is the part where you put your map directory "place compiled maps here before running".

The steam.exe is ran by the parameter $game_exe

These are all set up seperatly and they are all in the Build Programs tab, these are the only things needed for building the map (thus the name of the tab).

obviously the last parameter left is $file which is just the name of your rmf.

Lets assume you have an RMF file in 'C:/MAPS' called 'fubar'

When it says:

$csg_exe $path$file

It means:

Run "/ZHLT/hlcsg.exe" with "C:/MAPS/fubar'

The compilers need a .MAP file (that type of encription). What it most likely does is looks for fubar.MAP since it knows there should already be a .MAP file there, made by you or Hammer or whatever, it will add the .Map portion in on it's own, if it's not then it whines at you.

Everything else continues in the same way. So, if it never calls the mod directory (and for steam is doesn't, not as long as your map folder path and such is inputed properly) then it will never be a problem because it is simply not needed.

Now, I'm not saying these things aren't needed for compiling WON maps. Because I really don't know, I've never messed around with removing and adding compiling options there.

But this works well, and it is actually less work, I apologize that I didn't spend as much time before I wrote the tutorial as I did afterwords, I was just excited that it ran with steam lol.

But this will work well. And if you're using a 3rd party compiling console, why are you messing with it at all? Just open your rmf over there and let it be compiled.

This tutorial is basically just to have everything compile properly and run automatically with steam, just as it did when mapping with WON from within Hammer.

on a side note, matt, to be honest it's easier. But if it makes you feel better, HL2, I'm assuming, will ship with a brang-new Hammer which is 100% tailor made for steam, as was hammer 2.0-3.5 tailor made for WON (Which is why some stuff isn't needed for a steam compile). I assure you everything will work out well.

If you haven't noticed, the recent updates of steam have cut the system recource cost. Now, your internet browser takes up about 6 times as much recources as steam (both being Idle). While Steam is running Half-Life your Browser still takes up twice as much system recources, while the browser is idle and steam is not.

Anyway, I suppose Steam has no where to go, but up.
0 starsPosted by Sinner_D on Fri Jan 16th 2004 at 11:56am

wouldnt this be pointless for those using a third party compiler prog? as far as i know, once you make a map, all you have to to is put the bsp, and other files in there respective directories.

from what ive learned and always thought was that the "game config tab" was to setup where your .bsp file would look for such files needed for the map in question. so if you fill that out correctly, it doesnt matter where or how u compile the map, aslong as you put the files where they are needed to be after compile.
0 starsPosted by matt on Fri Jan 16th 2004 at 10:35am

Now I'll never map for steam. Ever.
Post ReplyView Topic