Skip to content
Kelsey edited this page Jul 17, 2024 · 9 revisions

Manual 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 HammerAddons

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.

Install postcompiler

Step 1

In hammer, open the expert compile window and add a new step to the compile configuration.

Image showcasing where the "new" button is located in the compile dialog. Many people seem to not be able to find it, so this illustration should hopefully make it clear

Step 2

Move the new step underneath the vbsp step. (postcompiler means it runs after (post) the bsp step).

The viewer can hereby see which button is used to move the step around

Step 3

Select the empty step and set the command to Executable.

This image illustrates where one can select the setting "executable"

Step 4

Navigate to postcompiler.exe inside the extracted folder.

Yes it's dark theme

Step 5

Set the command parameters to --propcombine $path/$file. Make sure the step is ticked on. That's it!

Shows how to copy paste stuff from the readme

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.

Install custom fgd

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.

Install hammer models

Step 1

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.

Step 1

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!