Choosing Player Models

From Valve Developer Community
Jump to: navigation, search
Русский 简体中文
Note:.kv file redirects here

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.

"de_example"
{
   "name" "Example"
   "t_arms" "models/weapons/t_arms_anarchist.mdl"
   "ct_arms" "models/weapons/ct_arms_fbi.mdl"
   "t_models"
   {
      "tm_anarchist" ""
      "tm_anarchist_variantA" ""
      "tm_anarchist_variantB" ""
      "tm_anarchist_variantC" ""
      "tm_anarchist_variantD" ""
   }
   "ct_models"
   {
      "ctm_swat" ""
      "ctm_swat_variantA" ""
      "ctm_swat_variantB" ""
      "ctm_swat_variantC" ""
      "ctm_swat_variantD" ""
   }
}
Tip:Use the model viewer to browse the available models. It should be possible to mix and match as much as you like
Tip:After the glove update, it's unnecessary to define the arms model, the engine uses the sleeve model instead.

Model list

COUNTER-TERRORIST
FBI		"models/weapons/ct_arms_fbi.mdl"
	{
		"ctm_fbi"""
		"ctm_fbi_variantA"""
		"ctm_fbi_variantB"""
		"ctm_fbi_variantC"""
		"ctm_fbi_variantD"""
	}
GIGN		"models/weapons/ct_arms_gign.mdl"
	{
		"ctm_gign"""
		"ctm_gign_variantA"""
		"ctm_gign_variantB"""
		"ctm_gign_variantC"""
		"ctm_gign_variantD"""
	}
GSG		"models/weapons/ct_arms_gsg9.mdl"
	{
		"ctm_gsg9"""
		"ctm_gsg9_variantA"""
		"ctm_gsg9_variantB"""
		"ctm_gsg9_variantC"""
		"ctm_gsg9_variantD"""
	}
IDF		"models/weapons/ct_arms_idf.mdl"
	{
		"ctm_idf"""
		"ctm_idf_variantB"""
		"ctm_idf_variantC"""
		"ctm_idf_variantD"""
		"ctm_idf_variantE"""
		"ctm_idf_variantF"""
	}
SAS		"models/weapons/ct_arms_sas.mdl"
	{
		"ctm_sas"""
		"ctm_sas_variantA"""
		"ctm_sas_variantB"""
		"ctm_sas_variantC"""
		"ctm_sas_variantD"""
		"ctm_sas_variantE"""
	}
SEALS		"models/weapons/ct_arms_st6.mdl" or "models/weapons/ct_arms.mdl"
	{
		"ctm_st6"""
		"ctm_st6_variantA"""
		"ctm_st6_variantB"""
		"ctm_st6_variantC"""
		"ctm_st6_variantD"""
	}
SWAT		"models/weapons/ct_arms_swat.mdl"
	{
		"ctm_swat"""
		"ctm_swat_variantA"""
		"ctm_swat_variantB"""
		"ctm_swat_variantC"""
		"ctm_swat_variantD"""
	}

TERRORIST
Anarchist	"models/weapons/t_arms_anarchist.mdl"
	{
		"tm_anarchist"""
		"tm_anarchist_variantA"""
		"tm_anarchist_variantB"""
		"tm_anarchist_variantC"""
		"tm_anarchist_variantD"""
	}
Balkan		"models/weapons/t_arms_balkan.mdl"
	{
		"tm_balkan_variantA"""
		"tm_balkan_variantB"""
		"tm_balkan_variantC"""
		"tm_balkan_variantD"""
		"tm_balkan_variantE"""
	}
LEET		"models/weapons/t_arms_leet.mdl" or "models/weapons/t_arms.mdl"
	{
		"tm_leet_variantA"""
		"tm_leet_variantB"""
		"tm_leet_variantC"""
		"tm_leet_variantD"""
		"tm_leet_variantE"""
	}
Phoenix		"models/weapons/t_arms_phoenix.mdl"
	{
		"tm_phoenix"""
		"tm_phoenix_variantA"""
		"tm_phoenix_variantB"""
		"tm_phoenix_variantC"""
		"tm_phoenix_variantD"""
	}
Pirate		"models/weapons/t_arms_pirate.mdl"
	{
		"tm_pirate"""
		"tm_pirate_variantA"""
		"tm_pirate_variantB"""
		"tm_pirate_variantC"""
		"tm_pirate_variantD"""
	}
Professional	"models/weapons/t_arms_professional.mdl"
	{
		"tm_professional"""
		"tm_professional_var1"""
		"tm_professional_var2"""
		"tm_professional_var3"""
		"tm_professional_var4"""
	}
Separatist	"models/weapons/t_arms_separatist.mdl"
	{
		"tm_separatist"""
		"tm_separatist_variantA"""
		"tm_separatist_variantB"""
		"tm_separatist_variantC"""
		"tm_separatist_variantD"""
	}

OTHER MODELS
Zombie
        {
		"zombie"""
        }
Heavy Phoenix
        {
		"tm_phoenix_heavy"""
        }

Making CT vs CT or T vs T

The .kv can be set up to use models for the wrong team, i.e. 'swat' vs 'fbi'

"name_of_the_map"
 {
     "name"              "name_of_the_map"
     "t_arms"            "models/weapons/ct_arms_swat.mdl"
     "ct_arms"           "models/weapons/ct_arms_gign.mdl"
     "t_models"
     {
         "ctm_swat"       ""
         "ctm_swat_varianta"  ""
         "ctm_swat_variantb"  ""
         "ctm_swat_variantc"  ""
         "ctm_swat_variantd"  ""
     }
     "ct_models"
     {
         "ctm_gign"       ""
         "ctm_gign_varianta"  ""
         "ctm_gign_variantb"  ""
         "ctm_gign_variantc"  ""
         "ctm_gign_variantd"  ""
     }
 }

KV File Writer

A gui tool that streamlines setting up and saving a CT vs T .kv

External links

Web-based KV File Generator

A web-based utility that generates a .kv based on user input.

External link


  • To do: What else can the .kv do? The .kv might be involved in setting up the overview for spectating.