Entity Article Template
You can help by adding links to this article from other relevant articles.
January 2024
{{lang}}
and {{entity}}
are both out of date.These are (optional) templates for the first text of an entity page. Find other useful templates at Help:Templates#Notice Templates.
*{{This is a|<entity type>|name=<entity classname>|game=<full game name>}}
|
Creates a first sentence with a link to the game.
Tip:If the entity is available in all Source games, don't use {{{game}}} . If available in multiple games, use {{{game1}}} (See the documentation of the template for details).Note:See the documentation of the template for the details of entity types.
| ||||
{{LanguageBar}} |
Adds the flags on the top right for language pages and adds this page to an appropriate language Category. | ||||
{{Distinguish |
Adds a note with a link to a page that this page should not be confused with. | ||||
{{Stub}} |
Adds a notice and a category for incomplete pages. | ||||
{{Ent not in fgd}} |
Adds a notice for entities that are not available in Hammer. Its text contains a link to a section "FGD Code" on the same page where code can be provided to make it available in Hammer. If it shouldn't add the parameter nolink=1 . If the entity is available in Hammer but not in the game, use {{Ent not in game}} .
|
Contents
Entity Description
This should be a plainly-worded but accurate description of the basic function of the entity. A very basic description for most entities is included in the help built into Hammer. If the description isn't overly long, omit the header and put it at the top with the first sentence on the page.
FGDs (and by extension the Hammer properties window) are good sources for information on an entity's keyvalues, inputs, outputs, and flags, however FGDs often will not list everything available for an entity. Because of this, the wiki uses a mix of templates that roughly follow the engine's class hierarchy and ones that follow FGDs.
Also include Template:Code class:
Example {{Code class
|CEntityClass
|entityfile
}}Results
The entity's code class name can be found by searching LINK_ENTITY_TO_CLASS
in the CPP file defining it.
Dedicated Console Variables and Commands (omit if none exist)
Console variables and commands can be found by searching ConVar
and ConCommand
in the CPP file that defines the entity. Note a parameter if any exist.
- cvar_name
- Description.
- sk_barney_health <integer>
- Barney's spawn health.
Flags (omit if none exist)
For each flag, write one of the following.
{{Fl
|<integer>
|<flag name>
}}
{{Fl
|<integer>
|<flag name>
|<description>
}}
Which could look like this:
Flag Name : [Integer value]
- Description if necessary.
Start Silent : [16]
- The map will start without this sound playing. Enabled by default.
Keyvalues
Since every entity inherits CBaseEntity
, all entity pages should have Template:KV BaseEntity if not more. The only exceptions are internal entities, which are removed during the compiling of a map and cannot receive I/O and most base keyvalues. This all applies to inputs and outputs as well.
Individual keyvalues are defined with Template:KV.
- Keyvalue Name
(non-SmartEdit name))
<vartype> - A description of the keyvalue.
- Render Amount
(renderamt)
<integer> - Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Inputs
Individual inputs (and outputs) are defined with Template:IO
InputName
<optional vartype>- A description of the input.
SetSpeed
<float>- Set the speed of the train, as a ratio of max speed [0, 1]
Outputs
OutputName
- A description of the output.
OnPressed
- Fired when the button is pressed.