Template:KV

From Valve Developer Community
Jump to: navigation, search
English (en)Deutsch (de)français (fr)русский (ru)中文 (zh)
... Icon-Important.png
Curly brackets white.pngTemplate Documentation
Icon-translate.png
View
Edit
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.

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

Usage

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

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

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}}
I'm deprecated (deprecated) <string> Obsolete
Deprecated. Really, don't use me anymore!
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}}
Add me to the FGD (addfgd) <boolean> !FGD
Because I'm not there!
intn The internal/engine name for this Keyvalue. {{KV|Name|intn=targetname|string|The name that other entities refer to this entity by.}}
Name (targetname) <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}}
I like Alien Swarm (likealienswarm) <boolean> (in all games since Alien Swarm)
I'm available in Portal 2, too!
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}}
I like Alien Swarm (likealienswarm) <boolean> (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. 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}}
I love Alien Swarm (lovealienswarm) <integer> (only in Alien Swarm)
I'm only available in Alien Swarm!
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}}}}
I love Alien Swarm (lovealienswarm) <integer> (in all games since Alien Swarm) (not in Counter-Strike: Global Offensive)
I'm available in Portal 2 too, but not in CS:GO!
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}}}}
I love Alien Swarm (lovealienswarm) <integer> (in all games since Alien Swarm) (removed since Portal 2)
Actually... I'm not here anymore since Portal 2, including CS:GO...
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...}}
Sound 01 (Sound01) to Sound 24 (Sound24) <string>
There are many of us...

Future formatting

Parameters

  • {{{new}}} - A temporary parameter that will be deleted along with the old code as soon as all pages are updated.
  • {{{start}}} - The beginning of the table.
  • {{{end}}} - End of the table.
  • {{{divider}}} - Divides the contents of the table with an empty row.
  • {{{sectiontitle}}} - The same as {{{divider}}}, but with the ability to write text.
  • {{{deprecated}}} - Adds Obsolete Obsolete to the description, and also replaces the background of the table row.
  • {{{1}}} - Key
  • {{{2}}} - Variable
  • {{{3}}} - Property Name
  • {{{4}}} - Description
  • {{{value}}} - Default Value
  • {{{color}}} - Default Value
  • {{{rawValue}}} - Default Value
  • {{{src}}} - Source
  • {{{toKey}}} - "Key1 to Key2"
  • {{{toPN}}} - "PropertyName1 to PropertyName2"

Preview

Key (?) Variable Source (?) Property Name Default Value Description
targetname <string> Targetname Name
The targetname that other entities refer to this entity by.

Effects

rendercolor <color255> Color 78 43 62
(removed since Counter-Strike: Global Offensive)
Example.
sound1 to sound24 <string> Sound 1 to Sound 24 common/null.wav
Obsolete Obsolete(in all games since Alien Swarm)(removed since Counter-Strike: Global Offensive)(also in Garry's Mod)
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Values:

  1. Value
  2. Value
  3. Value
  4. Value
  5. Value
  6. Value
  7. Value
  8. Value
  9. Value
  10. Value
  11. Value
  12. Value

See also