Choosing Player Models: Difference between revisions
| TheBlokker (talk | contribs) m (Adding German Lang) |  (Used Template:Pre. Added IDF flag. Todo -> Clarify.) | ||
| Line 10: | Line 10: | ||
| == Creating a .kv file == | == Creating a .kv file == | ||
| {| style=float:right | {| style=float:right | ||
| |  | | {{pre| | ||
| "de_example" | "de_example" | ||
| { | { | ||
| Line 29: | Line 29: | ||
| 		"ctm_swat_variantD" "" | 		"ctm_swat_variantD" "" | ||
| 	} | 	} | ||
| } | } | ||
| }}<small>If this is the content of <code>csgo/maps/de_example.kv</code>, then <code>de_example.[[bsp]]</code> will use Anarchist and Swat player models.</small> | |||
| |} | |} | ||
| The .kv file is simply a text file that shares a name with the map, with the <code>.txt</code> extension changed to <code>.kv</code>. | The .kv file is simply a text file that shares a name with the map, with the <code>.txt</code> extension changed to <code>.kv</code>. | ||
| Line 55: | Line 56: | ||
| === Relation to [[Gamemodes.txt]] === | === Relation to [[Gamemodes.txt]] === | ||
| The information of this file will to some extent be merged with <code>csgo/gamemodes.txt</code>. The official maps don't have a <code>csgo/maps/<mapname>.kv</code> file as their content is already in <code>gamemodes.txt</code>. The map list in that file can be extended with <code>gamemodes_server.txt</code> according to the following example. {{warning|Information in these files overrides any map specific <code>csgo/maps/<mapname>.kv</code> file!}} | The information of this file will to some extent be merged with <code>csgo/gamemodes.txt</code>. The official maps don't have a <code>csgo/maps/<mapname>.kv</code> file as their content is already in <code>gamemodes.txt</code>. The map list in that file can be extended with <code>gamemodes_server.txt</code> according to the following example. {{warning|Information in these files overrides any map specific <code>csgo/maps/<mapname>.kv</code> file!}} | ||
| {{ | {{Expand| | ||
| {{pre| | |||
| "GameModes_Server.txt" | "GameModes_Server.txt" | ||
| { | { | ||
| Line 104: | Line 105: | ||
| 	} | 	} | ||
| } | } | ||
| }} | |||
| }} | }} | ||
| {{ | {{clarify|<i>The official maps use more KVs than just <code>t_models</code> and <code>ct_models</code>. Apparently, the <code>nameID</code> determines the displayed map name in the loading screen, however this KV does not seem to work in <code><mapname>.kv</code>? So where is the map specific file <code><mapname>.kv</code> read in code? Ideas: | ||
| * <code>void GameTypes::AddMapKVs( KeyValues* pKVMaps, const char* curMap )</code> | * <code>void GameTypes::AddMapKVs( KeyValues* pKVMaps, const char* curMap )</code> | ||
| * <code>void GameTypes::CheckShouldSetDefaultGameModeAndType( const char* szMapNameFull )</code> | * <code>void GameTypes::CheckShouldSetDefaultGameModeAndType( const char* szMapNameFull )</code> | ||
| Both are defined in {{cpp}} <code>gametypes.cpp</code>. In both cases it should actually be possible to ship more KVs with this file but apparently it isn't.{{why}}}} | Both are defined in {{cpp}} <code>gametypes.cpp</code>. In both cases it should actually be possible to ship more KVs with this file but apparently it isn't.{{why}}</i>}} | ||
| {{clr}} | {{clr}} | ||
| Line 120: | Line 120: | ||
| {{tip|You can use T models for CTs and vice versa! The models have nothing to do with the team of a [[player]] with one of these models.}} | {{tip|You can use T models for CTs and vice versa! The models have nothing to do with the team of a [[player]] with one of these models.}} | ||
| {{note|The model of a player also determines the arms seen for the viewmodel, as well as the radio command voice. However, it will not make the player use the appropriate radio voice of the assiciated ''agent'' (e.g. no female voice this way).}} | {{note|The model of a player also determines the arms seen for the viewmodel, as well as the radio command voice. However, it will not make the player use the appropriate radio voice of the assiciated ''agent'' (e.g. no female voice this way).}} | ||
| {| | {| width=100% | ||
| |- style=vertical-align:top | |- style=vertical-align:top | ||
| | | | | ||
| === Counter-Terrorist Models === | === Counter-Terrorist Models === | ||
| {| class=wikitable | {| class=wikitable style=margin-right:2em | ||
| | [https://counterstrike.fandom.com/wiki/FBI FBI] {{en}} | | [https://counterstrike.fandom.com/wiki/FBI FBI] {{en}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_fbi""" | 		"ctm_fbi""" | ||
| Line 138: | Line 138: | ||
| //		"ctm_fbi_variantH""" | //		"ctm_fbi_variantH""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/GIGN GIGN] {{fr}} | | [https://counterstrike.fandom.com/wiki/GIGN GIGN] {{fr}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_gign""" | 		"ctm_gign""" | ||
| Line 149: | Line 149: | ||
| 		"ctm_gign_variantD""" | 		"ctm_gign_variantD""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/GSG-9 GSG9] {{de}} | | [https://counterstrike.fandom.com/wiki/GSG-9 GSG9] {{de}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_gsg9""" | 		"ctm_gsg9""" | ||
| Line 160: | Line 160: | ||
| 		"ctm_gsg9_variantD""" | 		"ctm_gsg9_variantD""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/IDF IDF] {{ | | [https://counterstrike.fandom.com/wiki/IDF IDF] {{he}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_idf""" | 		"ctm_idf""" | ||
| Line 172: | Line 172: | ||
| 		"ctm_idf_variantF""" | 		"ctm_idf_variantF""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/SAS SAS] {{en gb}} | | [https://counterstrike.fandom.com/wiki/SAS SAS] {{en gb}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_sas""" // identical to A-E? | 		"ctm_sas""" // identical to A-E? | ||
| Line 186: | Line 186: | ||
| //		"ctm_sas_variantG""" | //		"ctm_sas_variantG""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/SEAL_Team_6 SEAL Team 6] {{en}} (default) | | [https://counterstrike.fandom.com/wiki/SEAL_Team_6 SEAL Team 6] {{en}}<br>(default) | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_st6""" | 		"ctm_st6""" | ||
| Line 205: | Line 205: | ||
| //		"ctm_st6_variantN""" | //		"ctm_st6_variantN""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/SWAT SWAT] {{en}} | | [https://counterstrike.fandom.com/wiki/SWAT SWAT] {{en}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_swat""" | 		"ctm_swat""" | ||
| Line 223: | Line 223: | ||
| //		"ctm_swat_variantK""" | //		"ctm_swat_variantK""" | ||
| 	} | 	} | ||
| }} | |||
| |} | |} | ||
| | | | | ||
| Line 230: | Line 230: | ||
| {| class=wikitable | {| class=wikitable | ||
| | [https://counterstrike.fandom.com/wiki/Anarchist Anarchist] {{en}} | | [https://counterstrike.fandom.com/wiki/Anarchist Anarchist] {{en}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_anarchist""" | 		"tm_anarchist""" | ||
| Line 238: | Line 238: | ||
| 		"tm_anarchist_variantD""" | 		"tm_anarchist_variantD""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Balkan Balkan] | | [https://counterstrike.fandom.com/wiki/Balkan Balkan] | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_balkan_variantA""" | 		"tm_balkan_variantA""" | ||
| Line 256: | Line 256: | ||
| //		"tm_balkan_variantL""" | //		"tm_balkan_variantL""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Elite_Crew Elite Crew] | | [https://counterstrike.fandom.com/wiki/Elite_Crew Elite Crew] | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_leet_variantA""" | 		"tm_leet_variantA""" | ||
| Line 273: | Line 273: | ||
| //		"tm_leet_variantK""" | //		"tm_leet_variantK""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Phoenix_Connexion Phoenix Connexion] (default) | | [https://counterstrike.fandom.com/wiki/Phoenix_Connexion Phoenix Connexion]<br>(default) | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_phoenix""" | 		"tm_phoenix""" | ||
| Line 288: | Line 288: | ||
| //		"tm_phoenix_variantI""" | //		"tm_phoenix_variantI""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Pirate Pirate] | | [https://counterstrike.fandom.com/wiki/Pirate Pirate] | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_pirate""" | 		"tm_pirate""" | ||
| Line 299: | Line 299: | ||
| 		"tm_pirate_variantD""" | 		"tm_pirate_variantD""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Professional Professional] {{en}} | | [https://counterstrike.fandom.com/wiki/Professional Professional] {{en}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_professional""" | 		"tm_professional""" | ||
| Line 320: | Line 320: | ||
| //		"tm_professional_varJ""" | //		"tm_professional_varJ""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Separatist Separatist] {{fr}} {{es}} | | [https://counterstrike.fandom.com/wiki/Separatist Separatist] {{fr}} {{es}} | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_separatist""" | 		"tm_separatist""" | ||
| Line 331: | Line 331: | ||
| 		"tm_separatist_variantD""" | 		"tm_separatist_variantD""" | ||
| 	} | 	} | ||
| }} | |||
| |} | |} | ||
| |} | |} | ||
| Line 338: | Line 338: | ||
| {| class=wikitable | {| class=wikitable | ||
| | Heavy Phoenix | | Heavy Phoenix | ||
| |  | | {{pre|style=margin:0| | ||
|          { |          { | ||
| 		"tm_phoenix_heavy""" | 		"tm_phoenix_heavy""" | ||
|          } |          } | ||
| }} | |||
| |- | |- | ||
| | Heavy CT | | Heavy CT | ||
| |  | | {{pre|style=margin:0| | ||
|          { |          { | ||
| 		"ctm_heavy""" | 		"ctm_heavy""" | ||
|          } |          } | ||
| }} | |||
| |- | |- | ||
| | Jumpsuit ({{csgo mode|Dz}}) | | Jumpsuit ({{csgo mode|Dz}}) | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_jumpsuit_variantA""" | 		"tm_jumpsuit_variantA""" | ||
| Line 358: | Line 358: | ||
| 		"tm_jumpsuit_variantC""" | 		"tm_jumpsuit_variantC""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | Diver (Operation Riptide) | | Diver (Operation Riptide) | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_diver_variantA""" | 		"ctm_diver_variantA""" | ||
| Line 367: | Line 367: | ||
| 		"ctm_diver_variantC""" | 		"ctm_diver_variantC""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | Gendarmerie (Operation Riptide) | | Gendarmerie (Operation Riptide) | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"ctm_gendarmerie_variantA""" | 		"ctm_gendarmerie_variantA""" | ||
| Line 378: | Line 378: | ||
| 		"ctm_gendarmerie_variantE""" | 		"ctm_gendarmerie_variantE""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | [https://counterstrike.fandom.com/wiki/Guerrilla_Warfare Guerrilla Warfare] (Operation Riptide) | | [https://counterstrike.fandom.com/wiki/Guerrilla_Warfare Guerrilla Warfare] (Operation Riptide) | ||
| |  | | {{pre|style=margin:0| | ||
| 	{ | 	{ | ||
| 		"tm_jungle_raider_variantA""" | 		"tm_jungle_raider_variantA""" | ||
| Line 392: | Line 392: | ||
| 		"tm_jungle_raider_variantF2""" | 		"tm_jungle_raider_variantF2""" | ||
| 	} | 	} | ||
| }} | |||
| |- | |- | ||
| | Zombie | | Zombie | ||
| |  | | {{pre|style=margin:0| | ||
|          { |          { | ||
| 		"zombie""" | 		"zombie""" | ||
|          } |          } | ||
| }} | |||
| |} | |} | ||
| ==Making CT vs CT '''or''' T vs T== | ==Making CT vs CT '''or''' T vs T== | ||
| The .kv can be set up to use models for the wrong team, e.g. SWAT vs FBI. | The .kv can be set up to use models for the wrong team, e.g. SWAT vs FBI. | ||
| {{ | {{Expand| | ||
| {{pre| | |||
| "name_of_the_map" | "name_of_the_map" | ||
|   { |   { | ||
| Line 426: | Line 426: | ||
|       } |       } | ||
|   } |   } | ||
| }} | |||
| }} | }} | ||
| == External Links == | == External Links == | ||
Revision as of 09:36, 25 February 2022
- See KeyValues for the file format.
In Template:Game name, 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 csgo/maps/ directory.
Creating a .kv file
| "de_example"
{
	"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" ""
	}
}
If this is the content ofcsgo/maps/de_example.kv, thende_example.bspwill use Anarchist and Swat player models. | 
The .kv file is simply a text file that shares a name with the 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 example on the right, it is possible to configure a map to use 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.
Syntax
See the example on the right. The first word in quotes must be the map's filename.
The key of each KeyValue inside "t_models" and/or "ct_models" is supposed to be the path to a player model. If <model> is such a key, then the game will try to use the first of the following models that exists:
- csgo/models/player/custom_player/legacy/<model>.mdl
- csgo/models/player/<model>.mdl
- csgo/models/error.mdl
The value of each of these KeyValues is ignored, so it can be left empty.
 Tip:Use the Hammer model browser to see the available models at those places. You can also see below for lists to copy-paste.
