How to setup TrenchBroom for Half-Life, Opposing Force and other mods
1. Get fgd files -
zhlt.fgd, HalfLife.fgd, halflife-op4.fgd (optional), fgd of your mod and place in - TrenchBroom\games\Halflife
Place fgd files
2. Create new file - all.fgd (or any other name) with this lines:
@include "zhlt.fgd"
@include "HalfLife.fgd"
// @include "halflife-op4.fgd" <- uncomment if you want to create maps for Opposing Force
include additional mod files here too
all.fgd file
3. Launch TrenchBroom -> Open preferences... -> Half-Life -> Select Half Life directory (nor valve, not gearbox, just root directory of HL). Apply, OK.
4. On "Select Game" screen - select "Half Life", map format - "Valve"
5. Map editor will be opened. Click "Entity" on top right corner. Select on bottom - External -> Browse, choose our all.fgd file.
caption text
That's all for HL!
For Opposing Force and other mods
6. For OpFor click on "Map" at top right corner, at bottom select in MODS -> gearbox, click 2 times. For other mod select your mod and click 2 times
That's all for OpFor \ mods
In TrenchBroom:
Select "Run" -> "Compiling tools"
Click on plus icon and setup like on screenshot.
Commands list:
Name: Standart
Working directory: ${MAP_DIR_PATH}
Export Map
${WORK_DIR_PATH}/${MAP_BASE_NAME}.map
Run Tool
path to CSG -> example F:/J.A.C.K. HL1/compile_tools/sdHLCSG_x64.exe
Run Tool
path to BSP -> example F:/J.A.C.K. HL1/compile_tools/sdHLBSP_x64.exe
Run Tool
path to VIS -> example F:/J.A.C.K. HL1/compile_tools/sdHLVIS_x64.exe
Run Tool
path to RAD -> example F:/J.A.C.K. HL1/compile_tools/sdHLRAD_x64.exe
Optional - deleting temp files:
Delete Files
${WORK_DIR_PATH}/${MAP_BASE_NAME}.ext
Delete Files
${WORK_DIR_PATH}/${MAP_BASE_NAME}.log
Delete Files
${WORK_DIR_PATH}/${MAP_BASE_NAME}.prt
Delete Files
${WORK_DIR_PATH}/${MAP_BASE_NAME}.wa_
Troubleshooting
If at stage 5 you have errors like this:
Failed to parse included file: At line 1753, column 222: Expected '[', but got ':' (raw data: ':') (line 1753)
Check your fgd files for things like
@SolidClass = worldspawn : "This is the world entity. Each map can only contain one, and it's automatically created for you." : "http://twhl.info/wiki.php?id=162"
and delete
: "http://twhl.info/wiki.php?id=162"
that will do the trick
If editor is too bright for you or you want it to be like JACK
View -> Preferences -> View -> Brightness to 0
Layout - four Panes
By the way you can change view by clicking space in editor.
*To get familiar with TrenchBroom - you can watch some tutorials from @dumptruckds on Youtube. *
From the github release: