Setup the "Valve Hammer Editor" for Torque
by Vis · 12/18/2005 (6:45 pm) · 30 comments
There seems to have been a resource covering this but I could not find it (broken link) so had to do this the hard way, To save you some time this is what I came up with .....
There have been concerns in the past about licensing issues using Hammer, for more info see www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2497
For this HowTo: it is expected that the Torque SDK has been installed at C:\Torque_SDK
Download Hammer from collective.valve-erc.com/index.php?go=hammer
Run the install but do not run the application yet.....
Assuming you installed to the default location: C:\Program Files\Valve Hammer Editor
Create a new directory: C:\Program Files\Valve Hammer Editor\fgd\Torque
Copy or Create torque.fgd in/to the above directory, you can find it in C:\Torque_SDK\tools\map2dif\
Hammer uses textures contained in a .wad file, so you will need to create a file for hammer to use.
There are two options ....
1. Use wally www.telefragged.com/wally/
2. Use the buildwad tool included with torque. (find it in C:\Torque_SDK\tools)
Create a wad file containing at least one texture.
Create a working directory C:\test
Copy the texture(s) you put into the wad file into this directory, map2dif will need to use them during its DIF creation.
Copy map2dif_plus.exe to C:\Program Files\Valve Hammer Editor\tools
This file can be found in C:\Torque_SDK\tools (after you have compiled the Torque SDK) else you can download it from www.garagegames.com/mg/projects/tge/artist.php#DIF
Start Hammer,
The configuration dialog should already be open, else open from Tools/options menu.
On the Textures tab hit the Add WAD button and locate the wad file you just created.
On the Build Programs tab under CSG executable hit the browse button and locate C:\Program Files\Valve Hammer Editor\tools\map2dif_plus.exe
You can leave all the other paths here blank.
hit ok.
Now to create a test map/room,
1. Select menu File/new
2. Ensure you have the block tool selected (white cube icon on left-hand icon list).
3. In the top view drag out a box (top view is the top right pane).
4. In the side view (lower right pane) drag the top handle up (small white dot) to make the box a bit larger.
5. Right click inside the box and select "create object".
6. Select the selection tool (the red arrow icon on left-hand icon list).
7. Select the box by clicking on one of it lines or the little "x" in the middle (it will turn red).
8. Select menu Tools/Make Hollow (or hit CTRL+H), keep the default 32 value and hit ok.
9. Re-select the box, and right click it, select ungroup from the drop-down menu (or hit CTRL+U).
10. Un-select the box by clicking away from it.
11. Select the end wall by clicking in the center of the box in the side view(lower right pane).
12. Hit the "left square bracket key" two times to reduce the grid size to 16.
13. Drag each side of the wall out by 1 grid in the side view (lower right pane, using the small white dots).
14. Right click the end wall and select "tie to entity" (or hit CTRL+T).
15. In the dialog change the class to portal, then ...
16. Select Ambient Light, and change the drop-down option to "Passes through", close dialog.
17. Save the file in C:\test\ call it "myfirstroom" (menu file/save as, the file will get a .rmf extension by default).
Open the compile dialog (F9 or menu file/run) hit the expert button at the bottom.
Select edit, create a new configuration by hitting the "New" button, name it Torque
Ensure the new Torque config is selected in the "Configurations:" drop-down list.
hit the New button
On the right hit the Cmds Button and select CSG program option
Copy the following and paste and in the parameters: dialog.
-v -h -o $path -t $path $path\$file.$ext
Select the tick box next to $csg_exe in the Compile/run commands pane, then Hit Go! button to create the DIF file.
myfirstroom.dif will be located in c:\test
notes:
$path in the above config points to where you saved/loaded the rmf file.
You can change -o $path to -o C:\Torque_SDK\example\starter.fps\data\interiors\test (don't forget to create the test directory interiors\test!).
You can change -t $path to -o C:\Torque_SDK\example\starter.fps\data\interiors for the textures.
Hope this saves you some time .....
.
There have been concerns in the past about licensing issues using Hammer, for more info see www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2497
For this HowTo: it is expected that the Torque SDK has been installed at C:\Torque_SDK
Download Hammer from collective.valve-erc.com/index.php?go=hammer
Run the install but do not run the application yet.....
Assuming you installed to the default location: C:\Program Files\Valve Hammer Editor
Create a new directory: C:\Program Files\Valve Hammer Editor\fgd\Torque
Copy or Create torque.fgd in/to the above directory, you can find it in C:\Torque_SDK\tools\map2dif\
Hammer uses textures contained in a .wad file, so you will need to create a file for hammer to use.
There are two options ....
1. Use wally www.telefragged.com/wally/
2. Use the buildwad tool included with torque. (find it in C:\Torque_SDK\tools)
Create a wad file containing at least one texture.
Create a working directory C:\test
Copy the texture(s) you put into the wad file into this directory, map2dif will need to use them during its DIF creation.
Copy map2dif_plus.exe to C:\Program Files\Valve Hammer Editor\tools
This file can be found in C:\Torque_SDK\tools (after you have compiled the Torque SDK) else you can download it from www.garagegames.com/mg/projects/tge/artist.php#DIF
Start Hammer,
The configuration dialog should already be open, else open from Tools/options menu.
On the Textures tab hit the Add WAD button and locate the wad file you just created.
On the Build Programs tab under CSG executable hit the browse button and locate C:\Program Files\Valve Hammer Editor\tools\map2dif_plus.exe
You can leave all the other paths here blank.
hit ok.
Now to create a test map/room,
1. Select menu File/new
2. Ensure you have the block tool selected (white cube icon on left-hand icon list).
3. In the top view drag out a box (top view is the top right pane).
4. In the side view (lower right pane) drag the top handle up (small white dot) to make the box a bit larger.
5. Right click inside the box and select "create object".
6. Select the selection tool (the red arrow icon on left-hand icon list).
7. Select the box by clicking on one of it lines or the little "x" in the middle (it will turn red).
8. Select menu Tools/Make Hollow (or hit CTRL+H), keep the default 32 value and hit ok.
9. Re-select the box, and right click it, select ungroup from the drop-down menu (or hit CTRL+U).
10. Un-select the box by clicking away from it.
11. Select the end wall by clicking in the center of the box in the side view(lower right pane).
12. Hit the "left square bracket key" two times to reduce the grid size to 16.
13. Drag each side of the wall out by 1 grid in the side view (lower right pane, using the small white dots).
14. Right click the end wall and select "tie to entity" (or hit CTRL+T).
15. In the dialog change the class to portal, then ...
16. Select Ambient Light, and change the drop-down option to "Passes through", close dialog.
17. Save the file in C:\test\ call it "myfirstroom" (menu file/save as, the file will get a .rmf extension by default).
Open the compile dialog (F9 or menu file/run) hit the expert button at the bottom.
Select edit, create a new configuration by hitting the "New" button, name it Torque
Ensure the new Torque config is selected in the "Configurations:" drop-down list.
hit the New button
On the right hit the Cmds Button and select CSG program option
Copy the following and paste and in the parameters: dialog.
-v -h -o $path -t $path $path\$file.$ext
Select the tick box next to $csg_exe in the Compile/run commands pane, then Hit Go! button to create the DIF file.
myfirstroom.dif will be located in c:\test
notes:
$path in the above config points to where you saved/loaded the rmf file.
You can change -o $path to -o C:\Torque_SDK\example\starter.fps\data\interiors\test (don't forget to create the test directory interiors\test!).
You can change -t $path to -o C:\Torque_SDK\example\starter.fps\data\interiors for the textures.
Hope this saves you some time .....
.
About the author
#22
05/22/2006 (5:27 am)
I'm getting the same issue as jerry.
#23
Thanks for the info here. It sure smoothed my way.
But I get to the very end and everything goes ok, but when I try to use the dif file, I get a strange error about not having the right version:
"You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator for more information. (Invalid Packet)."
I'm using XP SP2. Downloaded SDK 1.4 yesterday. Hammer v3.4 build 1983.
Think this is the latest version of everything so not sure what's happening.
Thanks for listening ;)
09/04/2006 (6:48 pm)
Hmmm.Thanks for the info here. It sure smoothed my way.
But I get to the very end and everything goes ok, but when I try to use the dif file, I get a strange error about not having the right version:
"You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator for more information. (Invalid Packet)."
I'm using XP SP2. Downloaded SDK 1.4 yesterday. Hammer v3.4 build 1983.
Think this is the latest version of everything so not sure what's happening.
Thanks for listening ;)
#24
"You do not have the current version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game. (Invalid Packet)"
So im not sure what to do here because i have 1.5, Any help would be great.
Also could you tell me if i did it right? with the command prompt and everything
01/24/2007 (5:59 pm)
Ive done everything this tutorial has said but am now having more problems and im not sure im solving them correctly. First i created the .map by exporting it because after i saved it as a .map it would not actually save that way... it would jsut be a FILE, so after exporting it i opened the command prompt for map2dir and that made a DV file. Well i loaded up Torque and tried bringing them in and an Error came up."You do not have the current version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game. (Invalid Packet)"
So im not sure what to do here because i have 1.5, Any help would be great.
Also could you tell me if i did it right? with the command prompt and everything
#25
1.) What do you mean when it just makes a "FILE"? I thought all files were...files? Do you mean there was no extension? Or the filename was "file"?
2.) you used map2dir? Or map2dif?
3.) You created a DV file? I'm not familiar with that format. Are you talking about a DIF?
01/24/2007 (9:52 pm)
Could you be more specific/precise? I'm not sure if you've got some typos or if you're talking about something else. 1.) What do you mean when it just makes a "FILE"? I thought all files were...files? Do you mean there was no extension? Or the filename was "file"?
2.) you used map2dir? Or map2dif?
3.) You created a DV file? I'm not familiar with that format. Are you talking about a DIF?
#26
01/26/2007 (2:04 pm)
ok i figured it mostly out, But now ive run into another problem. While in Hammer 3.4 i noticed that theres no displacement that i could find. Im gunna look at patch notes and whatnot but im more familiar with the newest Hammer provided by Steam. So i tried to do my level using the new Hammer but after loading the textures it doesnt let me even put the textures on the brushes nor does it show the displacement when i bring the brush into Torque 1.5. Im using the Torque 1.5 Demo to make sure all of this works before i upgrade to 1.5 but so far im not impressed. Any help would be great.
#27
11/16/2008 (5:37 pm)
Where can i get Torque SDK?
#28
11/16/2008 (9:59 pm)
Torque SDK is what you get when you buy Torque. Or even use the demo.
#29
10/03/2009 (4:12 pm)
so, things have changed since this article was first posted. that link to download hammer is broken, and torque 3D is out. what's the setup nowadays? 
Torque Owner Vis
This resource was created using 3.4; are you using windows XP home edition by any chance ?
@Kurt:
Did you place the torque.fdg as stated ? I found that Hammer picks it up and theres no need for the steps you suggest.
@tweekman
Have a look here for the current map2dif_plus link :
www.garagegames.com/mg/forums/result.thread.php?qt=32691
An alternative to this resource can be found on TDN at:
tdn.garagegames.com/wiki/DIF/Hammer