Choosing Player Models

From Valve Developer Community
Revision as of 00:52, 19 February 2013 by Nezumi (talk | contribs) (added some 'todo' points)
Jump to: navigation, search

In Counter-Strike: Global Offensive, custom maps can be configured to use different player models, or a variety of player models, for the Terrorist and Counter-Terrorist teams. These models are specified in a <mapname>.kv file that lives in the Counter-Strike: Global Offensive maps directory.

Creating a .kv file

The .kv file is simply a text file that shares a name with the custom map, with the .txt extension changed to .kv. For example, if there were a custom map called 'de_example.bsp' in the 'Counter-Strike Global Offensive\csgo\maps' folder, then there should be a file called 'de_example.kv' in the same folder.

The .kv file contains a list of key/value pairs formatted similarly to other text files used by the source engine, such as .vmt files for materials.

As can be seen in the below example, it is possible to configure a map to use a specific set of view model arms for each team, as well as a variety of world player models for each team. Unlike in previous Counter-Strike games, the player's model is chosen randomly from this list, instead of allowing the player to choose.

   "name" "de_example"
   "t_arms" "models/weapons/t_arms_anarchist.mdl"
   "ct_arms" "models/weapons/ct_arms_fbi.mdl"
      "tm_anarchist" ""
      "tm_anarchist_variantA" ""
      "tm_anarchist_variantB" ""
      "tm_anarchist_variantC" ""
      "tm_anarchist_variantD" ""
      "ctm_swat" ""
      "ctm_swat_variantA" ""
      "ctm_swat_variantB" ""
      "ctm_swat_variantC" ""
      "ctm_swat_variantD" ""
Tip.png Tip: Use the model viewer to browse the available models. It should be possible to mix and match as much as you like
  • To do: What else can the .kv do? The .kv might be involved in setting up the overview for spectating.
  • {{todo|Can the players use models for the wrong team, i.e. 'swat' vs. 'fbi'?