Template:KV BaseEntity/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(hi doc page)
 
m (strike formatting fix)
Line 1: Line 1:
<noinclude>
<noinclude>
__NOTOC__
{{Documentation subpage}}
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.
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.
'''No parameters:''' display keyvalues for ALL games.
Line 30: Line 30:
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->
[[Category:Keyvalue Templates|Global]]
[[Category:Keyvalue Templates|Global]]
}}</includeonl
}}</includeonly>

Revision as of 22:20, 19 April 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.

This template is our holder for all keyvalues that are assigned through 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.

{{KV BaseEntity}}

Base: display keyvalues that have only existed since whatever game added the class (most have existed since HL2, the first Source game).

{{KV BaseEntity|base=1}}

Game as a parameter: display the keyvalues thatbasedisplays, AND keyvalues that were added to the class, by the specified game. You must specify ALL the games you want to include (e.g.l4d2will not automatically includel4dkeyvalues as well). This is because there are situations like in Portal 2, where the outputOnKilledis not available throughCBaseEntityclass, despite being a far descendant of the L4D branch which added it.

{{KV BaseEntity|l4d2=1}}

All parameters for this template:

  • base - (Use only the entity was available before L4D2.)
  • l4d2 - When used, cannot show information for Counter-Strike: Global Offensiveunless you leave this and Counter-Strike: Global Offensive as blank.
  • csgo - Left 4 Dead 2 must not be present if both Left 4 Dead 2 and this must be shown at the same time.
  • brush - (This adds things common for all brush entities, visible or not. For keys applicable only to visible brushes, use Template:KV visiblebrush in conjunction.)
  • 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.) (24/3/2021 brought back for theteamnum key)
  • l4d - (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.)
  • tf2 - (DEPRECATED 20/4/2021: Was only used to show TeamNumkeyvalue's TF2 specific information. Use{{KV TeamNum}}instead.)
Note.pngNote: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.pngNote:Some CBaseEntity keyvalues are not covered here. See the talk page.