Editing gamemodes.txt and running the map

Sergis

L666: ])oo]v[
aa
Jul 22, 2009
1,874
1,257
By default, CSGO will allow you to play a new map only 1v1 or wont allow you to join a team at all, idk which one is it now. To play with a proper playercount, you need to edit gamemodes.txt file which is placed in your Counter-Strike Global Offensive Beta/csgo folder.

Open the file and search for "// Classic Maps". After that line there is the information for each map - playercounts, player models, etc. Copy the whole block for cs_italy, which looks like this:
"cs_italy"
{
"nameID" "#SFUI_Map_cs_italy"
"name" "cs_italy"
"minplayers" "10"
"maxplayers" "10"
"extraspectators" "2"
"imagename" "map-italy-overall"
"t_arms" "models/weapons/t_arms_phoenix.mdl"
"ct_arms" "models/weapons/ct_arms_gign.mdl"
"t_models"
{
"tm_phoenix" ""
"tm_phoenix_variantA" ""
"tm_phoenix_variantB" ""
"tm_phoenix_variantC" ""
"tm_phoenix_variantD" ""
}
"ct_models"
{
"ctm_gign" ""
"ctm_gign_variantA" ""
"ctm_gign_variantB" ""
"ctm_gign_variantC" ""
"ctm_gign_variantD" ""
}
"hostage_models"
{
"models/hostage/hostage.mdl" ""
"models/hostage/hostage_variantA.mdl" ""
"models/hostage/hostage_variantB.mdl" ""
"models/hostage/hostage_variantC.mdl" ""
}
}

Paste it so there are two entries for cs_italy. Now, edit one to suit your map - replace the mapname with the name of your map. Delete the hostage_models part I guess if you're not making a hostage map. Here's how I did it for my map (I'm not sure if changing nameID and imagename is even necessary, but it doesn't hurt):
"de_ashes_b1"
{
"nameID" "#SFUI_Map_de_ashes_b1"
"name" "de_ashes_b1"
"minplayers" "10"
"maxplayers" "32"
"extraspectators" "2"
"imagename" "map-ashes-overall"
"t_arms" "models/weapons/t_arms_phoenix.mdl"
"ct_arms" "models/weapons/ct_arms_st6.mdl"
"t_models"
{
"tm_phoenix" ""
"tm_phoenix_variantA" ""
"tm_phoenix_variantB" ""
"tm_phoenix_variantC" ""
"tm_phoenix_variantD" ""
}
"ct_models"
{
"ctm_st6" ""
"ctm_st6_variantA" ""
"ctm_st6_variantB" ""
"ctm_st6_variantC" ""
"ctm_st6_variantD" ""
}
}

Now you can play the map with a proper playercount.



Running the map ingame:
- To play casual mode, enter "game_type 0" and"game_mode 0"
- To play competitive mode, enter "game_type 0" and"game_mode 1"
- To play arms race, enter "game_type 1" and"game_mode 0"
- To play demolition, enter "game_type 1" and"game_mode 1"
- Enter "map <name of the map>", e.g. "map de_ashes_b1"



You can also add your map to the map select screen by adding a new mapgroup and listing it under the gametype.
To add the map to casual playlist, search for text "casual", "competitive" for competitive, "gungameprogressive" for arms race, "gungametrbomb" for demolition" (include the doublequotes "" in this one search). Now, search for "mapgroupsSP" and add an extra entry for your map. Example:
"mg_de_ashes_b1" ""
Now, search for "// Single map groups" and add a mapgroup with your map. Example:
"mg_de_ashes_b1"
{
"imagename" "map-ashes-overall"
"nameID" "#SFUI_Map_de_ashes_b1"
"name" "mg_de_ashes_b1"
"maps"
{
"de_ashes_b1" ""
}
}
Your map will show up in the map selection screen. The image will be broken however and the name will be listed as whatever you entered in the nameID field earlier (#SFUI_Map_de_ashes_b1 in my case).



Bonus: Editing the weaponcycle in Arsenal

Search for "weaponprogression". You will first find a longer list, which is armsrace weapon list for CT, right under it is the list for T, if you search after that, you will find two shorter lists which are for the Demolition gamemode. Edit them to your liking...or leave them the way they are. For example, here's a weapon selection that I like to use for demolition for both teams:
"deagle" { "kills" "1" }
"famas" { "kills" "1" }
"galilar" { "kills" "1" }
"p90" { "kills" "1" }
"m4a1" { "kills" "1" }
"ak47" { "kills" "1" }
"ssg08" { "kills" "1" }
"sg556" { "kills" "1" }
"aug" { "kills" "1" }
"awp" { "kills" "1" }



Remember than you might need to redo all your changes after an update and remember to save a backup copy before any changes if you're bad at this kind of stuff :p
 
Last edited:

AngryAngus

L3: Member
Jul 20, 2011
101
124
Well found!
I do wonder if the steam workshop integration will just automatically add the maps to this list?
Its quite an unusual way of doing it in my opinion; I do prefer to setup gamemodes inside hammer personally.