Skip to content
TeamSpen210 edited this page Apr 3, 2023 · 3 revisions

Tweaks

In addition to new pseudo-entities, Hammer Addons' postcompiler has several features that improve existing entities.

Attachment Points

The parent name keyvalue allows additionally specifying an attachment point to attach to on spawn (maintaining offset), by setting the name to ent_name,attachment. This is not particularly obvious, and Hammer does not understand the notation (causing I/O completions to fail). Instead a new keyvalue was added to specify the attachment point independently.

Damage Type improvements

Damage type values allow controlling a number of different behaviours, by setting various bits in the type number. To make this easier, additional keyvalues have been added to separate these flags from the main damage type. During compilation these will all be combined.

game_text

This entity has the ability to display multiple lines of text, but this isn't normally specifiable in Hammer, because it converts \ to / whenever saving. The postcompiler will reverse /n to allow newlines to function.

Instance Proxies

Due to the way func_instance_io_proxy was implemented, each instance can only have a total of 30 inputs or outputs. Additional ones will be routed to non-existent inputs/outputs on the proxy entity, causing them to silently fail to function. By default, the postcompiler will redirect these outputs to additional proxy entities, allowing the instance to function normally. Alternatively, setting the following config option will remove the proxy entities entirely, collapsing the outputs into the calling entity:

"transform_opts"
    {
    "func_instance_io_proxy"
        {
        "collapse" "1"
        }
    }

logic_branch_listener Changes

With the postcompiler installed, logic_branch_listener gains a set of UniqueStateXXX inputs designed to make it easier to assemble logic setups. The way these inputs work is that for each entity that fires inputs to the listener, a new logic_branch is created, named and added to the listener. The outputs then get redirected to that new branch.

Clone this wiki locally