Skip to content

How to create a BEE2 Brush Template

Konclan edited this page Sep 3, 2022 · 1 revision

Note: This guide assumes you have a basic knowledge of Hammer, Instances, vbsp_config and an already existing item in BEE2. I also suggest downloading TSpen's Hammer Addons.

Note: There are easier alternatives to make an item change depending on the portability of the ground, like the ItemButtonFloor or an Overlay. However, this one will use the proper texture of the ground and style automatically.


A BEE2 Brush Template is a customizable brush template that you can add to any instance in PeTI with the help of vbsp_config.cfg. It detects the texture the ground is using and adds it to the faces of the brushes that you selected in the template.

An example of a brush template, used by the cube dropper

An example of a brush template, used by the cube dropper.

Creating the brushes

First of all, open the instance your item is using with Hammer. If you haven't already created the brushes you want to add to the template, create them here, so you can make sure it fits well with the instance.

The instance with the brushes

Creating the template

Now, using Ctrl and CLick, select all of the brushes you want to have in your template. After making sure you selected them all, just Ctrl + X. If you forgot a brush, just Ctrl + Z, select it too and Ctrl + X. Don't forget to save.

The instance with the brushes The instance without the brushes

Create a new .vmf and, on the 2D view, do a Right-Click and select "Paste Special". Make sure the window looks like this and click "Ok". It should paste your brushes at the exact same positions, like this.

The settings should look like this The brushes

Setting up the template

Add an entity with the class bee2_template_conf. In the Template ID property, put your unique ID, like "temp_my_own_brush_template". In the Realign Faces property, use the "Pick" button to select the faces you want to be changed according to the ground texture. Use Ctrl to multi-select the faces. The faces you do not select won't be changed. There's no need to change the rest of the properties for something this simple.

The properties should look like this

Save it with any name you want in (your package)/templates/. For BEE2 to detect it, add this block in the info.txt. I suggest putting it under the item this brush template belongs to for better organization.

"BrushTemplate"
	{
	"ID"    "TEMP_RADELITE_EMBEDDED_BUTTON"
	"file"  "embeddedbutton_base.vmf"
	}

Using the template

In the vbsp_config.cfg, just use the condition you want, and add your brush template as a result. Force will determine the color it will use, black or white.

"TemplateBrush"
	{
	"ID"            "TEMP_RADELITE_EMBEDDED_BUTTON"
	"Force"         "black"
	}

Example:

"Conditions"
{
	"Condition"
	{
		"OR"
		{
			"instance" "<ITEM_EMBEDDED_BUTTONS:weighted_black>"
			"instance" "<ITEM_EMBEDDED_BUTTONS:cube_black>"
		}
		"Result"
		{
			"TemplateBrush"
			{
				"ID"            "TEMP_RADELITE_EMBEDDED_BUTTON"
				"Force"         "black"
			}
		}
	}
	"Condition"
	{
		"OR"
		{
			"instance" "<ITEM_EMBEDDED_BUTTONS:weighted_white>"
			"instance" "<ITEM_EMBEDDED_BUTTONS:cube_white>"
		}
		"Result"
		{
			"TemplateBrush"
			{
				"ID"            "TEMP_RADELITE_EMBEDDED_BUTTON"
				"Force"         "white"
			}
		}
	}
}

Thank you for reading, and good luck with your item!

Clone this wiki locally