Entity Article Template

From Valve Developer Community
Revision as of 01:18, 1 September 2018 by Pinsplash (talk | contribs) (putting this back up, with some revisions)
Jump to navigation Jump to search

{{<game acronym> <point/brush>|<entity class name>}}

 
 Example {{css point|ammo_57mm}} 
   Results Counter-Strike: Sourceammo_57mm is a point entity available in Counter-Strike: Source.
Tip.pngTip:If the entity is available in all source games, use base as game acronym.

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 Hemmer 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
C++ In code, it is represented by theCEntityClassclass, defined in theentityfilefile.

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)

Tip.pngTip:See Category:Flag Templates for a list of available templates.
  • Integer value: Flag Name
Description if necessary.
  • 16: Start Silent
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.

Tip.pngTip:See Category:Keyvalue Templates for a list of available templates.
Keyvalue Name (non-SmartEdit name) ([todo internal name (i)]) <vartype>
A description of the keyvalue.
Render Amount (renderamt) ([todo internal name (i)]) <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

Tip.pngTip:See Category:Input Templates for a list of available templates.


InputName <optional vartype>
A description of the input.
SetSpeed <floatRedirectInput/float>
Set the speed of the train, as a ratio of max speed [0, 1]

Outputs

Tip.pngTip:See Category:Output Templates for a list of available templates.


OutputName
A description of the output.
OnPressed
Fired when the button is pressed.

See also

Note.pngNote:Add links to related articles, entities, or tutorials here.