Template:KeyValue/doc: Difference between revisions
Jump to navigation
Jump to search
Note:Don't forget to use Template:= to escape any "=" characters in the text.
No edit summary Tag: Manual revert |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
! Parameter || Description || Example || Preview | ! Parameter || Description || Example || Preview | ||
|- | |- | ||
| <code>deprecated</code> || This Keyvalue is deprecated and should no longer be used. || < | | align="center" | <code>deprecated</code> || This Keyvalue is deprecated and should no longer be used. || <pre style="margin:0">{{KV|I'm deprecated|intn=deprecated|string|Really, don't use me anymore!|deprecated=1}}</pre> || bgcolor="#262626" | {{KV|I'm deprecated|intn=deprecated|string|Really, don't use me anymore!|deprecated=1}} | ||
|- | |- | ||
| <code>nofgd</code> || This Keyvalue isn't available in the official FGD. || < | | align="center" | <code>nofgd</code> || This Keyvalue isn't available in the official FGD. || <pre style="margin:0">{{KV|Add me to the FGD|intn=addfgd|boolean|Because I'm not there!|nofgd=1}}</pre> || bgcolor="#262626" | {{KV|Add me to the FGD|intn=addfgd|boolean|Because I'm not there!|nofgd=1}} | ||
|- | |- | ||
| <code>intn</code> || The internal/engine name for this Keyvalue.<br>Required; if absent, the page will display green todo text and applies [[:Category:Pages with undefined internal keyvalue names]]. You can look for internal names in [[:Category:Valve FGDs|fgds]]. If internal name doesn't need to be specified use <code>intn=0.</code> | | align="center" | <code>intn</code> || The internal/engine name for this Keyvalue.<br>Required; if absent, the page will display green todo text and applies [[:Category:Pages with undefined internal keyvalue names]]. You can look for internal names in [[:Category:Valve FGDs|fgds]]. If internal name doesn't need to be specified use <code>intn=0.</code> || <pre style="margin:0">{{KV|Name|intn=targetname|string|The name that other entities refer to this entity by.}}</nowiki><br/><nowiki> | ||
| < | {{KV|Name|string|The name that other entities refer to this entity by.}}</pre> || bgcolor="#262626" | {{KV|Name|intn=targetname|string|The name that other entities refer to this entity by.}} | ||
{{KV|Name|string|The name that other entities refer to this entity by.}}</ | |||
| {{KV|Name|intn=targetname|string|The name that other entities refer to this entity by.}} | |||
{{KV|Name|string|The name that other entities refer to this entity by.}} | {{KV|Name|string|The name that other entities refer to this entity by.}} | ||
|- | |- | ||
| <code>since</code> || This Keyvalue is available since this game. Can use either <nowiki>{{<game> add}}</nowiki> or {{tl|Since}} templates. || < | | align="center" | <code>since</code> || This Keyvalue is available since this game. Can use either <nowiki>{{<game> add}}</nowiki> or {{tl|Since}} templates. || <pre style="margin:0">{{KV|I like Alien Swarm|intn=likealienswarm|bool|I'm available in Portal 2, too!|since=AS}}</pre> || bgcolor="#262626" | {{KV|I like Alien Swarm|intn=likealienswarm|bool|I'm available in Portal 2, too!|since=AS}} | ||
|- | |- | ||
| <code>also</code> || This Keyvalue is also available in this game. Can use either <nowiki>{{<game> also}}</nowiki> or {{tl|Also}} templates. || < | | align="center" | <code>also</code> || This Keyvalue is also available in this game. Can use either <nowiki>{{<game> also}}</nowiki> or {{tl|Also}} templates. || <pre style="margin:0">{{KV|I like Alien Swarm|intn=likealienswarm|bool|I'm also available in Garry's Mod!|since=AS|also=GMOD}}</pre> || bgcolor="#262626" | {{KV|I like Alien Swarm|intn=likealienswarm|bool|I'm also available in Garry's Mod!|since=AS|also={{GMOD}}}} | ||
|- | |- | ||
| <code>only</code> || This Keyvalue is available only in this game. Can use either <nowiki>{{<game> only}}</nowiki> or {{tl|Only}} templates. || < | | align="center" | <code>only</code> || This Keyvalue is available only in this game. Can use either <nowiki>{{<game> only}}</nowiki> or {{tl|Only}} templates. || <pre style="margin:0">{{KV|I love Alien Swarm|intn=lovealienswarm|integer|I'm only available in Alien Swarm!|only=AS}}</pre> || bgcolor="#262626" | {{KV|I love Alien Swarm|intn=lovealienswarm|integer|I'm only available in Alien Swarm!|only=AS}} | ||
|- | |- | ||
| <code>not</code> || This Keyvalue is not available just in this game. Only uses the template {{tl|Not}}. || < | | align="center" | <code>not</code> || This Keyvalue is not available just in this game. Only uses the template {{tl|Not}}. || <pre style="margin:0">{{KV|I love Alien Swarm|intn=lovealienswarm|integer|I'm available in Portal 2 too, but not in CS:GO!|since={{as}}|removed={{csgo}}}}</pre> || bgcolor="#262626" | {{KV|I love Alien Swarm|intn=lovealienswarm|integer|I'm available in Portal 2 too, but not in CS:GO!|since={{as}}|not={{csgo}}}} | ||
|- | |- | ||
| <code>removed</code> || This Keyvalue was removed in this game onwards. Only uses the template {{tl|Removed}}. || < | | align="center" | <code>removed</code> || This Keyvalue was removed in this game onwards. Only uses the template {{tl|Removed}}. || <pre style="margin:0">{{KV|I love Alien Swarm|intn=lovealienswarm|integer|Actually... I'm not here anymore since Portal 2, including CS:GO...|since={{as}}|removed={{csgo}}}}</pre> || bgcolor="#262626" | {{KV|I love Alien Swarm|intn=lovealienswarm|integer|Actually... I'm not here anymore since Portal 2, including CS:GO...|since={{as}}|removed={{portal2}}}} | ||
|- | |- | ||
| <code>to</code> || Use this to define a set of Keyvalues with very similar names. Use <code>intn2</code> for the second keyvalue's internal name. || < | | align="center" | <code>to</code> || Use this to define a set of Keyvalues with very similar names. Use <code>intn2</code> for the second keyvalue's internal name. || <pre style="margin:0">{{KV|Sound 01|intn=Sound01|to=Sound 24|intn2=Sound24|string|There are many of us...}}</pre> || bgcolor="#262626" | {{KV|Sound 01|intn=Sound01|to=Sound 24|intn2=Sound24|string|There are many of us...}} | ||
|} | |} | ||
Latest revision as of 10:18, 2 September 2025

