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

From Valve Developer Community
Jump to navigation Jump to search
m (weoops left in developer stuff, removed it)
m (CSGO param - TeamNum input now supports a 'teamnum_dont_put_nofgd' value)
Line 7: Line 7:
<pre>{{I BaseEntity|base=1}}</pre>
<pre>{{I BaseEntity|base=1}}</pre>
'''Game as a parameter:''' display the inputs that <code>base</code> displays, AND inputs 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. <code>l4d2</code> will not automatically include <code>l4d</code> inputs as well).
'''Game as a parameter:''' display the inputs that <code>base</code> displays, AND inputs 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. <code>l4d2</code> will not automatically include <code>l4d</code> inputs as well).
<pre>{{I BaseEntity|l4d2=1}}</pre>
<pre>{{I BaseEntity|tf2=1}}</pre>


All parameters for this template:
All parameters for this template:
Line 53: Line 53:
<!--
<!--
   ++ SetTeam (along with 'TeamNum' in CS:GO) related things go here ++
   ++ SetTeam (along with 'TeamNum' in CS:GO) related things go here ++
 
There isn't a better way to do those switch cases, is there
-->
-->
<!-- IF: TF2 == 'setteam_dont_put_nofgd' -->{{#switch: {{{tf2|}}} | setteam_dont_put_nofgd =
<!-- IF: TF2 == 'setteam_dont_put_nofgd' -->{{#switch: {{{tf2|}}} | setteam_dont_put_nofgd =
Line 70: Line 72:
| }} <!-- IF: CSS, ELSE IF: L4D, ELSE IF: L4D2 --> {{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}|
| }} <!-- IF: CSS, ELSE IF: L4D, ELSE IF: L4D2 --> {{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}|
{{IO|SetTeam|Doesn't do anything in {{l4ds}}.
{{IO|SetTeam|Doesn't do anything in {{l4ds}}.
:{{todo|Does this work in {{css}}?}}
{{confirm|Works in {{css}}?}}
<!--
<!--
:*0: None
:*0: None
Line 79: Line 81:
|deprecated=1|nofgd=1 }}
|deprecated=1|nofgd=1 }}
| }}}}}} <!-- IF: CSGO --> {{#if:{{{csgo|}}}|
| }}}}}} <!-- IF: CSGO --> {{#if:{{{csgo|}}}|
{{IO|SetTeam|Only<code>TeamNum</code>works in {{csgo}}.|deprecated=1}}
<!-- IF: CSGO == 'teamnum_dont_put_nofgd' --> {{#switch:{{{csgo|}}} | teamnum_dont_put_nofgd =
{{IO|SetTeam|Only<code>TeamNum</code>works in {{csgo}}.|deprecated=1}}| <!-- ELSE IF: CSGO == 1 --> 1 =
{{IO|SetTeam|Only<code>TeamNum</code>works in {{csgo}}.|deprecated=1|nofgd=1}}
}}
<!-- SCOPE 1 END -->
{{IO|TeamNum|Reassign the team of this entity as the team using this number.
{{IO|TeamNum|Reassign the team of this entity as the team using this number.
:*0: None
:*0: None

Revision as of 12:12, 13 April 2021

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

This template is our holder for all inputs 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 inputs for ALL games.

{{I BaseEntity}}

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

{{I BaseEntity|base=1}}

Game as a parameter: display the inputs that base displays, AND inputs 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 inputs as well).

{{I BaseEntity|tf2=1}}

All parameters for this template:

  • base - (Use if the entity was available before L4D2.)
  • l4d2
  • portal2
  • prel4d - (DEPRECATED 9/28/18: This parameter existed to hide DispatchEffect for games (ones before l4d) that did not have it. There's many cases of similar inputs and keyvalues that aren't in absolutely everything, and making similar parameters for all of those simply isn't worth the trouble, especially considering having to comb through every existing use of those templates. Parameter is totally removed from code and affects nothing.)
  • tf2 - AlterSetTeaminput to show TF2 specific information. Usetf2=setteam_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 inputs are duplicated, for complex technical reasons.

For full documentation on this family of templates, see FGD Template Prototype. Still confused on something? Ask for help before editing this template.

Note.pngNote:Some CBaseEntity inputs are not covered here. See the talk page.