-
Notifications
You must be signed in to change notification settings - Fork 36
Installation
This installation guide will cover how to install the hammer addons specifically for Portal 2. The methods should work for other games as well, just with different directory names.
Download the latest release from the releases tab. Extract the contents to somewhere convenient, for example to a HammerAddons
folder inside SteamLibrary
. It doesn't matter where, just note down the file path. This way multiple games can reuse the same install.
In hammer, open the expert compile window and add a new step to the compile configuration.
Move the new step underneath the vbsp
step. (postcompiler means it runs after (post) the bsp step).
Select the empty step and set the command to Executable
.
Navigate to postcompiler.exe
inside the extracted folder.
Set the command parameters to --propcombine $path/$file
. Make sure the step is ticked on. That's it!
If you want to copy the postcompiler exe elsewhere, note that it requires the binaries
and transforms
folders to be present alongside it to function.
To install the custom FGDs for Portal 2, copy and paste portal2.fgd
from the download into Portal 2/bin
. That's all there is to it!
Note: The custom FGDs load custom models in hammer for preview of certain entities (Like prop_portal
). To install, see Install hammer models.
Take note of the path to the hammer
folder inside the extracted Hammer Addons folder. The easiest way is to navigate inside the folder, then click on empty space in the address bar to allow copying it to the clipboard.
Open Portal 2/portal2/gameinfo.txt
and add Game "path/to/hammer/folder"
as the last line in the SearchPaths
.
Example:
"GameInfo"
{
game "PORTAL 2"
title "PORTAL 2"
GameData "portal2.fgd"
gamelogo 1
SupportsDX8 0
SupportsXbox360 1
FileSystem
{
SteamAppId 620
ToolsAppId 211
SearchPaths
{
Game |gameinfo_path|.
Game portal2_dlc2
Game portal2_dlc1
Game platform
Game "C:/Program Files/Steam/SteamLibrary/hammer_addons_v2.5.3_win64/hammer" # <----
}
}
}
That should be it!