Template:KV BaseEntity/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Page makeover, can't be summarized here)
m (Undo revision 399997 by SirYodaJedi (talk))
Tag: Undo
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Doc/subpage}}
Info holder for all [[keyvalues]] that inherit the{{ent|CBaseEntity}} class. Parameters are vital to display the appropiate info, because new games have added new features throughout the years. See [[Help:Templates]] for more info on named parameters.
Info holder of all relevant [[keyvalues]] inheriting the {{ent|mode=link|CBaseEntity}} [[File:Cpp.png|link=Wikipedia:C++|alt=C++]] class. Template parameters are vital in displaying the appropiate info, because new games have added new features throughout the years. See [[Help:Templates]] for more info on named parameters.
{{note|If you want to edit something on this template, please make sure you edit it in both places. ''Per-game'' keyvalues are duplicated, for technical reasons. Also see [[FGD Template Prototype]].}}
 
{{note|Some <code>CBaseEntity</code> keyvalues are not covered here. See the talk page.}}
Not all {{ent|mode=link|CBaseEntity}} keyvalues are not covered here. But you can see them all at the [[/Uncovered_Keyvalues|Uncovered Keyvalues]] page.
 
{{note|After you edit this template, please make sure you also edit the targetted entity's page. ''Per-game'' keyvalues may be duplicated, for technical reasons. See also [[FGD Template Prototype]].}}
 
== Usage ==
== Usage ==
These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:<code>l4d2=1</code>. ''Only one'' game parameter can be used at once.
<pre>
{{KV BaseEntity|l4d2=1}}
</pre>
=== Parameters ===
If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying keyvalues from the current default game.
All parameters for this template:
All parameters for this template:
*<code>base</code> - Shows only information relevant to when it was initially added for the first time
*<code>base</code>- No game specific information are displayed, and base engine features only. (The {{src13}} / {{src13mp}} iteration engine)
*<code>l4d2</code> - Include info specific to {{l4d2}} ([[VScript|VScripts]])
*<code>l4d2</code>- Set template KVs specific to {{l4d2}} ([[VScript|VScripts]])
*<code>csgo</code> - Include info specific to {{csgo}} (Auto-aim targets)
*<code>csgo</code>- [CURRENT DEFAULT] Set template KVs specific to {{csgo}} (VScripts + Auto-aim targets)
*<code>brush</code> - Include info specific to all sorts of brushes. For extra keys applicable ''only'' to visible brushes, use [[:Template:KV visiblebrush]] in conjunction.
*<code>brush</code>- Additionaly includes info specific to all sorts of brushes. For extra keys applicable ''only'' to visible brushes, use [[:Template:KV visiblebrush]] in conjunction. Can be used along a game parameter.
{{ExpandBox|nostarterlinebreak=1|
{{ExpandBox|
*<code>css</code> - <strike>(DEPRECATED 10/1/18: Previously used for a notice that was ''thought'' to apply to all entities in CS:S. The purpose of this now exists in [[Template:PreservedEnt]]. This is completely removed from the template and won't affect anything.) (DEPRECATED 24/3/2021 was brought back for info specific to the<code>teamnum</code>key. Use {{tl|KV TeamNum}} instead.)</strike>
*<code>css</code>- <strike>(DEPRECATED 10/1/18: Previously used for a notice that was ''thought'' to apply to all entities in CS:S. The purpose of this now exists in [[Template:PreservedEnt]]. This is completely removed from the template and won't affect anything.) (DEPRECATED 24/3/2021 was brought back for info specific to the<code>teamnum</code>key. Use {{tl|KV TeamNum}} instead.)</strike>
*<code>l4d</code> - <strike>(DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)</strike>
*<code>l4d</code>- <strike>(DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)</strike>
*<code>tf2</code> - <strike>(DEPRECATED 20/4/2021: Was only used to show <code>TeamNum</code>keyvalue's TF2 specific information. Use {{tl|KV TeamNum}} instead.)</strike>
*<code>tf2</code>- <strike>(DEPRECATED 20/4/2021: Was only used to show<code>TeamNum</code>keyvalue's TF2 specific information. Use {{tl|KV TeamNum}} instead.)</strike>
| Show Deprecated: }}
| Show Deprecated: }}


These must be used in a specific syntax; All the parameters must be given a value of 1, like for example:<code>tf2=1</code>for {{tf2}} specific info. Refer to the [[#Examples|Examples]] section.
Refer to the [[#Examples|Examples]] section for samples.
 
== Examples ==
== Examples ==
=== Show info specific to a game {{csgo}} ===
=== Show info specific to a game {{l4d2}} ===
This makes information relevant only to {{csgo}} be displayed.
This makes information relevant only to {{l4d2}} be displayed.
<pre>{{KV BaseEntity|csgo=1}}</pre>
<pre>{{KV BaseEntity|l4d2=1}}</pre>
{{ExpandBox|nostarterlinebreak=1|
{{ExpandBox|{{KV BaseEntity|l4d2=1}}|will:}}
{{KV BaseEntity|csgo=1}}
=== Show info specific to base engine ===
|will:}}
Information relevant only to base engine are displayed. ({{src13}} / {{src13mp}})
=== Show info for its base ===
Information relevant only to this key at / before {{Ep2}} is displayed.
<pre>{{KV BaseEntity|base=1}}</pre>
<pre>{{KV BaseEntity|base=1}}</pre>
{{ExpandBox|nostarterlinebreak=1|
{{ExpandBox|{{KV BaseEntity|base=1}}|will:}}
{{KV BaseEntity|base=1}}
=== Show extra info related to brushes ===
|will:}}
=== Show info related to brushes ===
Extra brush related keyvalues are displayed with this.
Extra brush related keyvalues are displayed with this.
<pre>{{KV BaseEntity|brush=1}}</pre>
<pre>{{KV BaseEntity|brush=1}}</pre>
{{ExpandBox|nostarterlinebreak=1|
{{ExpandBox|{{KV BaseEntity|brush=1}}|will:}}
{{KV BaseEntity|brush=1}}
=== Using template defaults ===
|will:}}
Without using any arguments, the template fallbacks to a default, which is the latest Source game.
=== Show information for '''all''' games ===
Shows every game information for this key that this template can display. (Except for brush related)
<pre>{{KV BaseEntity}}</pre>
<pre>{{KV BaseEntity}}</pre>
{{ExpandBox|nostarterlinebreak=1|
{{ExpandBox|{{KV BaseEntity}}|will:}}
{{KV BaseEntity}}
 
|will:}}
==See also==
* {{tl|KV BaseAnimating}}
* {{tl|I BaseEntity}}
* {{tl|I BaseAnimating}}
----
----
{{KV BaseEntity}}
<includeonly>
<includeonly>
<!--{{otherlang2
<!--{{otherlang2

Latest revision as of 13:03, 15 May 2024

Edit-copy.png
This is a documentation subpage for Template:KV BaseEntity.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Info holder of all relevant keyvalues inheriting the CBaseEntity C++ class. Template parameters are vital in displaying the appropiate info, because new games have added new features throughout the years. See Help:Templates for more info on named parameters.

Not all CBaseEntity keyvalues are not covered here. But you can see them all at the Uncovered Keyvalues page.

Note.pngNote:After you edit this template, please make sure you also edit the targetted entity's page. Per-game keyvalues may be duplicated, for technical reasons. See also FGD Template Prototype.

Usage

These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:l4d2=1. Only one game parameter can be used at once.

{{KV BaseEntity|l4d2=1}}

Parameters

If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying keyvalues from the current default game.

All parameters for this template:

  • base- No game specific information are displayed, and base engine features only. (The Source 2013 / Source 2013 Multiplayer iteration engine)
  • l4d2- Set template KVs specific to Left 4 Dead 2 (VScripts)
  • csgo- [CURRENT DEFAULT] Set template KVs specific to Counter-Strike: Global Offensive (VScripts + Auto-aim targets)
  • brush- Additionaly includes info specific to all sorts of brushes. For extra keys applicable only to visible brushes, use Template:KV visiblebrush in conjunction. Can be used along a game parameter.
Show Deprecated:  
  • css- (DEPRECATED 10/1/18: Previously used for a notice that was thought to apply to all entities in CS:S. The purpose of this now exists in Template:PreservedEnt. This is completely removed from the template and won't affect anything.) (DEPRECATED 24/3/2021 was brought back for info specific to theteamnumkey. Use {{KV TeamNum}} instead.)
  • l4d- (DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)
  • tf2- (DEPRECATED 20/4/2021: Was only used to showTeamNumkeyvalue's TF2 specific information. Use {{KV TeamNum}} instead.)

Refer to the Examples section for samples.

Examples

Show info specific to a game Left 4 Dead 2

This makes information relevant only to Left 4 Dead 2 be displayed.

{{KV BaseEntity|l4d2=1}}
will: 

Show info specific to base engine

Information relevant only to base engine are displayed. (Source 2013 / Source 2013 Multiplayer)

{{KV BaseEntity|base=1}}
will: 

Show extra info related to brushes

Extra brush related keyvalues are displayed with this.

{{KV BaseEntity|brush=1}}
will: 

Using template defaults

Without using any arguments, the template fallbacks to a default, which is the latest Source game.

{{KV BaseEntity}}
will: 

See also

  • {{KV BaseAnimating}}
  • {{I BaseEntity}}
  • {{I BaseAnimating}}