Template:Ent/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 22: Line 22:
|{{Doc/PreviewBlock|{{ent|Team Fortress 2.fgd|alt=tf.fgd}}}}
|{{Doc/PreviewBlock|{{ent|Team Fortress 2.fgd|alt=tf.fgd}}}}
|-
|-
|}
=== Entity Mode ===
{{Note|The template has still the old code of {{tl|point ent}} for compatibility with those page having not updated.}}
This mode is used to describe the basic information of a entity. See the following for usage.
{| class=standard-table | style="width:100%;"
|-
! Parameter
! Description
! Example
! Preview
|-
|align="center"|{{Code|{{param|type}}}}
| The type of the entity. The following types are available:
:* {{Code|e0}} - [[Point entity]]
:* {{Code|e1}} - [[Internal entity|Internal]] point entity
:* {{Code|e2}} - [[Brush entity]]
:* {{Code|e3}} - Internal brush entity
:* {{Code|e4}} - [[Mesh entity]] ({{source2}})
:* {{Code|e5}} - [[Path entity]] ({{source2}})
:* Default - Point entity
:* You can specify the entity type yourself. (See examples)
|
# {{CodeBlock|<nowiki>{{ent|mode=entity|type=''incredible entity''|engine=''Mosaic''}}</nowiki>}}
# {{CodeBlock|<nowiki>{{ent|mode=entity|type=e1|engine=3}}</nowiki>}}<br>
# {{CodeBlock|<nowiki>{{ent|mode=entity|type=e2|engine=1}}</nowiki>}}
|
# {{Doc/PreviewBlock|{{ent|mode=entity|type=''incredible entity''|engine=''Mosaic''}}}}
# {{Doc/PreviewBlock|{{ent|mode=entity|type=e1|engine=3}}}}
# {{Doc/PreviewBlock|{{ent|mode=entity|type=e2|engine=1}}}}
|-
|align="center"|{{Code|{{param|engine}}}}
| Which engine the entity belongs to.
:* {{Code|1}} - {{gldsrc|4}}
:* {{Code|2}} - {{source|4}}
:* {{Code|3}} - {{source2|4}}
:* Default - {{source|4}}
|
# {{CodeBlock|<nowiki>{{ent|mode=entity|type=e1|engine=3}}</nowiki>}}
# {{CodeBlock|<nowiki>{{ent|mode=entity|type=e1}}</nowiki>}}
|
# {{Documentation/PreviewBlock|{{ent|mode=entity|type=e1|engine=3}}}}
# {{Documentation/PreviewBlock|{{ent|mode=entity|type=e1}}}}
|-
|align="center"|{{Code|{{param|since}}}}
| This entity is available since this game. {{Note|Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).}}
| {{CodeBlock|<nowiki>{{ent|mode=entity|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{Documentation/PreviewBlock|{{ent|mode=entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|align="center"|{{Code|{{param|1}}}}
| The name of the entity. It will change the title of a page. {{Note|The template can't change the title when the {{tl|lang|}} is in use. }}{{workaround|Specify the {{param|title|tag=kbd}} of {{tl|lang}} to {{Code|<nowiki>{{Code|selected=1|<entity name>}}</nowiki>}}.}}
| {{CodeBlock|<nowiki>{{ent|mode=entity|type=e0|info_player_start}}</nowiki>}}
| {{Documentation/PreviewBlock|{{ent|mode=entity|type=e0|notitlechange=1|info_player_start}}}}
|-
|align="center"|{{Code|{{param|series}}}}
| The series that the entity is available in.
| {{CodeBlock|<nowiki>{{ent|mode=entity|type=e2|series=Counter-Strike}}</nowiki>}}
| {{Documentation/PreviewBlock|{{ent|mode=entity|type=e2|series=Counter-Strike}}}}
|-
|align="center"|{{Code|{{param|seriescs}}}}
| The series of Counter-Strike that the entity is available in.
| {{CodeBlock|<nowiki>{{ent|mode=entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}</nowiki>}}
| {{Documentation/PreviewBlock|{{ent|mode=entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}}}
|-
|align="center"|{{Code|{{param|game}}}}
| The game that the entity is available in. {{Note|Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).}}
| {{CodeBlock|<nowiki>{{ent|mode=entity|type=e5|game=Team Fortress 2}}</nowiki>}}
| {{Documentation/PreviewBlock|{{ent|mode=entity|type=e5|game=Team Fortress 2}}}}
|-
|align="center"|{{Code|{{param|notitlechange}}}}
| You can prevent title-changing from the template by using this parameter. Used in the {{Code|/doc}} page.
| {{CodeBlock|<nowiki>{{ent|mode=entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{Documentation/PreviewBlock|{{ent|mode=entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|align="center"|{{Code|{{param|suf}}}}
| Specify the language suffix. The template supports multi-language and you can add more languages that the template supports.
|
# {{CodeBlock|<nowiki>{{ent|mode=entity|suf=:zh-cn|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
# {{CodeBlock|<nowiki>{{ent|mode=entity|suf=:ru|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
|
# {{Documentation/PreviewBlock|{{ent|mode=entity|suf=:zh-cn|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
# {{Documentation/PreviewBlock|{{ent|mode=entity|suf=:ru|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|}
|}



Revision as of 04:35, 24 January 2023

Edit-copy.png
This is a documentation subpage for Template:Ent.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Parameter Description Example Preview
{{{1}}} The entity name should link and show.
{{ent|logic_relay}}
{{{2}}} Optionally, you can specify a second field of text to not be counted as a link.
{{ent|sv_cheats|1}}
{{{alt}}} The entity name should show. (Additionally, you can specify {{{alt}}} as a different name to show. )
{{ent|Team Fortress 2.fgd|alt=tf.fgd}}

See Also

  • {{Point ent}}
  • {{Base point multi}}
  • {{Brush ent}}
  • {{Base brush multi}}
  • {{Game name}}