Template:KV BaseEntity/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (strike formatting fix)
m (Undo revision 399997 by SirYodaJedi (talk))
Tag: Undo
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<noinclude>
{{Doc/subpage}}
{{Documentation subpage}}
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.
This template is our holder for all [[keyvalues]] that are assigned through {{ent|CBaseEntity}}. The template has a very specific syntax that you must follow to apply properly, because new games have added new features throughout the years. See [[Help:Templates]] for more info on named parameters.
 
'''No parameters:''' display keyvalues for ALL games.
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 ==
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:
*<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>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.
{{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>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>
| Show Deprecated: }}
 
Refer to the [[#Examples|Examples]] section for samples.
 
== Examples ==
=== Show info specific to a game {{l4d2}} ===
This makes information relevant only to {{l4d2}} be displayed.
<pre>{{KV BaseEntity|l4d2=1}}</pre>
{{ExpandBox|{{KV BaseEntity|l4d2=1}}|will:}}
=== Show info specific to base engine ===
Information relevant only to base engine are displayed. ({{src13}} / {{src13mp}})
<pre>{{KV BaseEntity|base=1}}</pre>
{{ExpandBox|{{KV BaseEntity|base=1}}|will:}}
=== Show extra info related to brushes ===
Extra brush related keyvalues are displayed with this.
<pre>{{KV BaseEntity|brush=1}}</pre>
{{ExpandBox|{{KV BaseEntity|brush=1}}|will:}}
=== Using template defaults ===
Without using any arguments, the template fallbacks to a default, which is the latest Source game.
<pre>{{KV BaseEntity}}</pre>
<pre>{{KV BaseEntity}}</pre>
'''Base:''' display keyvalues that have only existed since whatever game added the class (most have existed since HL2, the first Source game).
{{ExpandBox|{{KV BaseEntity}}|will:}}
<pre>{{KV BaseEntity|base=1}}</pre>
'''Game as a parameter:''' display the keyvalues that<code>base</code>displays, AND keyvalues that were added to the class, by the specified game. You must specify ALL the games you want to include (e.g.<code>l4d2</code>will not automatically include<code>l4d</code>keyvalues as well). This is because there are situations like in Portal 2, where the output<code>OnKilled</code>is not available through<code>CBaseEntity</code>class, despite being a far descendant of the L4D branch which added it.
<pre>{{KV BaseEntity|l4d2=1}}</pre>


All parameters for this template:
==See also==
*<code>base</code> - (Use only the entity was available before L4D2.)
* {{tl|KV BaseAnimating}}
*<code>l4d2</code> - When used, cannot show information for {{csgo}}unless you leave this and {{csgo}} as blank.
* {{tl|I BaseEntity}}
*<code>csgo</code> - {{l4d2}} must not be present if both {{l4d2}} and this must be shown at the same time.
* {{tl|I BaseAnimating}}
*<code>brush</code> - (This adds things common for all brush entities, visible or not. For keys applicable only to visible brushes, use [[:Template:KV visiblebrush]] in conjunction.)
*<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.) (24/3/2021 brought back for the<code>teamnum</code> key)</strike>
*<code>l4d</code> - (DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things. They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)
*<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.)
{{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.}}
See [[FGD Template Prototype]].
{{note|Some <code>CBaseEntity</code> keyvalues are not covered here. See the talk page.}}
----
----
{{KV BaseEntity}}
</noinclude>
<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}}