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.4. Different game configurations
This setup guide assumes that you're making maps for Half-Life or Counter-Strike, but MESS can also be used for other games that use the Valve 220 .map format, such as Quake. Step 4 explains how to disable template entities and scripts that are specific to Half-Life.
1.2.1. Downloading MESS
This guide assumes that you have downloaded MESS 1.2.3 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:
If you're making maps for Half-Life or Counter-Strike then you're ready to start using template entities and templates. For other games, continue with step 4 to create a game-specific configuration.
1.2.4. Different game configurations
MESS contains a number of template entities and behaviors (automation scripts) that were made specifically for Half-Life and Counter-Strike. If you're making maps for a different game then it's recommended to disable these:
-
Create a copy of
mess.config
and give it the name of the game you're mapping for, for examplequake.config
. -
Open this new config file in a text editor and search for the line that says
template-entity-directories:
. There are several directories listed below that line. Remove themess_template_library
andcs
lines and save your config file.: -
In TrenchBroom, open the Compile window and add
-config quake
to the parameters in theMESS.exe
task. The parameters box should now contain:-config quake "${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map"
: -
Run the compile process (or open a console window and run
MESS.exe -config quake
). This will remove Half-Life and Counter-Strike specific entities from yourmess.fgd
file. You may need to restart TrenchBroom to see the fgd changes.
That concludes the setup for your game. Take a look at the macro entities and tutorials to get started.