hl.exe
is located. By default, this is C:\Program Files (x86)\Steam\steamapps\common\Half-Life
.hl.sh
is located. By default, this is $HOME/.steam/steam/steamapps/common/Half-Life
($HOME
is the environment variable that is the path to your personal Unix user folder which is usually /home/<Unix user>
).func_vehicle
etc.)TrenchBroom.exe
is located.TrenchBroom.app/Contents/Resources
<prefix>/share/trenchbroom
, where <prefix>
is the installation prefix.games/Halflife
.
TrenchBroom comes with a basic Half-Life FGD, however we also need zhlt.fgd
. Without it, we wouldn't have certain special entities like func_detail.
Now, there is a problem. TrenchBroom cannot load multiple FGD files at once. For that, we'll create a combined FGD. Do the following:halflife_zhlt.fgd
// Combined Half-Life and ZHLT FGD
@include "zhlt.fgd"
@include "HalfLife.fgd"
4. Lastly, open GameConfig.cfg
, go to line 18, and change it as follows:
"entities": {
"definitions": [ "HalfLife.fgd" ],
"defaultcolor": "0.6 0.6 0.6 1.0",
"setDefaultProperties": true
},
"entities": {
"definitions": [ "halflife_zhlt.fgd" ],
"defaultcolor": "0.6 0.6 0.6 1.0",
"setDefaultProperties": true
},
halflife_zhlt.fgd
by default, so you don't have to switch to it every time.Half-Life/valve/halflife.wad
) and open it.
TrenchBroom will ask you if you want to build a relative path to the WAD, or use an absolute path. Prefer relative paths if they are in your game folder. If they are elsewhere, such as E:/GoldSrcMapping/textures/zhlt.wad
, definitely use absolute paths.
${GAME_DIR_PATH}
${WORK_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.map
<path to VHLT>/HL-CSG.exe
"${WORK_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.map" -nowadtextures -clipeconomy
<path to VHLT>/HL-BSP.exe
"${WORK_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.map" -chart
<path to VHLT>/HL-VIS.exe
"${WORK_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.map"
<path to VHLT>/HL-RAD.exe
"${WORK_DIR_PATH}/${MODS[-1]}/maps/${MAP_BASE_NAME}.map" -chart
xcopy mymap.map "C:/Program Files (x86)/Steam/steamapps/common/Half-Life/valve/maps"
"C:/VHLT/HL-CSG.exe" "C:/Program Files (x86)/Steam/steamapps/common/Half-Life/valve/maps/mymap.map" -nowadtextures -clipeconomy
"C:/VHLT/HL-BSP.exe" "C:/Program Files (x86)/Steam/steamapps/common/Half-Life/valve/maps/mymap.map" -chart
"C:/VHLT/HL-VIS.exe" "C:/Program Files (x86)/Steam/steamapps/common/Half-Life/valve/maps/mymap.map"
"C:/VHLT/HL-RAD.exe" "C:/Program Files (x86)/Steam/steamapps/common/Half-Life/valve/maps/mymap.map" -chart
Here's a Linux equivalent:
cp mymap.map $HOME/.steam/steamapps/common/Half-Life/valve/maps
$HOME/VHLT/hlcsg $HOME/.steam/steamapps/common/Half-Life/valve/maps/mymap.map -nowadtextures -clipeconomy
$HOME/VHLT/hlbsp $HOME/.steam/steamapps/common/Half-Life/valve/maps/mymap.map -chart
$HOME/VHLT/hlvis $HOME/.steam/steamapps/common/Half-Life/valve/maps/mymap.map
$HOME/VHLT/hlrad $HOME/.steam/steamapps/common/Half-Life/valve/maps/mymap.map -chart
In the end, you should see something like this in the compile log:
Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 1/512 64/32768 ( 0.2%)
planes 20/32768 400/655360 ( 0.1%)
vertexes 20/65535 240/786420 ( 0.0%)
nodes 6/32767 144/786408 ( 0.0%)
texinfos 4/32767 160/1310680 ( 0.0%)
faces 16/65535 320/1310700 ( 0.0%)
* worldfaces 16/32768 0/0 ( 0.0%)
clipnodes 18/32767 144/262136 ( 0.1%)
leaves 2/32760 56/917280 ( 0.0%)
* worldleaves 1/8192 0/0 ( 0.0%)
marksurfaces 16/65535 32/131070 ( 0.0%)
surfedges 68/512000 272/2048000 ( 0.0%)
edges 35/256000 140/1024000 ( 0.0%)
texdata [variable] 67732/33554432 ( 0.2%)
lightdata [variable] 7860/50331648 ( 0.0%)
visdata [variable] 1/8388608 ( 0.0%)
entdata [variable] 319/2097152 ( 0.0%)
* AllocBlock 1/64 0/0 ( 1.6%)
3 textures referenced
=== Total BSP file data space used: 77884 bytes ===
Wad files required to run the map: (None)
0.09 seconds elapsed
----- END hlrad -----
#### Finished with exit status 0
You should now be able to see a BSP file in Half-Life's maps folder. You may then launch Half-Life, open the console and execute map mymap
, or whatever the filename of your map is.
GameConfig.cfg
."compilationTools": [
{ "name": "csg"},
{ "name": "bsp"},
{ "name": "vis"},
{ "name": "light"}
]
${csg}
, ${bsp}
, ${vis}
and ${light}
instead of <path to VHLT>/toolname.exe
when creating a compile task.
<ResourcePath>
since its location varies between platforms. Thus, GameConfig.cfg
and the FGDs we modified earlier are in currently in <ResourcePath>/games/Halflife
.The folderWell, where should we keep our configs then?<ResourcePath>/games
contains a.cfg
file for each supported game, and additional folders which can contain additional resources related to the game such as icons, palettes or entity definition files.
It is not recommended to change these builtin game configurations, as they will be overwritten when an update is installed. [emphasis added]
To modify the existing game configurations or to add new configurations, you can place them in the folderWhat the manual proposes is to override the configurations - TrenchBroom will automatically substitute files in<UserDataPath>/games
, where the value of<UserDataPath>
is again platform dependent.
<ResourcePath>
for files in <UserDataPath>
, if they have the same names.C:\Users\<username>\AppData\Roaming\TrenchBroom
~/Library/Application Support/TrenchBroom
~/.TrenchBroom
<UserDataPath>
by clicking the folder icon near the bottom-left corner of the Preferences menu.
If you've followed the guide so far, all you have to do now is copy the files from <ResourcePath>/games/Halflife
to <UserDataPath>/games/Halflife
, and make any further changes you want over there.
Failed to parse included file: At line 1753, column 222: Expected '[', but got ':' (raw data: ':') (line 1753)
If so, check your FGDs for things such as:
@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 make sure to delete the rightmost part:
: "http://twhl.info/wiki.php?id=162"
The FGD format is not very standardized, each map editor adds its own extensions to it. TrenchBroom does not support J.A.C.K.'s extensions, which was used in this example. This makes it quite tedious to port a J.A.C.K. FGD to TrenchBroom.
----- BEGIN hlrad -----
Command line: E:\Workfolders\Half-Life\VHLT-ADM-v35\ADM-RAD.exe "D:\Program Files (x86)\Steam\steamapps\common\Half-Life/valve/maps/twhl_tut_1.map" -chart
Arguments: "D:\Program Files (x86)\Steam\steamapps\common\Half-Life/valve/maps/twhl_tut_1.map" -chart -low
>> There was a problem compiling the map.
>> Check the file D:\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\maps\twhl_tut_1.log for the cause.
----- END hlrad -----
Do not panic. Simply scroll all the way up, and read the compile log from the beginning. Have a look at Tutorial: Diagnosing Problems, or ask for help. Everything will be fine.You must log in to post a comment. You can login or register a new account.
From the github release: