Template:KeyValue: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Add only template)
(Added also template)
Line 19: Line 19:
|-
|-
| <code>since</code> || This Keyvalue is available since this game. Uses the template <nowiki>{{<game> add}}</nowiki>. || <code><nowiki>{{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}}</nowiki></code> || {{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}}
| <code>since</code> || This Keyvalue is available since this game. Uses the template <nowiki>{{<game> add}}</nowiki>. || <code><nowiki>{{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}}</nowiki></code> || {{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}}
|-
| <code>also</code> || This input/output is also available in this game. Uses the template <nowiki>{{<game> also}}</nowiki>. || <code><nowiki>{{IO|OnAlienSwarm|I'm also available in Garry's Mod!|since=AS|also=GMOD}}</nowiki></code> || {{IO|OnAlienSwarm|I'm also available in Garry's Mod!|since=AS|also=GMOD}}
|-
|-
| <code>only</code> || This Keyvalue is available only in this game. Uses the template <nowiki>{{<game> only}}</nowiki>. || <code><nowiki>{{KV|I love Alien Swarm|integer|I'm only available in Alien Swarm!|only=AS}}</nowiki></code> || {{KV|I love Alien Swarm|integer|I'm only available in Alien Swarm!|only=AS}}
| <code>only</code> || This Keyvalue is available only in this game. Uses the template <nowiki>{{<game> only}}</nowiki>. || <code><nowiki>{{KV|I love Alien Swarm|integer|I'm only available in Alien Swarm!|only=AS}}</nowiki></code> || {{KV|I love Alien Swarm|integer|I'm only available in Alien Swarm!|only=AS}}
Line 29: Line 31:


<hr>
<hr>
</noinclude>; {{#if: {{{deprecated|}}} | <del> }}{{{1}}} {{#if: {{{to|}}} | <span style="font-weight: normal;">to</span> {{{to}}} }} {{#if: {{{2|}}} | {{KV Type|{{{2}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{since|}}} | &nbsp;{{{{{since}}} add}} }}{{#if: {{{only|}}} | &nbsp;{{{{{only}}} only}} }}{{#if: {{{nofgd|}}} | &nbsp;{{Not in FGD}} }}
</noinclude>; {{#if: {{{deprecated|}}} | <del> }}{{{1}}} {{#if: {{{to|}}} | <span style="font-weight: normal;">to</span> {{{to}}} }} {{#if: {{{2|}}} | {{KV Type|{{{2}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{since|}}} | &nbsp;{{{{{since}}} add}} }}{{#if: {{{only|}}} | &nbsp;{{{{{only}}} only}} }}{{#if: {{{also|}}} | &nbsp;{{{{{also}}} also}} }}{{#if: {{{nofgd|}}} | &nbsp;{{Not in FGD}} }}
: {{#if: {{{deprecated|}}} | Deprecated.&nbsp; }}{{#if: {{{3|}}} | {{{3}}} | {{todo|add description}} }}<noinclude>
: {{#if: {{{deprecated|}}} | Deprecated.&nbsp; }}{{#if: {{{3|}}} | {{{3}}} | {{todo|add description}} }}<noinclude>
[[Category:FGD Templates]]
[[Category:FGD Templates]]
</noinclude>
</noinclude>

Revision as of 17:50, 24 May 2019

Template:Otherlang2 This template is used to generate Keyvalue definitions on entity pages.

Basic usage

{{KV|<name>|<variable type>|<description>}}

Note.pngNote:Don't forget to use Template:= to escape any "=" characters in the text.

Named parameters

Parameter Description Example Preview
deprecated Used to mark deprecated Keyvalues {{KV|I'm deprecated|string|Really, don't use me anymore!|deprecated=1}}
I'm deprecated <string>
Deprecated. Really, don't use me anymore!
nofgd This Keyvalue isn't available in the official FGD. {{KV|Add me to the FGD|boolean|Because I'm not there!|nofgd=1}}
Add me to the FGD <boolean> !FGD
Because I'm not there!
since This Keyvalue is available since this game. Uses the template {{<game> add}}. {{KV|I like Alien Swarm|integer|I'm available in Portal 2, too!|since=AS}}
I like Alien Swarm <integer> Template:AS add
I'm available in Portal 2, too!
also This input/output is also available in this game. Uses the template {{<game> also}}. {{IO|OnAlienSwarm|I'm also available in Garry's Mod!|since=AS|also=GMOD}}
OnAlienSwarm  (in all games since Alien Swarm) (also in Garry's Mod)
I'm also available in Garry's Mod!
only This Keyvalue is available only in this game. Uses the template {{<game> only}}. {{KV|I love Alien Swarm|integer|I'm only available in Alien Swarm!|only=AS}}
I love Alien Swarm <integer> Template:AS only
I'm only available in Alien Swarm!
to Use this to define a set of Keyvalues with very similar names. {{KV|Sound 01|to=Sound 24|string|There're many of us...}}
Sound 01 to Sound 24 <string>
There're many of us...

See also


{{{1}}}
Todo: add description