Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m ('Team' --> 'Initial Team')
(CSGO param - removed misinformation for 'TeamNum' key, and added support to accept 'teamnum_dont_put_nofgd' for entities like func_buyzone)
Line 13: Line 13:
*<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>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>l4d2</code>
*<code>l4d2</code>
*<code>csgo</code>
*<code>csgo</code> - When using this, Use<code>csgo=teamnum_dont_put_nofgd</code>to remove the {{Not in FGD}} tag.
*<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>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>brush</code> - (This adds things common for all brush entities, visible or not. For visible ones, use [[:Template:KV visiblebrush]] in conjunction.)
*<code>brush</code> - (This adds things common for all brush entities, visible or not. For visible ones, use [[:Template:KV visiblebrush]] in conjunction.)
Line 68: Line 68:
   ++ TeamNum related things go here ++
   ++ TeamNum related things go here ++
-->
-->
<!-- IF: TF2 == 'teamnum_dont_put_nofgd' -->{{#switch: {{{tf2|}}} | teamnum_dont_put_nofgd =
<!-- IF: TF2 == 'teamnum_dont_put_nofgd' -->
{{KV|Initial |choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn.
{{#switch: {{{tf2|}}} | teamnum_dont_put_nofgd =
{{KV|Initial |choices|intn=teamnum|Which Team the entity belongs / is assigned to on spawn.
:*0: None
:*0: None
:*1: Spectator
:*1: Spectator
:*2: Red {{tf2}}
:*2: Red {{tf2}}
:*3: Blue {{tf2}}
:*3: Blue {{tf2}}
}}
}} | <!-- ELSE IF : TF2 == 1 --> 1 =
| <!-- ELSE IF : TF2 == 1 --> 1 =
{{KV|Initial Team|choices|intn=teamnum|Which Team the entity belongs / is assigned to on spawn.
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn.
:*0: None
:*0: None
:*1: Spectator
:*1: Spectator
Line 82: Line 82:
:*3: Blue {{tf2}}
:*3: Blue {{tf2}}
|nofgd=1}}
|nofgd=1}}
| }}<!-- IF: CSS, ELSEIF: L4D, ELSEIF: L4D2, ELSEIF: CSGO -->{{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}||{{#if:{{{csgo|}}}|
| }} <!-- IF: CSS, ELSEIF: L4D, ELSEIF: L4D2 --> {{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}|
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn.
{{KV|Initial Team|choices|intn=teamnum|Which Team the entity belongs / is assigned to on spawn. Doesn't do anything in {{l4ds}}.
{{todo|Verify if it works in {{css}}.}}
{{confirm|Works in {{css}}?}}
<!--
<!--
:*0: None
:*0: None
Line 92: Line 92:
-->  
-->  
|nofgd=1|deprecated=1}}
|nofgd=1|deprecated=1}}
| }}}}}}}}<!-- IF: CSGO -->{{#if:{{{csgo|}}}|
| }}}}}} <!-- IF: CSGO == 'teamnum_dont_put_nofgd' -->
{{KV|Initial Team|choices|intn=teamnumber|Which Team the entity belongs / is assigned to.
{{#switch: {{{csgo|}}} | teamnum_dont_put_nofgd =
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn.
:*0: None
:*1: Spectator
:*2: Terrorists {{csgo}}
:*3: Counter-Terrorists {{csgo}}
}} | <!-- ELSE IF : CSGO == 1 --> 1 =
{{KV|Initial Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to on spawn.
:*0: None
:*0: None
:*1: Spectator
:*1: Spectator
:*2: Terrorists {{csgo}}
:*2: Terrorists {{csgo}}
:*3: Counter-Terrorists {{csgo}}
:*3: Counter-Terrorists {{csgo}}
|only={{csgo}}|nofgd=1 }}
|nofgd=1 }}
| }}<!-- --></includeonly>
| }}</includeonly>

Revision as of 11:53, 13 April 2021

English (en)中文 (zh)Translate (Translate)

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 that base displays, AND keyvalues that were added to the class, by the specified game. You can specify as many games as needed. You must specify ALL the games you want to include (e.g. l4d2 will not automatically include l4d keyvalues as well). This is because there are situations like in Portal 2, where the output OnKilled is not available through CBaseEntity, despite being a far descendant of the L4D branch which added it.

{{KV BaseEntity|l4d2=1}}

All parameters for this template:

  • base - (Use if the entity was available before L4D2.)
  • 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.)
  • l4d2
  • csgo - When using this, Usecsgo=teamnum_dont_put_nofgdto remove the !FGD tag.
  • 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)
  • brush - (This adds things common for all brush entities, visible or not. For visible ones, use Template:KV visiblebrush in conjunction.)
  • tf2 - AlterTeamNumkeyvalue to show TF2 specific information. Usetf2=teamnum_dont_put_nofgdto remove the !FGD tag.
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.