Entity Article Template: Difference between revisions
(blanking for now) |
(subbing) |
||
Line 1: | Line 1: | ||
{{ | <nowiki>{{<game acronym> <point/brush>|<entity class name>}}</nowiki> | ||
{{syntax2 | |||
|in=<nowiki>{{css point|ammo_57mm}}</nowiki> | |||
|out={{point ent|ammo_57mm|game=Counter-Strike: Source|icon=css}} | |||
}} | |||
{{tip|If the entity is available in all source games, use <code>base</code> 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. | |||
[[FGD]]s (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 [[Help:Templates|templates]] that roughly follow the engine's class hierarchy and ones that follow FGDs. | |||
Also include [[:Template:Code class]]: | |||
{{syntax2 | |||
|in=<nowiki>{{code class|CEntityClass|entityfile}}</nowiki> | |||
|out={{code class|CEntityClass|entityfile}} | |||
}} | |||
The entity's code class name can be found by searching <code>LINK_ENTITY_TO_CLASS</code> in the CPP file defining it. | |||
==Dedicated Console Variables and Commands (omit if none exist)== | |||
Console variables and commands can be found by searching <code>ConVar</code> and <code>ConCommand</code> in the CPP file that defines the entity. Note a parameter if any exist. | |||
;cvar_name <data type> | |||
:Description. | |||
;sk_barney_health <integer> | |||
:Barney's spawn health. | |||
==Flags (omit if none exist)== | |||
{{tip|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 {{ent|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|See [[:Category:Keyvalue Templates]] for a list of available templates.}} | |||
{{KV|Keyvalue Name (non-SmartEdit name)|vartype|A description of the keyvalue.}} | |||
{{KV|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]] | |||
{{tip|See [[:Category:Input Templates]] for a list of available templates.}} | |||
{{IO|InputName|A description of the input.|param=optional vartype}} | |||
{{IO|SetSpeed|Set the speed of the train, as a ratio of max speed [0, 1]|param=float}} | |||
==Outputs== | |||
{{tip|See [[:Category:Output Templates]] for a list of available templates.}} | |||
{{IO|OutputName|A description of the output.}} | |||
{{IO|OnPressed|Fired when the button is pressed.}} | |||
==See also== | |||
{{note|Add links to related articles, entities, or tutorials here.}} | |||
*[[Assaults]] | |||
*{{ent|ambient_generic}} | |||
[[Category:Entities]] |
Revision as of 01:15, 1 September 2018
{{<game acronym> <point/brush>|<entity class name>}}
Example
{{css point|ammo_57mm}}
Results
Template:Point ent

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
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)

- 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.

- 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

- 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.
See also
