Template:This is a/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(update)
Line 12: Line 12:
! Preview
! Preview
|-
|-
|align="center"|<strong style=color:rgb(255,255,0)><nowiki>*</nowiki></strong>{{Code|{{param|type}}}}
|align="center"|<strong style=color:rgb(255,255,0)><nowiki>*</nowiki></strong>{{Code|style=1|{{param|type}}}}
| The type of the entity. The following types are available:
| The type of the entity. The following types are available:
:* {{Code|e0}} - [[Point entity]]
:* {{Code|e0}} - [[Point entity]]
Line 22: Line 22:
:* You can specify the entity type yourself. (See examples)
:* You can specify the entity type yourself. (See examples)
|
|
# {{CodeBlock|<nowiki>{{entity|type=''incredible entity''|engine=''Mosaic''}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=''incredible entity''|engine=''Mosaic''}}</nowiki>}}
# {{CodeBlock|<nowiki>{{entity|type=e1|engine=3}}</nowiki>}}<br>
{{CodeBlock|<nowiki>{{entity|type=e1|engine=3}}</nowiki>}}<br>
# {{CodeBlock|<nowiki>{{entity|type=e2|engine=1}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=e2|engine=1}}</nowiki>}}
|
|
# {{Doc/PreviewBlock|margin=5px|{{entity|type=''incredible entity''|engine=''Mosaic''}}}}
{{Capsule|style=2|margin=5px|{{entity|type=''incredible entity''|engine=''Mosaic''}}}}
# {{Doc/PreviewBlock|margin=5px|{{entity|type=e1|engine=3}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e1|engine=3}}}}
# {{Doc/PreviewBlock|margin=5px|{{entity|type=e2|engine=1}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e2|engine=1}}}}
|-
|-
|align="center"|{{Code|{{param|engine}}}}
|align="center"|{{Code|style=1|{{param|engine}}}}
| Which engine the entity belongs to.  
| Which engine the entity belongs to.  
:* {{Code|1}} - {{gldsrc|4}}
:* {{Code|1}} - {{gldsrc|4}}
Line 37: Line 37:
:* Default - {{source|4}}
:* Default - {{source|4}}
|
|
# {{CodeBlock|<nowiki>{{entity|type=e1|engine=3}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=e1|engine=3}}</nowiki>}}
# {{CodeBlock|<nowiki>{{entity|type=e1}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=e1}}</nowiki>}}
|
|
# {{Doc/PreviewBlock|margin=5px|{{entity|type=e1|engine=3}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e1|engine=3}}}}
# {{Doc/PreviewBlock|margin=5px|{{entity|type=e1}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e1}}}}
|-
|-
|align="center"|{{Code|{{param|except}}}}
|align="center"|{{Code|style=1|{{param|except}}}}
| This entity is available in all other games except this one. {{Note|Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).}}
| This entity is available in all other games except this one. {{Note|Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).}}{{Note|Works without {{Code|style=1|{{param|game}}}}.}}
| {{CodeBlock|<nowiki>{{entity|func_monitor|type=e2|except=Left 4 Dead series}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|func_monitor|type=e2|except=Left 4 Dead series}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|notitlechange=1|func_monitor|type=e2|except=Left 4 Dead series}}}}
| {{Capsule|style=2|margin=5px|{{entity|notitlechange=1|func_monitor|type=e2|except=Left 4 Dead series}}}}
|-
|-
|align="center"|{{Code|{{param|since}}}}
|align="center"|{{Code|style=1|{{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).}}
| 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).}}{{Note|Works without {{Code|style=1|{{param|game}}}}.}}
| {{CodeBlock|<nowiki>{{entity|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
| {{Capsule|style=2|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|-
|align="center"|{{Code|{{param|1}}}}
|align="center"|{{Code|style=1|{{param|1}}}}
| The name of the entity. It will change the title of a page. The default value is "This". You can specify it to {{Code|0}} to remove the entity name. {{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>}}.}}
| The name of the entity. It will change the title of a page. The default value is "This". You can specify it to {{Code|0}} to remove the entity name.  
| {{CodeBlock|<nowiki>{{entity|type=e0|info_player_start}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|type=e0|info_player_start}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start}}}}
| {{Capsule|style=2|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start}}}}
|-
|-
|align="center"|{{Code|{{param|series}}}}
|align="center"|{{Code|style=1|{{param|series}}}}
| The series that the entity is available in.
| The series that the entity is available in.
| {{CodeBlock|<nowiki>{{entity|type=e2|series=Counter-Strike}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|type=e2|series=Counter-Strike}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|type=e2|series=Counter-Strike}}}}
| {{Capsule|style=2|margin=5px|{{entity|type=e2|series=Counter-Strike}}}}
|-
|-
|align="center"|{{Code|{{param|seriescs}}}}
|align="center"|{{Code|style=1|{{param|seriescs}}}}
| The series of Counter-Strike that the entity is available in.
| The series of Counter-Strike that the entity is available in.
| {{CodeBlock|<nowiki>{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}}}
| {{Capsule|style=2|margin=5px|{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}}}
|-
|-
|align="center"|{{Code|{{param|game}}}}
|align="center"|{{Code|style=1|{{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).}}
| 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).}}{{Note|Works without {{Code|style=1|{{param|series}}}}.}}
| {{CodeBlock|<nowiki>{{entity|type=e5|game=Team Fortress 2}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|type=e5|game=Team Fortress 2}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|type=e5|game=Team Fortress 2}}}}
| {{Capsule|style=2|margin=5px|{{entity|type=e5|game=Team Fortress 2}}}}
|-
|-
|align="center"|{{Code|{{param|notitlechange}}}}
|align="center"|{{Code|style=1|{{param|notitlechange}}}}
| You can prevent title-changing from the template by using this parameter. Used in the {{Code|/doc}} page.
| You can prevent title-changing from the template by using this parameter. Used in the {{Code|/doc}} page.
| {{CodeBlock|<nowiki>{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{CodeBlock|<nowiki>{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{Doc/PreviewBlock|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
| {{Capsule|style=2|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|-
|align="center"|{{Code|{{param|suf}}}}
|align="center"|{{Code|style=1|{{param|suf}}}}
| Specify the language suffix. The template supports multi-language and you can add more languages that the template supports. The following languages are available:
| Specify the language suffix. The template supports multi-language and you can add more languages that the template supports. The following languages are available:
* {{en}} English: Default
* {{en}} English: Default
Line 85: Line 85:
{{Note|Some of the translations may be not fully complete.}}
{{Note|Some of the translations may be not fully complete.}}
|
|
# {{CodeBlock|<nowiki>{{entity|suf=:zh-cn|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|suf=:zh-cn|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
# {{CodeBlock|<nowiki>{{entity|suf=:ru|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|suf=:ru|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
|
|
# {{Doc/PreviewBlock|margin=5px|{{entity|suf=:zh-cn|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
{{Capsule|style=2|margin=5px|{{entity|suf=:zh-cn|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
# {{Doc/PreviewBlock|margin=5px|{{entity|suf=:ru|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
{{Capsule|style=2|margin=5px|{{entity|suf=:ru|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|-
|align="center"|{{Code|{{param|internal}}}}
|align="center"|{{Code|style=1|{{param|internal}}}}
|If enabled (value is {{Code|1}} or {{Code|true}}), the page will be added to [[:Category:Internal entities]] and "internal" will be displayed before "... entity".
|If enabled (value is {{Code|1}} or {{Code|true}}), the page will be added to [[:Category:Internal entities]] and "internal" will be displayed before "... entity".
{{Note|If {{Code|{{param|type|tag=kbd}}}} is a defined value (e.g. {{Code|e0}}), the parameter is invalid.}}
{{Note|If {{Code|style=1|{{param|type|tag=kbd}}}} is a defined value (e.g. {{Code|e0}}), the parameter is invalid.}}
|{{CodeBlock|<nowiki>{{entity|internal=1|type=entity}}</nowiki>}}
|{{CodeBlock|<nowiki>{{entity|internal=1|type=entity}}</nowiki>}}
|{{Doc/PreviewBlock|margin=5px|{{entity|internal=1|type=entity}}}}
|{{Capsule|style=2|margin=5px|{{entity|internal=1|type=entity}}}}
|-
|-
|align="center"|{{Code|{{param|cut}}}}
|align="center"|{{Code|style=1|{{param|cut}}}}
|If enabled, "cut" will be displayed before "(internal) ... entity"and the page will add to [[:Category:Cut Entities]].
|If enabled, "cut" will be displayed before "(internal) ... entity"and the page will add to [[:Category:Cut Entities]].
|{{CodeBlock|<nowiki>{{entity|internal=1|type=entity|cut=1}}</nowiki>}}
|{{CodeBlock|<nowiki>{{entity|internal=1|type=entity|cut=1}}</nowiki>}}
|{{Doc/PreviewBlock|margin=5px|{{entity|internal=1|type=entity|cut=1}}}}
|{{Capsule|style=2|margin=5px|{{entity|internal=1|type=entity|cut=1}}}}
|-
|-
|align="center"|{{Code|{{param|sprite}}}}
|align="center"|{{Code|style=1|{{param|sprite}}}}
|The icon of the entity:
|The icon of the entity:
*If {{Code|1}} is specified, the template will find the entity icon file based on the entity name (parameter {{Code|{{param|tag=kbd|1}}}}). (Follow the format of {{Code|<nowiki>[[File:<entity name>.png]]</nowiki>}} to find)
*If {{Code|1}} is specified, the template will find the entity icon file based on the entity name (parameter {{Code|style=1|{{param|1}}}}). (Follow the format of {{Code|<nowiki>[[File:<entity name>.png]]</nowiki>}} to find)
*If it is a custom value, the template will find the entity icon file according to the specified value. {{Note|File suffix name is required!}}
*If it is a custom value, the template will find the entity icon file according to the specified value. {{Note|File suffix name is required!}}
|{{CodeBlock|<nowiki>{{entity|logic_script|sprite=1|type=e0}}</nowiki>}}
|{{CodeBlock|<nowiki>{{entity|logic_script|sprite=1|type=e0}}</nowiki>}}
|{{Doc/PreviewBlock|margin=5px|{{entity|logic_script|sprite=1|type=e0|notitlechange=1}}}}
|{{Capsule|style=2|margin=5px|{{entity|logic_script|sprite=1|type=e0|notitlechange=1}}}}
|-
|-
|align="center"|{{Code|{{param|icon}}}}
|align="center"|{{Code|style=1|{{param|icon}}}}
|Make the game icon appear left-aligned.
|Make the game icon appear left-aligned.
*If {{Code|1}} is specified, the template will use {{Code|{{param|tag=kbd|game}}}} instead.
*If {{Code|1}} is specified, the template will use {{Code|style=1|{{param|tag=kbd|game}}}} instead.
*If it is a custom value, you need to enter the full name of the game. (Case sensitive)
*If it is a custom value, you need to enter the full name of the game. (Case sensitive)
*If {{Code|0}} is specified or the parameter is unused, the icon will appears in the text. (See the examples above.)
*If {{Code|0}} is specified or the parameter is unused, the icon will appears in the text. (See the examples above.)
|{{CodeBlock|<nowiki>{{entity|info_survivor_position|icon=Left 4 Dead series|type=e0|series=Left 4 Dead}}</nowiki>}}
|{{CodeBlock|<nowiki>{{entity|info_survivor_position|icon=Left 4 Dead series|type=e0|series=Left 4 Dead}}</nowiki>}}
|{{Doc/PreviewBlock|margin=5px|{{entity|info_survivor_position|type=e0|notitlechange=1|series=Left 4 Dead|icon=Left 4 Dead series}}}}
|{{Capsule|style=2|margin=5px|{{entity|info_survivor_position|type=e0|notitlechange=1|series=Left 4 Dead|icon=Left 4 Dead series}}}}
|-
|align="center"|{{Code|style=1|{{param|game1}}}} ~ {{Code|style=1|{{param|game5}}}}
|If this entity is available in multiple games, use these parameters to describe. {{Note|Once you have used the {{Code|style=1|{{param|game1}}}}, the style of the template will be changed. '''The {{Code|style=1|{{param|game}}}} is necessary for displaying the first game.'''}}
|{{CodeBlock|<nowiki>{{entity|type=e0|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2
|game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=e0|info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2}}</nowiki>}}
|{{Capsule|style=2|{{entity|type=e0|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2|game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive}}}}
{{Capsule|style=2|{{entity|type=e0|info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2|notitlechange=1}}}}
|-
|-
|}
|}

Revision as of 00:31, 23 February 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Edit-copy.png
This is a documentation subpage for Template:This is a.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

The template is the first sentence on each entity page that describes the basic information of an entity.

Parameters and Examples

*: Necessary parameters.

Parameter Description Example Preview
*{{{type}}} The type of the entity. The following types are available:
{{entity|type=''incredible entity''|engine=''Mosaic''}}
{{entity|type=e1|engine=3}}

{{entity|type=e2|engine=1}}
{{{engine}}} Which engine the entity belongs to.
{{entity|type=e1|engine=3}}
{{entity|type=e1}}
{{{except}}} This entity is available in all other games except this one.
Note.pngNote:Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).
Note.pngNote:Works without {{{game}}}.
{{entity|func_monitor|type=e2|except=Left 4 Dead series}}
{{{since}}} This entity is available since this game.
Note.pngNote:Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).
Note.pngNote:Works without {{{game}}}.
{{entity|type=e0|info_player_start|engine=1|since=Half-Life}}
{{{1}}} The name of the entity. It will change the title of a page. The default value is "This". You can specify it to 0 to remove the entity name.
{{entity|type=e0|info_player_start}}
{{{series}}} The series that the entity is available in.
{{entity|type=e2|series=Counter-Strike}}
{{{seriescs}}} The series of Counter-Strike that the entity is available in.
{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}
{{{game}}} The game that the entity is available in.
Note.pngNote:Should be the full name of the game, not a abbreviation (So templates can link to multilingual pages according to the language suffix).
Note.pngNote:Works without {{{series}}}.
{{entity|type=e5|game=Team Fortress 2}}
{{{notitlechange}}} You can prevent title-changing from the template by using this parameter. Used in the /doc page.
{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}
{{{suf}}} Specify the language suffix. The template supports multi-language and you can add more languages that the template supports. The following languages are available:
  • English English: Default
  • Русский Russian:
ru (need update)
  • 简体中文 Simplified Chinese:
zh-cn
Note.pngNote:Some of the translations may be not fully complete.
{{entity|suf=:zh-cn|type=e0|info_player_start|engine=1|since=Half-Life}}
{{entity|suf=:ru|type=e0|info_player_start|engine=1|since=Half-Life}}
{{{internal}}} If enabled (value is 1 or true), the page will be added to Category:Internal entities and "internal" will be displayed before "... entity".
Note.pngNote:If {{{type}}} is a defined value (e.g. e0), the parameter is invalid.
{{entity|internal=1|type=entity}}
{{{cut}}} If enabled, "cut" will be displayed before "(internal) ... entity"and the page will add to Category:Cut Entities.
{{entity|internal=1|type=entity|cut=1}}
{{{sprite}}} The icon of the entity:
  • If 1 is specified, the template will find the entity icon file based on the entity name (parameter {{{1}}}). (Follow the format of [[File:<entity name>.png]] to find)
  • If it is a custom value, the template will find the entity icon file according to the specified value.
    Note.pngNote:File suffix name is required!
{{entity|logic_script|sprite=1|type=e0}}
{{{icon}}} Make the game icon appear left-aligned.
  • If 1 is specified, the template will use {{{game}}} instead.
  • If it is a custom value, you need to enter the full name of the game. (Case sensitive)
  • If 0 is specified or the parameter is unused, the icon will appears in the text. (See the examples above.)
{{entity|info_survivor_position|icon=Left 4 Dead series|type=e0|series=Left 4 Dead}}
{{{game1}}} ~ {{{game5}}} If this entity is available in multiple games, use these parameters to describe.
Note.pngNote:Once you have used the {{{game1}}}, the style of the template will be changed. The {{{game}}} is necessary for displaying the first game.
{{entity|type=e0|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2 |game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive}}
{{entity|type=e0|info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2}}

See Also

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