Choosing Player Models: Difference between revisions
m (fixed the link to gamebanana) |
m (Cleanup. Added Link to Gendarmerie Nationale. Removed redundant 'Making T vs T or CT vs CT' section.) |
||
| Line 26: | Line 26: | ||
} | } | ||
} | } | ||
}}<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> | }}<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>. | 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 122: | Line 122: | ||
{| class=wikitable style=margin-right:2em | {| 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| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_fbi""" | "ctm_fbi""" | ||
| Line 137: | Line 137: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/GIGN GIGN] {{fr}} | | [https://counterstrike.fandom.com/wiki/GIGN GIGN] {{fr}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_gign""" | "ctm_gign""" | ||
| Line 148: | Line 148: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/GSG-9 GSG9] {{de}} | | [https://counterstrike.fandom.com/wiki/GSG-9 GSG9] {{de}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_gsg9""" | "ctm_gsg9""" | ||
| Line 159: | Line 159: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/IDF IDF] {{he}} | | [https://counterstrike.fandom.com/wiki/IDF IDF] {{he}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_idf""" | "ctm_idf""" | ||
| Line 171: | Line 171: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/SAS SAS] {{en gb}} | | [https://counterstrike.fandom.com/wiki/SAS SAS] {{en gb}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_sas""" // identical to A-E? | "ctm_sas""" // identical to A-E? | ||
| Line 185: | Line 185: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/SEAL_Team_6 SEAL Team 6] {{en}}<br>(default) | | [https://counterstrike.fandom.com/wiki/SEAL_Team_6 SEAL Team 6] {{en}}<br>(default) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_st6""" | "ctm_st6""" | ||
| Line 196: | Line 196: | ||
// "ctm_st6_variantI""" | // "ctm_st6_variantI""" | ||
// "ctm_st6_variantJ""" | // "ctm_st6_variantJ""" | ||
// "ctm_st6_variantK""" | // "ctm_st6_variantK""" // German | ||
// "ctm_st6_variantL""" | // "ctm_st6_variantL""" | ||
// "ctm_st6_variantM""" | // "ctm_st6_variantM""" | ||
// "ctm_st6_variantN""" | // "ctm_st6_variantN""" // Brazilian | ||
} | } | ||
}} | }} | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/SWAT SWAT] {{en}} | | [https://counterstrike.fandom.com/wiki/SWAT SWAT] {{en}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_swat""" | "ctm_swat""" | ||
| Line 226: | Line 226: | ||
{| class=wikitable | {| class=wikitable | ||
| [https://counterstrike.fandom.com/wiki/Anarchist Anarchist] {{en}} | | [https://counterstrike.fandom.com/wiki/Anarchist Anarchist] {{en}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_anarchist""" | "tm_anarchist""" | ||
| Line 237: | Line 237: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Balkan Balkan] | | [https://counterstrike.fandom.com/wiki/Balkan Balkan] | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_balkan_variantA""" | "tm_balkan_variantA""" | ||
| Line 255: | Line 255: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Elite_Crew Elite Crew] | | [https://counterstrike.fandom.com/wiki/Elite_Crew Elite Crew] | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_leet_variantA""" | "tm_leet_variantA""" | ||
| Line 272: | Line 272: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Phoenix_Connexion Phoenix Connexion]<br>(default) | | [https://counterstrike.fandom.com/wiki/Phoenix_Connexion Phoenix Connexion]<br>(default) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_phoenix""" | "tm_phoenix""" | ||
| Line 287: | Line 287: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Pirate Pirate] | | [https://counterstrike.fandom.com/wiki/Pirate Pirate] | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_pirate""" | "tm_pirate""" | ||
| Line 298: | Line 298: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Professional Professional] {{en}} | | [https://counterstrike.fandom.com/wiki/Professional Professional] {{en}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_professional""" | "tm_professional""" | ||
| Line 319: | Line 319: | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Separatist Separatist] {{fr}} {{es}} | | [https://counterstrike.fandom.com/wiki/Separatist Separatist] {{fr}} {{es}} | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_separatist""" | "tm_separatist""" | ||
| Line 332: | Line 332: | ||
=== Other Models === | === 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 | {| class=wikitable | ||
| Heavy Phoenix | | Heavy Phoenix | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_phoenix_heavy""" | "tm_phoenix_heavy""" | ||
| Line 340: | Line 341: | ||
}} | }} | ||
|- | |- | ||
| Heavy CT | | Heavy CT<br>({{csgo mode|Coop}}) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_heavy""" | "ctm_heavy""" | ||
| Line 347: | Line 348: | ||
}} | }} | ||
|- | |- | ||
| Jumpsuit ({{csgo mode|Dz}}) | | Jumpsuit<br>({{csgo mode|Dz}}) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_jumpsuit_variantA""" | "tm_jumpsuit_variantA""" | ||
| Line 356: | Line 357: | ||
}} | }} | ||
|- | |- | ||
| Diver ( | | Diver<br>({{csgoOperation|Riptide}}) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_diver_variantA""" | "ctm_diver_variantA""" | ||
| Line 365: | Line 366: | ||
}} | }} | ||
|- | |- | ||
| Gendarmerie ( | | [https://counterstrike.fandom.com/wiki/Gendarmerie_Nationale Gendarmerie Nationale] {{fr}}<br>({{csgoOperation|Riptide}}) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"ctm_gendarmerie_variantA""" | "ctm_gendarmerie_variantA""" | ||
| Line 376: | Line 377: | ||
}} | }} | ||
|- | |- | ||
| [https://counterstrike.fandom.com/wiki/Guerrilla_Warfare Guerrilla Warfare] ( | | [https://counterstrike.fandom.com/wiki/Guerrilla_Warfare Guerrilla Warfare]<br>({{csgoOperation|Riptide}}) | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"tm_jungle_raider_variantA""" | "tm_jungle_raider_variantA""" | ||
| Line 391: | Line 392: | ||
|- | |- | ||
| Zombie | | Zombie | ||
| {{pre|style=margin:0| | | {{pre|style=margin:0; display:block| | ||
{ | { | ||
"zombie""" | "zombie""" | ||
| Line 398: | Line 399: | ||
|} | |} | ||
== External Links == | == External Links == | ||
'''KV File Writer''': A gui tool that streamlines setting up and saving a CT vs T .kv | '''KV File Writer''': A gui tool that streamlines setting up and saving a CT vs T .kv | ||
Revision as of 08:09, 12 September 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 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>.mdlcsgo/models/player/<model>.mdlcsgo/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"""
}
|
| Diver ( |
{
"ctm_diver_variantA"""
"ctm_diver_variantB"""
"ctm_diver_variantC"""
}
|
| Gendarmerie Nationale
This article has been marked as a candidate for speedy deletion for the following reason:
Use {{Flag|fr}} instead. If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourselfAdministrators / Moderators - Remember to check if anything links here and the page history before deleting. ( |
{
"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"""
}
|
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.