Template:KV BaseEntity/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Rephrases of an amount of Documentation sentences; Link to the talk page's contents)
("ALL Games" --> "Current Default"; Marked CSGO as [DEFAULT]; Changed first example to use {{l4d2}} instead of {{csgo}} (csgo displays all keys); Removed 'nostarterlinebreak'; And other misc. things not worth cramming into text summary form)
Line 13: Line 13:


=== Parameters ===
=== Parameters ===
If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying keyvalues from '''ALL''' games.
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>- No game specific information, and base engine features only. Usually relevant to the {{src13}} / {{src13mp}} iteration engine.
*<code>base</code>- No game specific information are displayed, and base engine features only. (The {{src13}} / {{src13mp}} iteration engine)
*<code>l4d2</code>- Set template KVs specific to {{l4d2}} ([[VScript|VScripts]])
*<code>l4d2</code>- Set template KVs specific to {{l4d2}} ([[VScript|VScripts]])
*<code>csgo</code>- Set template KVs specific to {{csgo}} (Auto-aim targets)
*<code>csgo</code>- [CURRENT DEFAULT] Set template KVs specific to {{csgo}} (VScripts + Auto-aim targets)
*<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.
*<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>
Line 29: Line 29:


== 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 the entity's defaults are displayed. ({{src13}} / {{src13mp}})
<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==
==See Also==
* {{tl|KV BaseAnimating}}
* {{tl|KV BaseAnimating}}

Revision as of 04:34, 6 June 2021

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 theCBaseEntity 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 allCBaseEntitykeyvalues 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}}