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
#2
12/20/2005 (11:52 am)
For rookies struggling with first time setup it came in handy, thanks a lot Vis! :)
#3
12/27/2005 (6:39 am)
Thanks, I formated my comp and had to redo it, helped me to remember :]
#4
01/10/2006 (10:15 pm)
good i was looking 4 this
#6
01/16/2006 (1:46 pm)
hey can u plz plz help me ive managed to complie my map and it works in torque it just my box is textureless how do i get the texture to show up
#7
Make sure you have copied the textures to your interiors folder.
ie example\starter.fps\data\interiors
replace starter.fps with whatever mod folder you are using.
01/16/2006 (2:08 pm)
Luke:Make sure you have copied the textures to your interiors folder.
ie example\starter.fps\data\interiors
replace starter.fps with whatever mod folder you are using.
#8
01/17/2006 (5:59 am)
ive done that, is there any percif type of texture, where do the diff file call the texure from becuase i could look an see where it is lookin for the texture
#9
Cheers for your time mate, I'll make sure I feed something back into the community!
01/17/2006 (8:15 am)
This tutorial has me hopping around the room in glee! I've been using Worldcraft for some years, resently upgraded to Hammer, if I can get this working well, I'll be able to knock out some quality buildings. I'll resource anything nice I come up with.Cheers for your time mate, I'll make sure I feed something back into the community!
#10
Thanks
*Edit*
Ok, 5 mins later and one site search. I have it working Luke mate, follow this tutorial. It doesn't seem to add much, but what it did seemed to work. Well, it was either that, or me copying my .wad and .jpg of my texture to several places. Have a play with where your textures are stored mate. Thinking about it, I think the .wad is only used for hammer.. not sure, will play.
01/17/2006 (1:01 pm)
Having the same problem as the other Luke, how perfect. Trying to sort it, will try and get an answer and post back here, in the mean time, other Luke, if you fixed it, mind posting up how? Save me a night fiddling no end!Thanks
*Edit*
Ok, 5 mins later and one site search. I have it working Luke mate, follow this tutorial. It doesn't seem to add much, but what it did seemed to work. Well, it was either that, or me copying my .wad and .jpg of my texture to several places. Have a play with where your textures are stored mate. Thinking about it, I think the .wad is only used for hammer.. not sure, will play.
#11
Torque needs the files you used to make the wad file.
Place the textures in the same directory as the dif file OR the directory above.
Torque supports the following formats for the texture files: GIF, JPG, PNG
01/18/2006 (9:01 am)
The wad file is only used by Hammer.Torque needs the files you used to make the wad file.
Place the textures in the same directory as the dif file OR the directory above.
Torque supports the following formats for the texture files: GIF, JPG, PNG
#12
02/01/2006 (9:08 pm)
This saved me a TON of time... Thanks for putting this up!
#13
** Executing...
** Command: 4
02/10/2006 (5:20 am)
I am doing something wrong, when I go to create the test room I get this error. I am guessing that it has something to do with the way I have set up my directories for the files.** Executing...
** Command: 4
#14
what location did you save the rmf file ?
02/10/2006 (7:02 am)
I had the same problem last week, I have no idea what is causing this !what location did you save the rmf file ?
#15
-v -h -o E:\Torque\SDK\example\VeynomShroud\data\interiors -t E:\Torque\SDK\example\VeynomShroud\data\interiors\textures $path\$file.$ext
03/09/2006 (9:03 pm)
this worked for me-v -h -o E:\Torque\SDK\example\VeynomShroud\data\interiors -t E:\Torque\SDK\example\VeynomShroud\data\interiors\textures $path\$file.$ext
#16
03/19/2006 (12:49 pm)
The link www.garagegames.com/mg/projects/tge/artist.php#DIF is broken. It doesn't do anything but give a blank page. Is that file still available?
#17
www.garagegames.com/mg/forums/result.thread.php?qt=32691
03/19/2006 (1:07 pm)
Try here, this is the Dif compiler that I currently use.www.garagegames.com/mg/forums/result.thread.php?qt=32691
#18
About textures---> be careful with your naming conventions.... textures that end in a number do not register properly and won't show up. I figured that one after a couple of head-aches.
03/24/2006 (9:33 am)
Great tutorial. It helps our team get a handle on creating artistic content.About textures---> be careful with your naming conventions.... textures that end in a number do not register properly and won't show up. I figured that one after a couple of head-aches.
#19
In the Options dialog, you must add a new game configuration and give it a name (like "Torque") by hitting the Edit button (I must say this is an obtuse design decision in an otherwise great editor). Then you must hit the Add button and browse for the aforementioned torque.fgd in the directory you created under the Hammer install.
04/02/2006 (8:23 pm)
The author left out a couple of steps in an otherwise very good write up. It may be because of things in a later release of Hammer, but here goes:In the Options dialog, you must add a new game configuration and give it a name (like "Torque") by hitting the Edit button (I must say this is an obtuse design decision in an otherwise great editor). Then you must hit the Add button and browse for the aforementioned torque.fgd in the directory you created under the Hammer install.
#20
04/22/2006 (11:52 am)
Does this work with version 3.4? Everytime I go to file/new It tell me I dont have a game configured and It opends the option box again. Then when I check the build programs tab, the CSG .exe I chose Is not there anymore. I basically did everything here. 
Torque Owner Greg Cushing