1.2. TrenchBroom setup
The following steps will help you to set up MESS for TrenchBroom:
- 1.2.1. Downloading MESS
- 1.2.2. Adding the mess.fgd game data file
- 1.2.3. Adding the MESS.exe compile step
1.2.1. Downloading MESS
This guide assumes that you have downloaded MESS 1.2.2 and extracted the contents of the zip file to C:\HL\Tools\MESS\
. You should see the following files:
1.2.2. Adding the mess.fgd
game data file
Even though a game configuration in TrenchBroom can contain multiple fgd files, only one can be active at the same time. This can be solved by creating a single 'master' fgd file that includes all the other fgds:
-
Go to the
games\Halflife
folder in your TrenchBroom installation folder. -
Copy
C:\HL\Tools\MESS\mess.fgd
into this folder. -
Create a text file named
HalfLife_main.fgd
(or whatever name you prefer) and add the following lines:@include "HalfLife.fgd"
and@include "mess.fgd"
. If you're using the latest ZHLT or VHLT compile tools, then you should also includezhlt.fgd
here. -
Open
GameConfig.cfg
in a plain text editor, go to theentities
section and replace the"definitions": [ "HalfLife.fgd" ],
line with"definitions": [ "HalfLife_main.fgd" ],
. -
Finally, open
C:\HL\Tools\MESS\mess.config
and change the linefgd-path: {EXE_DIR}\mess.fgd
so it points to themess.fgd
file in your TrenchBroom'sgames\Halflife
folder. For example, if you installed TrenchBroom inC:\HL\Tools\TrenchBroom
, then the line should be changed tofgd-path: C:\HL\Tools\TrenchBroom\games\Halflife\mess.fgd
.
Your TrenchBroom's games\Halflife
folder should now contain at least the following files:
HalfLife_main.fgd
should contain at least the following lines:
And mess.config
's fgd-path
setting should look like this (depending on where you installed TrenchBroom):
1.2.3. Adding the MESS.exe
compile step
-
Open or create a map in TrenchBroom, then go to the
Run
menu and selectCompile Map...
. -
If you already have a compilation profile for Half-Life, continue with step 3. Else, you'll need to create one by pressing the small
+
button on the left. Change the name of the new profile to something likeHalf-Life
, then add the following tasks:-
An
Export Map
task with the following file path:${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map
(the-compile
part is important, because otherwise the source map file would be overwritten!). -
A
Run Tool
task. For the Tool Path, go to your compile tools folder and selecthlcsg_x64.exe
(orhlcsg.exe
). In the Parameters field, enter"${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map"
. You can also add additional CSG parameters here. -
A second
Run Tool
task forhlbsp_x64.exe
, with the same path in its Parameters field as the CSG task. -
A third
Run Tool
task forhlvis_x64.exe
, again with the same path in its Parameters field as in the previous tasks. -
A final
Run Tool
task forhlrad_x64.exe
, using the same path in its Parameters field as in the previous tasks. -
A
Rename File
task that copies${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.bsp
to${GAME_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.bsp
.
-
An
-
Add a new
Run Tool
task, and move it up to just before the CSG task. -
For the Tool Path, select
C:\HL\Tools\MESS\MESS.exe
. -
For the Parameters, enter
"${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map"
.
The Compile window should now look like this:
That's it! You're now ready to start using template entities and templates.