Template:This is a/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Equalizer5118 moved page Template:Entity/doc to Template:Format/doc)
mNo edit summary
Line 1: Line 1:
{{Doc/subpage}}
{{Doc/subpage}}
The template is the first sentence on each [[Entity Article Template|entity page]] that describes the basic information of an [[entity]].<br>
This template is the master format page for all Entity, Console command/variable, and Shader pages. Each page should have this at the beginning to describe the basic info about each one, such as what they are and their availability.
In addition, it can create basic information that describes things like [[Developer_Console#Submitting|console variable]]s.


== Parameters and Examples ==
== Parameters and Examples ==
Line 29: Line 28:
* {{Code|s1}}, {{code|vertex shader}} - [[Shader#Vertex shaders]]
* {{Code|s1}}, {{code|vertex shader}} - [[Shader#Vertex shaders]]
Miscellaneous:
Miscellaneous:
* Custom (You can specify the entity type yourself. See examples)
* Custom (You can specify the type yourself. See examples)
{{Note|Template will not add entity categories and change titles when using non-entity type (such as {{Code|convar}}).}}
{{Note|Template will not add entity categories and change titles when using non-entity type (such as {{Code|convar}}).}}
|
|
{{CodeBlock|<nowiki>{{entity|type=''incredible entity''|engine=''Mosaic''}}</nowiki>}}
{{CodeBlock|<nowiki>{{format|type=''incredible entity''|engine=''Mosaic''}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=e1|engine=3}}</nowiki>}}<br>
{{CodeBlock|<nowiki>{{format|type=e1|engine=3}}</nowiki>}}<br>
{{CodeBlock|<nowiki>{{entity|type=e2|engine=1}}</nowiki>}}
{{CodeBlock|<nowiki>{{format|type=e2|engine=1}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=convar|sv_cheats}}</nowiki>}}
{{CodeBlock|<nowiki>{{format|type=convar|sv_cheats}}</nowiki>}}
{{CodeBlock|<nowiki>{{format|type=s0|LightmappedGeneric}}</nowiki>}}
|
|
{{Capsule|style=2|margin=5px|{{entity|type=''incredible entity''|engine=''Mosaic''}}}}
{{Capsule|style=2|margin=5px|{{format|type=''incredible entity''|engine=''Mosaic''}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e1|engine=3}}}}
{{Capsule|style=2|margin=5px|{{format|type=e1|engine=3}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e2|engine=1}}}}
{{Capsule|style=2|margin=5px|{{format|type=e2|engine=1}}}}
{{Capsule|style=2|margin=5px|{{entity|type=convar|sv_cheats|notitlechange=1}}}}
{{Capsule|style=2|margin=5px|{{format|type=convar|sv_cheats|notitlechange=1}}}}
{{Capsule|style=2|margin=5px|{{format|type=s0|LightmappedGeneric|notitlechange=1}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|engine}}}}
|align="center"|{{Code|style=1|{{param|engine}}}}
| Which engine the entity belongs to.  
| Which engine the subject belongs to.  
:* Default - {{source|4}} (same as {{Code|2}})
:* Default - {{source|4}} (same as {{Code|2}})
:* {{Code|1}}, {{Code|gldsrc}} - {{gldsrc|4}}
:* {{Code|1}}, {{Code|gldsrc}} - {{gldsrc|4}}
Line 49: Line 50:
:* {{Code|3}}, {{Code|source2}} - {{source2|4}}
:* {{Code|3}}, {{Code|source2}} - {{source2|4}}
|
|
{{CodeBlock|<nowiki>{{entity|type=e1|engine=3}}</nowiki>}}
{{CodeBlock|<nowiki>{{format|type=e1|engine=3}}</nowiki>}}
{{CodeBlock|<nowiki>{{entity|type=e1}}</nowiki>}}
{{CodeBlock|<nowiki>{{format|type=e1}}</nowiki>}}
|
|
{{Capsule|style=2|margin=5px|{{entity|type=e1|engine=3}}}}
{{Capsule|style=2|margin=5px|{{format|type=e1|engine=3}}}}
{{Capsule|style=2|margin=5px|{{entity|type=e1}}}}
{{Capsule|style=2|margin=5px|{{format|type=e1}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|except}}}}
|align="center"|{{Code|style=1|{{param|except}}}}
| This entity is available in all other games except this one. {{Note|Works without {{Code|style=1|{{param|game}}}}.}}
| This is available in all other games except this one. {{Note|Works without {{Code|style=1|{{param|game}}}}.}}
| {{CodeBlock|<nowiki>{{entity|func_monitor|type=e2|except=Left 4 Dead series}}</nowiki>}}
| {{CodeBlock|<nowiki>{{format|func_monitor|type=e2|except=Left 4 Dead series}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|notitlechange=1|func_monitor|type=e2|except=Left 4 Dead series}}}}
| {{Capsule|style=2|margin=5px|{{format|notitlechange=1|func_monitor|type=e2|except=Left 4 Dead series}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|since}}}}
|align="center"|{{Code|style=1|{{param|since}}}}
| This entity is available since this game. {{Note|Works without {{Code|style=1|{{param|game}}}}.}}
| This is available since this game. {{Note|Works without {{Code|style=1|{{param|game}}}}.}}
| {{CodeBlock|<nowiki>{{entity|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{CodeBlock|<nowiki>{{format|type=e0|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
| {{Capsule|style=2|margin=5px|{{format|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|-
|align="center"|{{Code|style=1|{{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.  
| The name of the subject. 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>{{format|type=e0|info_player_start}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start}}}}
| {{Capsule|style=2|margin=5px|{{format|type=e0|notitlechange=1|info_player_start}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|series}}}}
|align="center"|{{Code|style=1|{{param|series}}}}
| The series that the entity is available in.
| The series that the subject is available in.
| {{CodeBlock|<nowiki>{{entity|type=e2|series=Counter-Strike}}</nowiki>}}
| {{CodeBlock|<nowiki>{{format|type=e2|series=Counter-Strike}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|type=e2|series=Counter-Strike}}}}
| {{Capsule|style=2|margin=5px|{{format|type=e2|series=Counter-Strike}}}}
|-
|-
|align="center"|{{Code|style=1|{{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 subject is available in.
| {{CodeBlock|<nowiki>{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}</nowiki>}}
| {{CodeBlock|<nowiki>{{format|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}}}
| {{Capsule|style=2|margin=5px|{{format|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|game}}}}
|align="center"|{{Code|style=1|{{param|game}}}}
| The game that the entity is available in. {{Note|Works without {{Code|style=1|{{param|series}}}}.}}
| The game that the subject is available in. {{Note|Works without {{Code|style=1|{{param|series}}}}.}}
| {{CodeBlock|<nowiki>{{entity|type=e5|game=Team Fortress 2}}</nowiki>}}
| {{CodeBlock|<nowiki>{{format|type=e5|game=Team Fortress 2}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|type=e5|game=Team Fortress 2}}}}
| {{Capsule|style=2|margin=5px|{{format|type=e5|game=Team Fortress 2}}}}
|-
|-
|align="center"|{{Code|style=1|{{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>{{format|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{entity|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
| {{Capsule|style=2|margin=5px|{{format|type=e0|notitlechange=1|info_player_start|engine=1|since=Half-Life}}}}
|-
|-
|align="center"|{{Code|style=1|{{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|style=1|{{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>{{format|internal=1|type=entity}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{entity|internal=1|type=entity}}}}
|{{Capsule|style=2|margin=5px|{{format|internal=1|type=entity}}}}
|-
|-
|align="center"|{{Code|style=1|{{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>{{format|internal=1|type=entity|cut=1}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{entity|internal=1|type=entity|cut=1}}}}
|{{Capsule|style=2|margin=5px|{{format|internal=1|type=entity|cut=1}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|sprite}}}}
|align="center"|{{Code|style=1|{{param|sprite}}}}
Line 105: Line 106:
*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 {{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>{{format|logic_script|sprite=1|type=e0}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{entity|logic_script|sprite=1|type=e0|notitlechange=1}}}}
|{{Capsule|style=2|margin=5px|{{format|logic_script|sprite=1|type=e0|notitlechange=1}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|icon}}}}
|align="center"|{{Code|style=1|{{param|icon}}}}
Line 113: Line 114:
*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>{{format|info_survivor_position|icon=Left 4 Dead series|type=e0|series=Left 4 Dead}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{entity|info_survivor_position|type=e0|notitlechange=1|series=Left 4 Dead|icon=Left 4 Dead series}}}}
|{{Capsule|style=2|margin=5px|{{format|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}}}}
|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.'''}}{{Note|Works without {{Code|style=1|{{param|series}}}}.}}
|If this 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.'''}}{{Note|Works without {{Code|style=1|{{param|series}}}}.}}
|{{CodeBlock|<nowiki>{{entity|type=e0|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2
|{{CodeBlock|<nowiki>{{format|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>}}
|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>}}
{{CodeBlock|<nowiki>{{format|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|{{format|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}}}}
{{Capsule|style=2|{{format|type=e0|info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2|notitlechange=1}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|nocat}}}}
|align="center"|{{Code|style=1|{{param|nocat}}}}
|Don't place any categories.
|Don't place any categories.
|{{CodeBlock|<nowiki>{{entity|info_player_start|type=e0|nocat=1}}</nowiki>}}
|{{CodeBlock|<nowiki>{{format|info_player_start|type=e0|nocat=1}}</nowiki>}}
|align="center"|N/A
|align="center"|N/A
|-
|-
|align="center"|{{Code|style=1|{{param|except-multi}}}}
|align="center"|{{Code|style=1|{{param|except-multi}}}}
|Similar to {{Code|{{Param|except}}}}, but can specify multiple games simultaneously.
|Similar to {{Code|{{Param|except}}}}, but can specify multiple games simultaneously.
|{{CodeBlock|<nowiki>{{entity|1|type=e0|except-multi={{l4d}}{{hl2}}{{csgo}}}}</nowiki>}}
|{{CodeBlock|<nowiki>{{format|1|type=e0|except-multi={{l4d}}{{hl2}}{{csgo}}}}</nowiki>}}
|{{Capsule|style=2|{{entity|1|type=e0|except-multi={{l4d}}{{hl2}}{{csgo}}|notitlechange=1}}}}
|{{Capsule|style=2|{{format|1|type=e0|except-multi={{l4d}}{{hl2}}{{csgo}}|notitlechange=1}}}}
|-
|-
|align="center"|{{Code|style=1|{{param|notext}}}}
|align="center"|{{Code|style=1|{{param|notext}}}}
|Only change the title (unless {{Code|style=1|{{param|notitlechange}}}} is 1) and add categories (unless {{Code|style=1|{{param|nocat}}}} is 1). Useful for the base page of a page using the {{tl|link=MultiPage}} template. {{Note|Must come before {{tl|MultiPage}} in order to change the title.}}
|Only change the title (unless {{Code|style=1|{{param|notitlechange}}}} is 1) and add categories (unless {{Code|style=1|{{param|nocat}}}} is 1). Useful for the base page of a page using the {{tl|link=MultiPage}} template. {{Note|Must come before {{tl|MultiPage}} in order to change the title.}}
|{{CodeBlock|<nowiki>{{entity|1|type=e0|notext=1}}</nowiki>}}
|{{CodeBlock|<nowiki>{{format|1|type=e0|notext=1}}</nowiki>}}
|{{Capsule|style=2|{{entity|1|type=e0|notext=1|notitlechange=1}}}}
|{{Capsule|style=2|{{format|1|type=e0|notext=1|notitlechange=1}}}}
|-
|-
|}
|}

Revision as of 08:12, 16 August 2023

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.

This template is the master format page for all Entity, Console command/variable, and Shader pages. Each page should have this at the beginning to describe the basic info about each one, such as what they are and their availability.

Parameters and Examples

*: Necessary parameters.

Parameter Description Example Preview
*{{{type}}} The type of the object need to describe. The following types are available:

Entities:

Console Variables, Commands, QC Commands:

Miscellaneous:

  • Custom (You can specify the type yourself. See examples)
Note.pngNote:Template will not add entity categories and change titles when using non-entity type (such as convar).
{{format|type=''incredible entity''|engine=''Mosaic''}}
{{format|type=e1|engine=3}}

{{format|type=e2|engine=1}}
{{format|type=convar|sv_cheats}}
{{format|type=s0|LightmappedGeneric}}
{{{engine}}} Which engine the subject belongs to.
{{format|type=e1|engine=3}}
{{format|type=e1}}
{{{except}}} This is available in all other games except this one.
Note.pngNote:Works without {{{game}}}.
{{format|func_monitor|type=e2|except=Left 4 Dead series}}
{{{since}}} This is available since this game.
Note.pngNote:Works without {{{game}}}.
{{format|type=e0|info_player_start|engine=1|since=Half-Life}}
{{{1}}} The name of the subject. It will change the title of a page. The default value is "This". You can specify it to 0 to remove the entity name.
{{format|type=e0|info_player_start}}
{{{series}}} The series that the subject is available in.
{{format|type=e2|series=Counter-Strike}}
{{{seriescs}}} The series of Counter-Strike that the subject is available in.
{{format|type=e3|seriescs=Counter-Strike|game=Counter-Strike: Source}}
{{{game}}} The game that the subject is available in.
Note.pngNote:Works without {{{series}}}.
{{format|type=e5|game=Team Fortress 2}}
{{{notitlechange}}} You can prevent title-changing from the template by using this parameter. Used in the /doc page.
{{format|type=e0|notitlechange=1|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.
{{format|internal=1|type=entity}}
{{{cut}}} If enabled, "cut" will be displayed before "(internal) ... entity"and the page will add to Category:Cut Entities.
{{format|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!
{{format|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.)
{{format|info_survivor_position|icon=Left 4 Dead series|type=e0|series=Left 4 Dead}}
{{{game1}}} ~ {{{game5}}} If this 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.
Note.pngNote:Works without {{{series}}}.
{{format|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}}
{{format|type=e0|info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2}}
{{{nocat}}} Don't place any categories.
{{format|info_player_start|type=e0|nocat=1}}
N/A
{{{except-multi}}} Similar to {{{except}}}, but can specify multiple games simultaneously.
{{format|1|type=e0|except-multi={{l4d}}{{hl2}}{{csgo}}}}
{{{notext}}} Only change the title (unless {{{notitlechange}}} is 1) and add categories (unless {{{nocat}}} is 1). Useful for the base page of a page using the {{MultiPage}} template.
Note.pngNote:Must come before {{MultiPage}} in order to change the title.
{{format|1|type=e0|notext=1}}

See Also

Template:ModernNote