Tip:Use the Hammer model browser to see the available models at those places. You can also see below for lists to copy-paste. Tip:Generally, there can be any number and any combination of player models in a list.
Tip:Generally, there can be any number and any combination of player models in a list. Tip:If there are huge error boxes moving around the map, then you probably have misspelled at least one player model name.
Tip:If there are huge error boxes moving around the map, then you probably have misspelled at least one player model name. Note:Since the glove update, it's unnecessary to define the arms model, the engine uses the sleeve model instead.
Note:Since the glove update, it's unnecessary to define the arms model, the engine uses the sleeve model instead.Relation to Gamemodes.txt
The information of this file will to some extent be merged with csgo/gamemodes.txt. The official maps don't have a csgo/maps/<mapname>.kv file as their content is already in gamemodes.txt. The map list in that file can be extended with gamemodes_server.txt according to the following example. 
 Warning:Information in these files overrides any map specific
Warning:Information in these files overrides any map specific csgo/maps/<mapname>.kv file!| "GameModes_Server.txt"
{
	"gameTypes"
	{
		// ...
	}
	"mapgroups"
	{
		// ...
	}
	"maps"
	{
		"<mapname1>"
		{
			"t_models"
			{
				"tm_professional"""
				// ...
			} 
			
			"ct_models"
			{
				"ctm_fbi"""
				// ...
			} 
		}
		"<mapname2>"
		{
			"t_models"
			{
				"tm_professional"""
				// ...
			} 
			
			"ct_models"
			{
				"ctm_sas"""
				// ...
			} 
		}
		// ...
	}
}
 | 
