Tutorial: Setting up TrenchBroom for Half-Life and its mods Last edited 11 months ago2023-05-22 22:10:58 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.

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 filesPlace 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 fileall.fgd file
3. Launch TrenchBroom -> Open preferences... -> Half-Life -> Select Half Life directory (nor valve, not gearbox, just root directory of HL). Apply, OK.
User posted image
4. On "Select Game" screen - select "Half Life", map format - "Valve"
User posted image
5. Map editor will be opened. Click "Entity" on top right corner. Select on bottom - External -> Browse, choose our all.fgd file.
caption textcaption 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
User posted image
User posted image
That's all for OpFor \ mods

Setting up compiling tools

In TrenchBroom:
Select "Run" -> "Compiling tools"
Click on plus icon and setup like on screenshot.
User posted image
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
User posted image
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. *

Comments

You must log in to post a comment. You can login or register a new account.