Choosing Player Models: Difference between revisions
No edit summary |
No edit summary |
||
(35 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{Subpage|[[Counter-Strike: Global Offensive Level Creation]]}}{{Delisted|cat=doc}} | |||
:''See [[KeyValues]] for the file format.'' | |||
In {{Csgo|4}}, 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 <code><mapname>.kv</code> file that lives in the <code>csgo/maps/</code> directory. | |||
== Creating a .kv file == | |||
{| style=float:right | |||
| {{pre| | |||
"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" "" | |||
} | |||
} | |||
}}<small>If this is the content of <code>csgo/maps/de_example.kv</code>, then<br><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>. | |||
For example, if there were a custom map called <code>de_example.bsp</code> in the <code>Counter-Strike Global Offensive/csgo/maps/</code> folder, then there should be a file called <code>de_example.kv</code> 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. | |||
The | === Syntax === | ||
See the example on the right. The first word in quotes must be the [[BSP|map]]'s filename. | |||
The key of each KeyValue inside <code>"t_models"</code> and/or <code>"ct_models"</code> is supposed to be the path to a player model. If <code><model></code> is such a key, then the game will try to use the first of the following models that exists: | |||
# <code>csgo/models/player/custom_player/legacy/<model>.mdl</code> | |||
# <code>csgo/models/player/<model>.mdl</code> | |||
# <code>csgo/models/error.mdl</code> | |||
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 [[#Model List|below]] for lists to copy-paste.}} | |||
{{Tip|Generally, there can be '''any combination''' of player models in a list with a '''maximum number of ten''' models.}} | |||
{{Tip|If there are huge error boxes moving around the map, then you probably have misspelled at least one player model name, or listed too many models.}} | |||
{{Note|Since the glove update, it's unnecessary to define the arms model, the engine uses the sleeve model instead.}} | |||
{{Clr}} | |||
< | === 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!}} | ||
{{Expand| | |||
{{pre| | |||
"GameModes_Server.txt" | |||
{ | { | ||
"gameTypes" | |||
{ | |||
// ... | |||
} | |||
{{ | "mapgroups" | ||
==Model | { | ||
< | // ... | ||
} | |||
FBI | |||
"maps" | |||
{ | |||
"<mapname1>" | |||
{ | |||
"t_models" | |||
{ | |||
"tm_professional""" | |||
// ... | |||
} | |||
"ct_models" | |||
{ | |||
"ctm_fbi""" | |||
// ... | |||
} | |||
} | |||
"<mapname2>" | |||
{ | |||
"t_models" | |||
{ | |||
"tm_professional""" | |||
// ... | |||
} | |||
"ct_models" | |||
{ | |||
"ctm_sas""" | |||
// ... | |||
} | |||
} | |||
// ... | |||
} | |||
} | |||
}} | |||
}} | |||
{{Clarify|''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::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}}''}} | |||
{{Clr}} | |||
== 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 (<code>//</code>) 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.}} | |||
{{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 | |||
| | |||
=== Counter-Terrorist Models === | |||
{| class=wikitable style=margin-right:2em | |||
| [https://counterstrike.fandom.com/wiki/FBI FBI] {{Flag|en}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_fbi""" | "ctm_fbi""" | ||
Line 46: | Line 129: | ||
"ctm_fbi_variantC""" | "ctm_fbi_variantC""" | ||
"ctm_fbi_variantD""" | "ctm_fbi_variantD""" | ||
// "ctm_fbi_variantE""" | |||
// "ctm_fbi_variantF""" | |||
// "ctm_fbi_variantG""" | |||
// "ctm_fbi_variantH""" | |||
} | } | ||
GIGN | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/GIGN GIGN] {{Flag|fr}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_gign""" | "ctm_gign""" | ||
Line 55: | Line 145: | ||
"ctm_gign_variantD""" | "ctm_gign_variantD""" | ||
} | } | ||
GSG | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/GSG-9 GSG9] {{Flag|de}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_gsg9""" | "ctm_gsg9""" | ||
Line 63: | Line 156: | ||
"ctm_gsg9_variantD""" | "ctm_gsg9_variantD""" | ||
} | } | ||
IDF | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/IDF IDF] {{Flag|he}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_idf""" | "ctm_idf""" | ||
Line 72: | Line 168: | ||
"ctm_idf_variantF""" | "ctm_idf_variantF""" | ||
} | } | ||
SAS | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/SAS SAS] {{Flag|en-GB}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_sas""" | "ctm_sas""" // identical to A-E? | ||
"ctm_sas_variantA""" | "ctm_sas_variantA""" | ||
"ctm_sas_variantB""" | "ctm_sas_variantB""" | ||
Line 80: | Line 179: | ||
"ctm_sas_variantD""" | "ctm_sas_variantD""" | ||
"ctm_sas_variantE""" | "ctm_sas_variantE""" | ||
// "ctm_sas_variantF""" | |||
// "ctm_sas_variantG""" | |||
} | } | ||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/SEAL_Team_6 SEAL Team 6] {{Flag|en}}<br>(default) | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_st6""" | "ctm_st6""" | ||
Line 88: | Line 192: | ||
"ctm_st6_variantC""" | "ctm_st6_variantC""" | ||
"ctm_st6_variantD""" | "ctm_st6_variantD""" | ||
// "ctm_st6_variantE""" | |||
// "ctm_st6_variantG""" | |||
// "ctm_st6_variantI""" | |||
// "ctm_st6_variantJ""" | |||
// "ctm_st6_variantK""" // German | |||
// "ctm_st6_variantL""" | |||
// "ctm_st6_variantM""" | |||
// "ctm_st6_variantN""" // Brazilian | |||
} | } | ||
SWAT | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/SWAT SWAT] {{Flag|en}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"ctm_swat""" | "ctm_swat""" | ||
Line 96: | Line 211: | ||
"ctm_swat_variantC""" | "ctm_swat_variantC""" | ||
"ctm_swat_variantD""" | "ctm_swat_variantD""" | ||
// "ctm_swat_variantE""" | |||
// "ctm_swat_variantF""" | |||
// "ctm_swat_variantG""" | |||
// "ctm_swat_variantH""" | |||
// "ctm_swat_variantI""" | |||
// "ctm_swat_variantJ""" | |||
// "ctm_swat_variantK""" | |||
} | } | ||
}} | |||
|} | |||
| | |||
=== Terrorist Models === | |||
Anarchist | {| class=wikitable | ||
| [https://counterstrike.fandom.com/wiki/Anarchist Anarchist] {{Flag|en}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_anarchist""" | "tm_anarchist""" | ||
Line 107: | Line 234: | ||
"tm_anarchist_variantD""" | "tm_anarchist_variantD""" | ||
} | } | ||
Balkan | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/Balkan Balkan] | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_balkan_variantA""" | "tm_balkan_variantA""" | ||
Line 114: | Line 244: | ||
"tm_balkan_variantD""" | "tm_balkan_variantD""" | ||
"tm_balkan_variantE""" | "tm_balkan_variantE""" | ||
// "tm_balkan_variantF""" | |||
// "tm_balkan_variantG""" | |||
// "tm_balkan_variantH""" | |||
// "tm_balkan_variantI""" | |||
// "tm_balkan_variantJ""" | |||
// "tm_balkan_variantK""" | |||
// "tm_balkan_variantL""" | |||
} | } | ||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/Elite_Crew Elite Crew] | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_leet_variantA""" | "tm_leet_variantA""" | ||
Line 122: | Line 262: | ||
"tm_leet_variantD""" | "tm_leet_variantD""" | ||
"tm_leet_variantE""" | "tm_leet_variantE""" | ||
// "tm_leet_variantF""" | |||
// "tm_leet_variantG""" | |||
// "tm_leet_variantH""" | |||
// "tm_leet_variantI""" | |||
// "tm_leet_variantJ""" | |||
// "tm_leet_variantK""" | |||
} | } | ||
Phoenix | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/Phoenix_Connexion Phoenix Connexion] {{Flag|ru}}<br>(default) | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_phoenix""" | "tm_phoenix""" | ||
Line 130: | Line 279: | ||
"tm_phoenix_variantC""" | "tm_phoenix_variantC""" | ||
"tm_phoenix_variantD""" | "tm_phoenix_variantD""" | ||
// "tm_phoenix_variantF""" | |||
// "tm_phoenix_variantG""" | |||
// "tm_phoenix_variantH""" | |||
// "tm_phoenix_variantI""" | |||
} | } | ||
Pirate | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/Pirate Pirate] | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_pirate""" | "tm_pirate""" | ||
Line 139: | Line 295: | ||
"tm_pirate_variantD""" | "tm_pirate_variantD""" | ||
} | } | ||
Professional | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/Professional Professional] {{Flag|en}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_professional""" | "tm_professional""" | ||
Line 146: | Line 305: | ||
"tm_professional_var3""" | "tm_professional_var3""" | ||
"tm_professional_var4""" | "tm_professional_var4""" | ||
// "tm_professional_varF""" | |||
// "tm_professional_varF1""" | |||
// "tm_professional_varF2""" | |||
// "tm_professional_varF3""" | |||
// "tm_professional_varF4""" | |||
// "tm_professional_varF5""" | |||
// "tm_professional_varG""" | |||
// "tm_professional_varH""" | |||
// "tm_professional_varI""" | |||
// "tm_professional_varJ""" | |||
} | } | ||
Separatist | }} | ||
|- | |||
| [https://counterstrike.fandom.com/wiki/Separatist Separatist] {{Flag|fr}} {{Flag|es}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | { | ||
"tm_separatist""" | "tm_separatist""" | ||
Line 155: | Line 327: | ||
"tm_separatist_variantD""" | "tm_separatist_variantD""" | ||
} | } | ||
}} | |||
|} | |||
|} | |||
< | === Other Models === | ||
" | {{Note|Giving players the model of a Heavy Phoenix or a Heavy CT changes only their appearance; it does not give them an [[item_heavyassaultsuit]].}} | ||
{| class=wikitable | |||
| Heavy Phoenix {{Flag|ru}} | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"tm_phoenix_heavy""" | |||
} | |||
}} | |||
|- | |||
| Heavy CT<br>({{Csgo mode|Coop}}) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"ctm_heavy""" | |||
} | |||
}} | |||
|- | |||
| Jumpsuit<br>({{Csgo mode|Dz}}) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"tm_jumpsuit_variantA""" | |||
"tm_jumpsuit_variantB""" | |||
"tm_jumpsuit_variantC""" | |||
</ | } | ||
}} | |||
|- | |||
| SEAL Frogman {{Flag|en}}<br>({{CsgoOperation|Riptide}}) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"ctm_diver_variantA""" | |||
"ctm_diver_variantB""" | |||
"ctm_diver_variantC""" | |||
} | |||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/Gendarmerie_Nationale Gendarmerie Nationale] {{Flag|fr}}<br>({{csgoOperation|Riptide}}) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"ctm_gendarmerie_variantA""" | |||
"ctm_gendarmerie_variantB""" | |||
"ctm_gendarmerie_variantC""" | |||
"ctm_gendarmerie_variantD""" | |||
"ctm_gendarmerie_variantE""" | |||
} | |||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/Guerrilla_Warfare Guerrilla Warfare] {{Flag|pt-br}}<br>({{csgoOperation|Riptide}}) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"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 | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"zombie""" | |||
} | |||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/Georgian_Riot_Police Georgian Riot Police] {{Flag|ka}} <br>(Obsolete) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"ctm_georgian" | |||
} | |||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/MPSSC Military Police Special Services Company] {{Flag|zh-tw}} <br>(Obsolete) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"ctm_mpssc" | |||
} | |||
}} | |||
|- | |||
| Yakuza {{Flag|ja}} <br>(Obsolete) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"tm_yakuza" | |||
} | |||
}} | |||
|- | |||
| [https://counterstrike.fandom.com/wiki/Heavy_Riot Heavy Riot] <br>(Obsolete) | |||
| {{pre|style=margin:0; display:block| | |||
{ | |||
"tm_heavy_riot" | |||
} | |||
}} | |||
|} | |||
== | == External links == | ||
KV File Writer | '''KV File Writer''': A gui tool that streamlines setting up and saving a CT vs T .kv | ||
A gui tool that streamlines setting up and saving a CT vs T .kv | |||
* [http://nickharuk.wordpress.com/kv-file-writer/ Creator's Page] | * [http://nickharuk.wordpress.com/kv-file-writer/ Creator's Page] | ||
* [http:// | * [http://gamebanana.com/tools/5552 FPSBanana] | ||
'''Web-based KV File Generator''': A web-based utility that generates a .kv based on user input. | |||
* [http://kvfilegen.appspot.com/ kvFileGen.appspot.com] | |||
[[Category:Counter-Strike: Global Offensive]] | |||
[[Category:Level Design]] | [[Category:Level Design]] | ||
[[Category: | [[Category:Plain text files]] |
Latest revision as of 05:55, 10 February 2025

It is covered here for historical and technical reference.
- See KeyValues for the file format.
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 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 of csgo/maps/de_example.kv , thende_example.bsp will 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.




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.

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.


Counter-Terrorist Models
|
Terrorist Models
|
Other Models

Heavy Phoenix ![]() |
{ "tm_phoenix_heavy""" } |
Heavy CT ( ![]() |
{ "ctm_heavy""" } |
Jumpsuit ( ![]() |
{ "tm_jumpsuit_variantA""" "tm_jumpsuit_variantB""" "tm_jumpsuit_variantC""" } |
SEAL Frogman ![]() ( ![]() |
{ "ctm_diver_variantA""" "ctm_diver_variantB""" "ctm_diver_variantC""" } |
Gendarmerie Nationale ![]() ( ![]() |
{ "ctm_gendarmerie_variantA""" "ctm_gendarmerie_variantB""" "ctm_gendarmerie_variantC""" "ctm_gendarmerie_variantD""" "ctm_gendarmerie_variantE""" } |
Guerrilla Warfare ![]() ( ![]() |
{ "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""" } |
Georgian Riot Police ![]() (Obsolete) |
{ "ctm_georgian" } |
Military Police Special Services Company ![]() (Obsolete) |
{ "ctm_mpssc" } |
Yakuza ![]() (Obsolete) |
{ "tm_yakuza" } |
Heavy Riot (Obsolete) |
{ "tm_heavy_riot" } |
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.