t_models and ct_models. Apparently, the nameID determines the displayed map name in the loading screen, however this KV does not seem to work in <mapname>.kv? So where is the map specific file <mapname>.kv read in code? Ideas:
- void GameTypes::AddMapKVs( KeyValues* pKVMaps, const char* curMap )
- void GameTypes::CheckShouldSetDefaultGameModeAndType( const char* szMapNameFull )
 
 gametypes.cpp. In both cases it should actually be possible to ship more KVs with this file but apparently it isn't.[Why?]Model List
These excerpts are set up so that one block represents a commonly used group of models.
The other custom player models can also be used. In the lists below, they are named but commented out (//) to retain a commonly used group of models.
 Tip:You can use T models for CTs and vice versa! The models have nothing to do with the team of a player with one of these models.
Tip:You can use T models for CTs and vice versa! The models have nothing to do with the team of a player with one of these models. Note:The model of a player also determines the arms seen for the viewmodel, as well as the radio command voice. However, it will not make the player use the appropriate radio voice of the assiciated agent (e.g. no female voice this way).
Note:The model of a player also determines the arms seen for the viewmodel, as well as the radio command voice. However, it will not make the player use the appropriate radio voice of the assiciated agent (e.g. no female voice this way).| Counter-Terrorist Models
 | Terrorist Models
 | 
Other Models
| Heavy Phoenix |         {
		"tm_phoenix_heavy"""
        }
 | 
| Heavy CT |         {
		"ctm_heavy"""
        }
 | 
| Jumpsuit (  Danger Zone) | 	{
		"tm_jumpsuit_variantA"""
		"tm_jumpsuit_variantB"""
		"tm_jumpsuit_variantC"""
	}
 | 
| Diver (Operation Riptide) | 	{
		"ctm_diver_variantA"""
		"ctm_diver_variantB"""
		"ctm_diver_variantC"""
	}
 | 
| Gendarmerie (Operation Riptide) | 	{
		"ctm_gendarmerie_variantA"""
		"ctm_gendarmerie_variantB"""
		"ctm_gendarmerie_variantC"""
		"ctm_gendarmerie_variantD"""
		"ctm_gendarmerie_variantE"""
	}
 | 
| Guerrilla Warfare (Operation Riptide) | 	{
		"tm_jungle_raider_variantA"""
		"tm_jungle_raider_variantB"""
		"tm_jungle_raider_variantB2"""
		"tm_jungle_raider_variantC"""
		"tm_jungle_raider_variantD"""
		"tm_jungle_raider_variantE"""
		"tm_jungle_raider_variantF"""
		"tm_jungle_raider_variantF2"""
	}
 | 
| Zombie |         {
		"zombie"""
        }
 | 
Making CT vs CT or T vs T
The .kv can be set up to use models for the wrong team, e.g. SWAT vs FBI.
| "name_of_the_map"
 {
     "name"              "name_of_the_map"
     "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"  ""
     }
 }
 | 
External Links
KV File Writer: A gui tool that streamlines setting up and saving a CT vs T .kv
Web-based KV File Generator: A web-based utility that generates a .kv based on user input.


























