Template:KeyValue: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added documentation and fixed some minor things)
mNo edit summary
Line 19: Line 19:
| <code>to</code> || Use this to define a set of Keyvalues with very similar names. || <code><nowiki>{{KV|Sound 01|to=Sound 24|string|There're many of us...}}</nowiki></code> || {{KV|Sound 01|to=Sound 24|string|There're many of us...}}
| <code>to</code> || Use this to define a set of Keyvalues with very similar names. || <code><nowiki>{{KV|Sound 01|to=Sound 24|string|There're many of us...}}</nowiki></code> || {{KV|Sound 01|to=Sound 24|string|There're many of us...}}
|}
|}
== See also ==
* [[Template:IO]]
<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: {{{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: {{{nofgd|}}} | &nbsp;{{Not in FGD}} }}

Revision as of 22:02, 9 June 2011

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!
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