This article's documentation is for the "GoldSrc" engine. Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Template:This is a/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(29 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Doc/subpage}}
{{Doc/subpage}}
{{Shortcut|{{tl|Thisis}}}}
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.
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. It should be placed on the base pages of articles using {{tl2|MultiPage}}.
 
__TOC__
 
== Usage ==
This template is usually written in a single line. To use it, insert <code><nowiki>{{This is a}}</nowiki></code> into the desired page and specify the [[#Parameters and Examples|parameters]] to the right of the template name in the following format: <code><nowiki>{{This is a|parameter 1 = value|parameter 2 = value}}</nowiki></code>.


== Parameters and Examples ==
== Parameters and Examples ==
<strong style=color:rgb(255,255,0)>'''<nowiki>*</nowiki>'''</strong>: Necessary parameters.</sub>
<strong style="color:rgb(255,255,0)">'''<nowiki>*</nowiki>'''</strong>: Necessary parameters.</sub>


{| class=standard-table | style="width:100%;"
<table class="standard-table" style="width:100%">
|-
<tr>
! Parameter
<th style="min-width:150px; width:8%"> Parameter </th>
! width="45%" | Description
<th style="min-width:310px; width:27%"> Description </th>
! Example
<th style="min-width:500px; width:37%"> Example </th>
! Preview
<th style="min-width:280px; width:28%"> Preview </th>
|-
</tr>
|align="center"|<strong style=color:rgb(255,255,0)>'''<nowiki>*</nowiki>'''</strong>{{Code|preset=2|{{param|1}}}}
<tr>
| The type of the object need to describe. The following types are available:<br>
<td style="text-align:center">
'''Entities:'''
<strong style="color:rgb(255,255,0)">'''<nowiki>*</nowiki>'''</strong>
* {{Code|point entity}} - [[Point entity]]
<br><code>{{param|1}}</code>
* {{Code|brush entity}} - [[Brush entity]]
</td>
* {{Code|mesh entity}} - [[Mesh entity]] ({{source2}})
<td>
* {{Code|path entity}} - [[Path entity]] ({{source2}})
The type of the object need to describe. The following types are available:<br>
'''Console Variables, Commands, QC Commands:'''
'''Entities:'''
* {{Code|console variable}} - [[console variable|Console Variables]]
* <code>entity</code> - [[Entity]]
* {{Code|console command}} - [[Developer_Console#Submitting|Console Commands]]
* <code>point entity</code> - [[Point entity]]
* {{Code|QC command}} - [[QC command]]
* <code>brush entity</code> - [[Brush entity]] {{not|{{src2}}}}
* {{code|pixel shader}} - [[Shader#Pixel shaders]]
* <code>mesh entity</code> - [[Mesh entity]] ({{source2}})
* {{code|vertex shader}} - [[Shader#Vertex shaders]]
* <code>path entity</code> - [[Path entity]] ({{source2}})
* {{code|shader parameter}} - [[material]] [[shader]] parameter
'''Console Variables, Commands, QC Commands:'''
Miscellaneous:
* <code>console variable</code> - [[console variable|Console Variables]]
* Custom (You can specify the type yourself. See examples)
* <code>console command</code> - [[Developer_Console#Submitting|Console Commands]]
{{Note|Template will not add entity categories and change titles when using non-entity type (such as {{Code|console variable}}).}}
* <code>QC command</code> - [[QC command]]
|
* <code>pixel shader</code> - [[Shader#Pixel shaders]]
{{CodeBlock|<nowiki>{{this is a|''incredible entity''}}</nowiki>}}
* <code>vertex shader</code> - [[Shader#Vertex shaders]]
{{CodeBlock|<nowiki>{{this is a|brush entity|engine=GoldSrc}}</nowiki>}}
* <code>shader parameter</code> - [[material]] [[shader]] parameter
{{CodeBlock|<nowiki>{{this is a|console variable|name=sv_cheats}}</nowiki>}}
'''Miscellaneous:'''
{{CodeBlock|<nowiki>{{this is a|pixel shader|name=LightmappedGeneric}}</nowiki>}}
* Custom (You can specify the type yourself. See examples)
|
{{Note|Template will not add entity categories when using non-entity type (such as <code>console variable</code>).}}
{{Capsule|style=2|margin=5px|{{this is a|''incredible entity''}}}}
</td>
{{Capsule|style=2|margin=5px|{{this is a|brush entity|engine=GoldSrc|nocat=1}}}}
<td>
{{Capsule|style=2|margin=5px|{{this is a|console variable|name=sv_cheats|notitlechange=1|nocat=1}}}}
<pre style="margin:0 0 .25em 0">{{this is a|''incredible entity''}}</pre>
{{Capsule|style=2|margin=5px|{{this is a|pixel shader|name=LightmappedGeneric|notitlechange=1|nocat=1}}}}
<pre style="margin:.25em 0 .25em 0">{{this is a|brush entity|engine=GoldSrc|nocat=1}}</pre>
|-
<pre style="margin:.25em 0 .25em 0">{{this is a|console variable|name=sv_cheats|notitlechange=1|nocat=1}}</pre>
|align="center"|{{Code|preset=2|{{param|shader}}}}
<pre style="margin:.25em 0 0 0">{{this is a|pixel shader|name=LightmappedGeneric|notitlechange=1|nocat=1}}</pre>
| The shader that a parameter is in (only works if {{param|1}} is equal to {{code|shader parameter}}).
</td>
| {{CodeBlock|<nowiki>{{this is a|shader parameter|name=$lightmap|shader=VertexLitGeneric|game=Source 2013 MP|game1=Garry's Mod}}</nowiki>}}
<td style="background-color:#262626">
| {{Capsule|style=2|margin=5px|{{this is a|shader parameter|name=$lightmap|shader=VertexLitGeneric|game=Source 2013 MP|game1=Garry's Mod|notitlechange=1|nocat=1}} }}
{{this is a|''incredible entity''}}
|-
<br><br>{{this is a|brush entity|engine=GoldSrc|notitlechange=1|nocat=1}}
|align="center"|{{Code|preset=2|{{param|engine}}}}<br>{{Code|preset=2|{{param|engine1}}}}<br>{{Code|preset=2|{{param|engine2}}}}
<br><br>{{this is a|console variable|name=sv_cheats|notitlechange=1|nocat=1}}
| Which engine the subject belongs to.  
<br><br>{{this is a|pixel shader|name=LightmappedGeneric|notitlechange=1|nocat=1}}
:* Default - {{source|4}} (same as specifying {{Code|Source}})
</td>
:* {{code|GoldSrc}} - {{gldsrc|4}}
</tr>
:* {{Code|Source}} - {{source|4}}
<tr>
:* {{Code|Source 2}} - {{source2|4}}
<td style="text-align:center">
{{Important|'''To add multiple engines''', please use parameter {{Code|preset=2|{{param|engine1}}}} (secondary engine) and {{Code|preset=2|{{param|engine2}}}} (tertiary engine) with {{Code|preset=2|{{param|engine}}}} (primary engine) at the same time.}}
<code>{{param|shader}}</code>
|
<code>{{param|shader1}}</code> ~ <code>{{param|shader5}}</code>
{{CodeBlock|<nowiki>{{this is a|point entity|engine=GoldSrc|engine1=Source}}</nowiki>}}
</td>
{{CodeBlock|<nowiki>{{this is a|point entity|engine=GoldSrc|engine1=Source|engine2=Source 2}}</nowiki>}}
<td> The shader that a parameter is in (only works if {{param|1}} is equal to <code>shader parameter</code>). Extra parameters allow you to specify multiple shaders. </td>
|
<td> <pre style="magin:0">{{this is a|shader parameter|name=$lightmap|shader=VertexLitGeneric|game=Source 2013 Multiplayer|game1=Garry's Mod}}</pre> </td>
{{Capsule|style=2|margin=5px|{{this is a|point entity|engine=GoldSrc|engine1=Source|nocat=1}}}}
<td style="background-color:#262626"> {{this is a|shader parameter|name=$lightmap|shader=VertexLitGeneric|game=Source 2013 Multiplayer|game1=Garry's Mod|notitlechange=1|nocat=1}} </td>
{{Capsule|style=2|margin=5px|{{this is a|point entity|engine=GoldSrc|engine1=Source|engine2=Source 2|nocat=1}}}}
</tr>
|-
<tr>
|align="center"|{{Code|preset=2|{{param|except}}}}
<td style="text-align:center">
| This is available in all other games except this one. {{Note|Works without {{Code|preset=2|{{param|game}}}}.}}
<code>{{param|dx}}</code>
| {{CodeBlock|<nowiki>{{this is a|brush entity|name=func_monitor|except=Left 4 Dead series}}</nowiki>}}
</td>
| {{Capsule|style=2|margin=5px|{{this is a|brush entity|name=func_monitor|notitlechange=1|except=Left 4 Dead series|nocat=1}}}}
<td>
|-
Add [[DirectX Versions|DirectX levels]] inline text.
|align="center"|{{Code|preset=2|{{param|since}}}}
Available versions:
| This  is available since this game. {{Note|Works without {{Code|preset=2|{{param|game}}}}.}}
* DirectX 8 - <code>dx8</code>
| {{CodeBlock|<nowiki>{{this is a|point entity|name=info_player_start|engine=GoldSrc|since=Half-Life}}</nowiki>}}
* DirectX 9 (SM 2.0)- <code>dx9</code>
| {{Capsule|style=2|margin=5px|{{this is a|point entity|name=info_player_start|notitlechange=1|engine=GoldSrc|since=Half-Life|nocat=1}}}}
* DirectX 9.0c (SM 3.0) - <code>dx95</code> or <code>dx90c</code>
|-
</td>
|align="center"|{{Code|preset=2|{{param|name}}}}
<td>
| 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.
<pre style="margin:0 0 .25em 0">{{this is a|shader parameter|dx=dx8|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006}}</pre>
| {{CodeBlock|<nowiki>{{this is a|point entity|name=info_player_start}}</nowiki>}}
<pre style="margin:.25em 0 .25em 0">{{this is a|shader parameter|dx=dx9|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006}}</pre>
| {{Capsule|style=2|margin=5px|{{this is a|point entity|name=info_player_start|notitlechange=1|nocat=1}}}}
<pre style="margin:.25em 0 0 0">{{this is a|shader parameter|dx=dx95|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006}}</pre>
|-
</td>
|align="center"|{{Code|preset=2|{{param|series}}}}
<td style="background-color:#262626; text-wrap-style:pretty">
| The series that the subject is available in.
{{this is a|shader parameter|dx=dx8|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006|notitlechange=1|nocat=1}}
| {{CodeBlock|<nowiki>{{this is a|brush entity|series=Counter-Strike}}</nowiki>}}
<br><br>{{this is a|shader parameter|dx=dx9|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006|notitlechange=1|nocat=1}}
| {{Capsule|style=2|margin=5px|{{this is a|brush entity|series=Counter-Strike|nocat=1}}}}
<br><br>{{this is a|shader parameter|dx=dx95|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006|notitlechange=1|nocat=1}}
|-
</td>
</tr>
<tr>
<td style="text-align:center">
<code>{{param|engine}}</code>
<code>{{param|engine1}}</code>
<code>{{param|engine2}}</code>
</td>
<td>
Which engine the subject belongs to.
:* Default - {{source|4}} (same as specifying <code>Source</code>)
:* <code>GoldSrc</code> - {{gldsrc|4}}
:* <code>Source</code> - {{source|4}}
:* <code>Source 2</code> - {{source2|4}}
{{Important|'''To add multiple engines''', please use parameter <code>{{param|engine1}}</code> (secondary engine) and <code>{{param|engine2}}</code> (tertiary engine) with <code>{{param|engine}}</code> (primary engine) at the same time.}}
</td>
<td>
<pre style="margin:0 0 .25em 0">{{this is a|point entity|engine=GoldSrc|engine1=Source}}</pre>
<pre style="margin:.25em 0 0 0">{{this is a|point entity|engine=GoldSrc|engine1=Source|engine2=Source 2}}</pre>
</td>
<td style="background-color:#262626">
{{this is a|point entity|engine=GoldSrc|engine1=Source|nocat=1}}
<br><br>{{this is a|point entity|engine=GoldSrc|engine1=Source|engine2=Source 2|notitlechange=1|nocat=1}}
</td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|except}}</code> </td>
<td> This is available in all other games except this one. {{Note|Works without <code>{{param|game}}</code>.}} </td>
<td> <pre style="magin:0">{{this is a|brush entity|name=func_monitor|except=Left 4 Dead series}}</pre> </td>
<td style="background-color:#262626"> {{this is a|brush entity|name=func_monitor|except=Left 4 Dead series|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|since}}</code> </td>
<td>
This  is available since this game.
{{Note|Works without <code>{{param|game}}</code>.}}
</td>
<td> <pre style="magin:0">{{this is a|point entity|name=info_player_start|engine=GoldSrc|since=Half-Life}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|name=info_player_start|engine=GoldSrc|since=Half-Life|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|name}}</code> </td>
<td> The name of the subject. It will change the title of a page. If unspecified, the sentence will just refer to the subject as "this." </td>
<td> <pre style="magin:0">{{this is a|point entity|name=info_player_start}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|name=info_player_start|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|this}}</code> </td>
<td> If set to 0, false, etc. then the sentence will not start with the word "this." Has no effect if {{param|name}} has been specified. </td>
<td> <pre style="magin:0">{{this is a|point entity|this=false}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|this=false|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|series}}</code> </td>
<td> The series that the subject is available in. </td>
<td> <pre style="magin:0">{{this is a|brush entity|series=Counter-Strike}}</pre> </td>
<td style="background-color:#262626"> {{this is a|brush entity|series=Counter-Strike|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|game}}</code> </td>
<td>
The game that the subject is available in.
{{Note|Works without <code>{{param|series}}</code>.{{Warning|Do not use short name (such as <code>hl2</code> instead of <code>Half-Life 2</code>), otherwise the page will be added to [[:Category:Hl2 point entities]] instead of [[:Category:Half-Life 2 point entities]].}}}}
</td>
<td> <pre style="magin:0">{{this is a|path entity|game=Team Fortress 2}}</pre> </td>
<td style="background-color:#262626"> {{this is a|path entity|game=Team Fortress 2|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|notitlechange}}</code> </td>
<td> You can prevent title-changing from the template by using this parameter. Used in the <code>/doc</code> page. </td>
<td> <pre style="magin:0">{{this is a|point entity|notitlechange=1|name=info_player_start|engine=GoldSrc|since=Half-Life}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|notitlechange=1|name=info_player_start|engine=GoldSrc|since=Half-Life|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|internal}}</code> </td>
<td> If enabled, "cut" will be displayed before "entity" and a category will be added to the page. </td>
<td> <pre style="magin:0">{{this is a|entity|internal=1}}</pre> </td>
<td style="background-color:#262626"> {{this is a|entity|internal=1|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|semi-internal}}</code> </td>
<td> If enabled, "cut" will be displayed before "entity" and a category will be added to the page. </td>
<td> <pre style="magin:0">{{this is a|entity|semi-internal=1}}</pre> </td>
<td style="background-color:#262626"> {{this is a|entity|semi-internal=1|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|cut}}</code> </td>
<td> If enabled, "cut" will be displayed before "(internal) ... entity" and a category will be added to the page. </td>
<td> <pre style="magin:0">{{this is a|cut=1|internal=1|entity}}</pre> </td>
<td style="background-color:#262626"> {{this is a|cut=1|internal=1|entity|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|sprite}}</code> </td>
<td>
The icon of the entity:
* If <code>1</code> is specified, the template will find the entity icon file based on the entity name (parameter <code>{{param|1}}</code>). (Follow the format of <code><nowiki>[[File:<entity name>.png]]</nowiki></code> 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!}}
</td>
<td> <pre style="magin:0">{{this is a|point entity|name=logic_script|sprite=1}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|name=logic_script|sprite=1|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|icon}}</code> </td>
<td>
Make the game icon appear left-aligned.
* If <code>1</code>is specified, the template will use <code>{{param|tag=kbd|game}}</code> instead.
* If it is a custom value, you need to enter the full name of the game. (Case sensitive)
* If <code>0</code> is specified or the parameter is unused, the icon will appears in the text. (See the examples above.)
</td>
<td> <pre style="magin:0">{{this is a|point entity|name=info_survivor_position|icon=Left 4 Dead series|type=point entity|series=Left 4 Dead}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|name=info_survivor_position|icon=Left 4 Dead series|type=point entity|series=Left 4 Dead|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|name1}}</code> ~ <code>{{param|name5}}</code> </td>
<td>
If the entity name is similar to another entity and functions the same, like <code>terrorist_team_intro</code> and <code>counterterrorist_team_intro</code>, use these parameters.
{{Note|Once you have used the <code>{{param|name1}}</code>, the style of the template will be changed. '''The <code>{{param|name}}</code> is necessary for displaying the first name.'''}}
</td>
<td> <pre style="magin:0">{{this is a|point entity|name=terrorist_team_intro|name1=counterterrorist_team_intro|game=Counter-Strike 2}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|name=terrorist_team_intro|name1=counterterrorist_team_intro|game=Counter-Strike 2|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|game1}}</code> ~ <code>{{param|game5}}</code> </td>
<td>
If this is available in multiple games, use these parameters to describe.
{{Note|Once you have used the <code>{{param|game1}}</code>, the style of the template will be changed. '''The <code>{{param|game}}</code> is necessary for displaying the first game.'''}}
{{Note|Works without <code>{{param|series}}</code>.}}
{{Warning|Do not use short name (such as <code>hl2</code> instead of <code>Half-Life 2</code>), otherwise the page will be added to  [[:Category:Hl2 point entities]] instead of [[:Category:Half-Life 2 point entities]].}}
</td>
<td> <pre style="magin:0">{{this is a|point entity|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2|game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2|game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive|notitlechange=1|nocat=1}} </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|nocat}}</code> </td>
<td> Don't place any categories. </td>
<td> <pre style="magin:0">{{this is a|point entity|name=info_player_start|nocat=1}}</pre> </td>
<td style="background-color:#262626"> N/A </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|no-non-int}}</code> </td>
<td> Don't place it in [[:Category:Non-internal entities|Category:Non-internal <nowiki>{{{in|}}}</nowiki> entities]]. </td>
<td> <pre style="magin:0">{{this is a|point entity|name=info_player_start|no-non-int=1}}</pre> </td>
<td style="background-color:#262626"> N/A </td>
</tr>
<tr>
<td style="text-align:center"> <code>{{param|except-multi}}</code> </td>
<td>
Similar to <code>{{param|except}}</code>, but can specify multiple games simultaneously.
{{Note|Unsupport placing categories.}}
</td>
<td> <pre style="magin:0">{{this is a|point entity|name=1|except-multi={{l4d}}{{hl2}}{{csgo}}}}</pre> </td>
<td style="background-color:#262626"> {{this is a|point entity|name=1|except-multi={{l4d}}{{hl2}}{{csgo}}|notitlechange=1|nocat=1}} </td>
</tr>
</table>


|align="center"|{{Code|preset=2|{{param|game}}}}
== Components ==
| The game that the subject is available in. {{Note|Works without {{Code|preset=2|{{param|series}}}}.}}
This template uses components to simplify working with repetitive code. Below is a list of all components included in the template.
| {{CodeBlock|<nowiki>{{this is a|path entity|game=Team Fortress 2}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{this is a|path entity|game=Team Fortress 2|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|notitlechange}}}}
| You can prevent title-changing from the template by using this parameter. Used in the {{Code|/doc}} page.
| {{CodeBlock|<nowiki>{{this is a|point entity|notitlechange=1|name=info_player_start|engine=GoldSrc|since=Half-Life}}</nowiki>}}
| {{Capsule|style=2|margin=5px|{{this is a|point entity|notitlechange=1|name=info_player_start|engine=GoldSrc|since=Half-Life|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|internal}}}}
|If enabled, "cut" will be displayed before "entity" and the categories of the page will change (e.g. from "Source base point entities" to "Internal Source base point entities").
|{{CodeBlock|<nowiki>{{this is a|entity|internal=1}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{this is a|entity|internal=1|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|cut}}}}
|If enabled, "cut" will be displayed before "(internal) ... entity" and the categories of the page will change (e.g. from "Source base point entities" to "Cut Source base point entities").
|{{CodeBlock|<nowiki>{{this is a|cut=1|internal=1|entity}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{this is a|cut=1|internal=1|entity|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|sprite}}}}
|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|preset=2|{{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!}}
|{{CodeBlock|<nowiki>{{this is a|point entity|name=logic_script|sprite=1}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{this is a|point entity|name=logic_script|sprite=1|notitlechange=1|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|icon}}}}
|Make the game icon appear left-aligned.
*If {{Code|1}} is specified, the template will use {{Code|preset=2|{{param|tag=kbd|game}}}} instead.
*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.)
|{{CodeBlock|<nowiki>{{this is a|point entity|name=info_survivor_position|icon=Left 4 Dead series|type=point entity|series=Left 4 Dead}}</nowiki>}}
|{{Capsule|style=2|margin=5px|{{this is a|point entity|name=info_survivor_position|notitlechange=1|series=Left 4 Dead|icon=Left 4 Dead series|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|game1}}}} ~ {{Code|preset=2|{{param|game5}}}}
|If this is available in multiple games, use these parameters to describe. {{Note|Once you have used the {{Code|preset=2|{{param|game1}}}}, the style of the template will be changed. '''The {{Code|preset=2|{{param|game}}}} is necessary for displaying the first game.'''}}{{Note|Works without {{Code|preset=2|{{param|series}}}}.}}
|{{CodeBlock|<nowiki>{{this is a|point entity|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>{{this is a|point entity|name=info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2}}</nowiki>}}
|{{Capsule|style=2|{{this is a|point entity|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2|game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive|nocat=1}}}}
{{Capsule|style=2|{{this is a|point entity|name=info_survivor_position|game=Left 4 Dead|game1=Left 4 Dead 2|notitlechange=1|nocat=1}}}}
|-
|align="center"|{{Code|preset=2|{{param|nocat}}}}
|Don't place any categories.
|{{CodeBlock|<nowiki>{{this is a|point entity|name=info_player_start|nocat=1}}</nowiki>}}
|align="center"|N/A
|-
|align="center"|{{Code|preset=2|{{param|except-multi}}}}
|Similar to {{Code|{{Param|except}}}}, but can specify multiple games simultaneously. {{Note|Unsupport placing categories. }}
|{{CodeBlock|<nowiki>{{this is a|point entity|name=1|except-multi={{l4d}}{{hl2}}{{csgo}}}}</nowiki>}}
|{{Capsule|style=2|{{this is a|point entity|name=1|except-multi={{l4d}}{{hl2}}{{csgo}}|notitlechange=1|nocat=1}}}}
|-
|}


== See also ==
* [[Template:This is a/strings|strings]]
{{note|All the entity templates listed below are '''deprecated.'''}}
* [[Template:This is a/category|category]]
* {{t|Entity}}
* [[Template:This is a/check name|check name]]
* {{t|Format}}
* {{t|Point ent}}
* {{t|Base point multi}}
* {{t|Brush ent}}
* {{t|Base brush multi}}
* {{t|Game name}}
* {{t|Shaderparam}}

Latest revision as of 00:32, 14 September 2025

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.

Usage

This template is usually written in a single line. To use it, insert {{This is a}} into the desired page and specify the parameters to the right of the template name in the following format: {{This is a|parameter 1 = value|parameter 2 = value}}.

Parameters and Examples

*: Necessary parameters.

Parameter Description Example Preview

*
{{{1}}}

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 when using non-entity type (such as console variable).
{{this is a|''incredible entity''}}
{{this is a|brush entity|engine=GoldSrc|nocat=1}}
{{this is a|console variable|name=sv_cheats|notitlechange=1|nocat=1}}
{{this is a|pixel shader|name=LightmappedGeneric|notitlechange=1|nocat=1}}

This is a incredible entity available in all Source Source games.

This is a brush entity available in all GoldSrc GoldSrc games.

sv_cheats is a console variable available in all Source Source games.

LightmappedGeneric is a Pixel shader available in all Source Source games.

{{{shader}}} {{{shader1}}} ~ {{{shader5}}}

The shader that a parameter is in (only works if {{{1}}} is equal to shader parameter). Extra parameters allow you to specify multiple shaders.
{{this is a|shader parameter|name=$lightmap|shader=VertexLitGeneric|game=Source 2013 Multiplayer|game1=Garry's Mod}}
$lightmap is a material shader parameter for the VertexLitGeneric shader available in Source 2013 Multiplayer Source 2013 Multiplayer and Garry's Mod Garry's Mod.

{{{dx}}}

Add DirectX levels inline text. Available versions:

  • DirectX 8 - dx8
  • DirectX 9 (SM 2.0)- dx9
  • DirectX 9.0c (SM 3.0) - dx95 or dx90c
{{this is a|shader parameter|dx=dx8|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006}}
{{this is a|shader parameter|dx=dx9|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006}}
{{this is a|shader parameter|dx=dx95|name=$lightwarptexture|shader=VertexLitGeneric|since=Source 2006}}

$lightwarptexture (DX8) is a material shader parameter for the VertexLitGeneric shader available in all Source Source games since Source 2006 Source 2006.

$lightwarptexture (DX9 SM2) is a material shader parameter for the VertexLitGeneric shader available in all Source Source games since Source 2006 Source 2006.

$lightwarptexture (DX9+ SM3) is a material shader parameter for the VertexLitGeneric shader available in all Source Source games since Source 2006 Source 2006.

{{{engine}}} {{{engine1}}} {{{engine2}}}

Which engine the subject belongs to.

Icon-Important.pngImportant:To add multiple engines, please use parameter {{{engine1}}} (secondary engine) and {{{engine2}}} (tertiary engine) with {{{engine}}} (primary engine) at the same time.
{{this is a|point entity|engine=GoldSrc|engine1=Source}}
{{this is a|point entity|engine=GoldSrc|engine1=Source|engine2=Source 2}}

This is a point entity available in all GoldSrc GoldSrc and Source Source games.

This is a point entity available in all GoldSrc GoldSrc, Source Source, and Source 2 Source 2 games.

{{{except}}} This is available in all other games except this one.
Note.pngNote:Works without {{{game}}}.
{{this is a|brush entity|name=func_monitor|except=Left 4 Dead series}}
func_monitor is a brush entity available in all Source Source games except Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series.
{{{since}}}

This is available since this game.

Note.pngNote:Works without {{{game}}}.
{{this is a|point entity|name=info_player_start|engine=GoldSrc|since=Half-Life}}
info_player_start is a point entity available in all GoldSrc GoldSrc games since Half-Life Half-Life.
{{{name}}} The name of the subject. It will change the title of a page. If unspecified, the sentence will just refer to the subject as "this."
{{this is a|point entity|name=info_player_start}}
info_player_start is a point entity available in all Source Source games.
{{{this}}} If set to 0, false, etc. then the sentence will not start with the word "this." Has no effect if {{{name}}} has been specified.
{{this is a|point entity|this=false}}
is a point entity available in all Source Source games.
{{{series}}} The series that the subject is available in.
{{this is a|brush entity|series=Counter-Strike}}
This is a brush entity available in Counter-Strike seriesCounter-Strike series Counter-Strike series.
{{{game}}}

The game that the subject is available in.

Note.pngNote:Works without {{{series}}}.
Warning.pngWarning:Do not use short name (such as hl2 instead of Half-Life 2), otherwise the page will be added to Category:Hl2 point entities instead of Category:Half-Life 2 point entities.
{{this is a|path entity|game=Team Fortress 2}}
This is a path entity available in Team Fortress 2 Team Fortress 2.
{{{notitlechange}}} You can prevent title-changing from the template by using this parameter. Used in the /doc page.
{{this is a|point entity|notitlechange=1|name=info_player_start|engine=GoldSrc|since=Half-Life}}
info_player_start is a point entity available in all GoldSrc GoldSrc games since Half-Life Half-Life.
{{{internal}}} If enabled, "cut" will be displayed before "entity" and a category will be added to the page.
{{this is a|entity|internal=1}}
This is an internal entity available in all Source Source games.
{{{semi-internal}}} If enabled, "cut" will be displayed before "entity" and a category will be added to the page.
{{this is a|entity|semi-internal=1}}
This is a semi-internal entity available in all Source Source games.
{{{cut}}} If enabled, "cut" will be displayed before "(internal) ... entity" and a category will be added to the page.
{{this is a|cut=1|internal=1|entity}}
This is a cut internal entity available in all Source Source games.
{{{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!
{{this is a|point entity|name=logic_script|sprite=1}}
Logic script.png
logic_script is a point entity available in all Source Source games.
{{{icon}}}

Make the game icon appear left-aligned.

  • If 1is 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.)
{{this is a|point entity|name=info_survivor_position|icon=Left 4 Dead series|type=point entity|series=Left 4 Dead}}
Left 4 Dead seriesLeft 4 Dead series info_survivor_position is a point entity available in Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series.
{{{name1}}} ~ {{{name5}}}

If the entity name is similar to another entity and functions the same, like terrorist_team_intro and counterterrorist_team_intro, use these parameters.

Note.pngNote:Once you have used the {{{name1}}}, the style of the template will be changed. The {{{name}}} is necessary for displaying the first name.
{{this is a|point entity|name=terrorist_team_intro|name1=counterterrorist_team_intro|game=Counter-Strike 2}}
terrorist_team_intro and counterterrorist_team_intro are point entities available in Counter-Strike 2 Counter-Strike 2.
{{{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}}}.
Warning.pngWarning:Do not use short name (such as hl2 instead of Half-Life 2), otherwise the page will be added to Category:Hl2 point entities instead of Category:Half-Life 2 point entities.
{{this is a|point entity|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Portal 2|game3=Team Fortress 2|game4=Portal 2|game5=Counter-Strike: Global Offensive}}
This is a point entity available in Left 4 Dead Left 4 Dead, Left 4 Dead 2 Left 4 Dead 2, Portal 2 Portal 2, Team Fortress 2 Team Fortress 2, Portal 2 Portal 2, and Counter-Strike: Global Offensive Counter-Strike: Global Offensive.
{{{nocat}}} Don't place any categories.
{{this is a|point entity|name=info_player_start|nocat=1}}
N/A
{{{no-non-int}}} Don't place it in Category:Non-internal {{{in|}}} entities.
{{this is a|point entity|name=info_player_start|no-non-int=1}}
N/A
{{{except-multi}}}

Similar to {{{except}}}, but can specify multiple games simultaneously.

Note.pngNote:Unsupport placing categories.
{{this is a|point entity|name=1|except-multi={{l4d}}{{hl2}}{{csgo}}}}
1 is a point entity available in all Source Source games except Left 4 DeadHalf-Life 2Counter-Strike: Global Offensive.

Components

This template uses components to simplify working with repetitive code. Below is a list of all components included in the template.