This is a documentation subpage for Template:KeyValue.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template is used to generate Keyvalue definitions on entity pages.
Usage
{{KV|<name>|<variable type>|<description>}}

Examples and Parameters
Parameter | Description | Example | Preview |
---|---|---|---|
deprecated |
This Keyvalue is deprecated and should no longer be used. | {{KV|I'm deprecated|intn=deprecated|string|Really, don't use me anymore!|deprecated=1}} |
|
nofgd |
This Keyvalue isn't available in the official FGD. | {{KV|Add me to the FGD|intn=addfgd|boolean|Because I'm not there!|nofgd=1}} |
|
intn |
The internal/engine name for this Keyvalue. Required; if absent, the page will display green todo text and applies Category:Pages with undefined internal keyvalue names. You can look for internal names in fgds. If internal name doesn't need to be specified use intn=0. |
{{KV|Name|intn=targetname|string|The name that other entities refer to this entity by.}}</nowiki><br/><nowiki> {{KV|Name|string|The name that other entities refer to this entity by.}} |
|
since |
This Keyvalue is available since this game. Can use either {{<game> add}} or {{Since}} templates. |
{{KV|I like Alien Swarm|intn=likealienswarm|bool|I'm available in Portal 2, too!|since=AS}} |
|
also |
This Keyvalue is also available in this game. Can use either {{<game> also}} or {{Also}} templates. |
{{KV|I like Alien Swarm|intn=likealienswarm|bool|I'm also available in Garry's Mod!|since=AS|also=GMOD}} |
|
only |
This Keyvalue is available only in this game. Can use either {{<game> only}} or {{Only}} templates. |
{{KV|I love Alien Swarm|intn=lovealienswarm|integer|I'm only available in Alien Swarm!|only=AS}} |
|
not |
This Keyvalue is not available just in this game. Only uses the template {{Not}} . |
{{KV|I love Alien Swarm|intn=lovealienswarm|integer|I'm available in Portal 2 too, but not in CS:GO!|since={{as}}|removed={{csgo}}}} |
|
removed |
This Keyvalue was removed in this game onwards. Only uses the template {{Removed}} . |
{{KV|I love Alien Swarm|intn=lovealienswarm|integer|Actually... I'm not here anymore since Portal 2, including CS:GO...|since={{as}}|removed={{csgo}}}} |
|
to |
Use this to define a set of Keyvalues with very similar names. Use intn2 for the second keyvalue's internal name. |
{{KV|Sound 01|intn=Sound01|to=Sound 24|intn2=Sound24|string|There are many of us...}} |
|
See also