CSGO Game Mode Commands: Difference between revisions
(Added Section "Gamemode dependent Events") |
m (Linked Deathmatch.) |
||
Line 3: | Line 3: | ||
{{back | Counter-Strike: Global Offensive Level Creation}} | {{back | Counter-Strike: Global Offensive Level Creation}} | ||
Here is a table of game modes and the console commands to launch them in [[Counter-Strike: Global Offensive]]. | Here is a table of game modes and the console commands to launch them in {{csgo}} [[Counter-Strike: Global Offensive]]. | ||
When a map is loaded with the <code>[[Map (ConCommand)|map]]</code> or <code>[[changelevel]]</code> command, the game uses the values of <code>'''game_type'''</code>, <code>'''game_mode'''</code> and <code>'''sv_skirmish_id'''</code> to determine [[cfg|.cfg]] files (representing a gamemode) that it executes. If these values are not set before loading a map, it results in the last gamemode played. The initial values of <code>game_type</code>, <code>game_mode</code> and <code>sv_skirmish_id</code> are 0 (Casual). | When a map is loaded with the <code>[[Map (ConCommand)|map]]</code> or <code>[[changelevel]]</code> command, the game uses the values of <code>'''game_type'''</code>, <code>'''game_mode'''</code> and <code>'''sv_skirmish_id'''</code> to determine [[cfg|.cfg]] files (representing a gamemode) that it executes. If these values are not set before loading a map, it results in the last gamemode played. The initial values of <code>game_type</code>, <code>game_mode</code> and <code>sv_skirmish_id</code> are 0 (Casual). | ||
To launch a map with a desired | To launch a map with a desired gamemode, adjust the values of <code>game_type</code>, <code>game_mode</code> and <code>sv_skirmish_id</code> according to the tables below. '''''After that''''', load a map by using the <code>[[Map (ConCommand)|map]] <mapname></code> or <code>[[changelevel]] <mapname></code> console command. | ||
{{tip | The <code>map</code> and <code>changelevel</code> commands have an optional gamemode parameter. Example: <code>map de_dust2 deathmatch</code> or <code>changelevel myCustomMap coop</code>. If such a gamemode parameter is given and if it is valid, the game will adjust <code>game_type</code> and <code>game_mode</code> and launch the map with the associated gamemode.}} | {{tip | The <code>map</code> and <code>changelevel</code> commands have an optional <code><gamemode></code> parameter. Example: <code>map de_dust2 deathmatch</code> or <code>changelevel myCustomMap coop</code>. If such a gamemode parameter is given and if it is valid, the game will adjust <code>game_type</code> and <code>game_mode</code> and launch the map with the associated gamemode.}} | ||
{{tip | You can define | {{tip | You can define [[alias]]es, for example <code>alias dust2retake "game_type 0; game_mode 0; sv_skirmish_id 12; map de_dust2"</code>. Best used in [[autoexec]]s to be able to quickly launch and test custom maps in the right gamemode.}} | ||
{{tip | Set Launch Options can be used, e.g: <code>+game_type <number> +game_mode <number> +map <mapname></code>}} | {{tip | [[Command Line Options|Set Launch Options]] can be used, e.g: <code>+game_type <number> +game_mode <number> +map <mapname></code>}} | ||
{{note | If you want to test your local Competitive/Wingman/Weapon Expert map with [[bot]]s, make sure to set {{ent|bot_quota_mode}} to a different value other than the new value <code>competitive</code> (e.g. <code>fill</code>), which (also) stops bots. Also adjust <code>bot_quota</code> (default: 10 for Competitive, 4 for Wingman). | {{note | If you want to test your local Competitive/Wingman/Weapon Expert map with [[bot]]s, make sure to set {{ent|bot_quota_mode}} to a different value other than the new value <code>competitive</code> (e.g. <code>fill</code>), which (also) stops bots. Also adjust <code>bot_quota</code> (default: 10 for Competitive, 4 for Wingman). | ||
Line 41: | Line 41: | ||
| [[Creating_a_Arsenal:_Arms_Race_Map|Armsrace]] | | [[Creating_a_Arsenal:_Arms_Race_Map|Armsrace]] | ||
| [[Creating_a_Arsenal:_Demolition_Map|Demolition]] | | [[Creating_a_Arsenal:_Demolition_Map|Demolition]] | ||
| Deathmatch | | [[CS:GO_Gamemodes:_Deathmatch|Deathmatch]] | ||
|- | |- | ||
! Training !! 2 | ! Training !! 2 | ||
Line 47: | Line 47: | ||
|- | |- | ||
! Custom !! 3 | ! Custom !! 3 | ||
| [[ | | [[CSGO Custom Game Mode|Custom]] | ||
|- | |- | ||
! Cooperative !! 4 | ! Cooperative !! 4 | ||
| [[ | | [[Creating a Guardian Scenario Map|Guardian]] | ||
| [[Creating a Co-op Strike Map|Co-op Strike]] | |||
|- | |- | ||
! Skirmish !! 5 | ! Skirmish !! 5 | ||
Line 111: | Line 112: | ||
| A mixture of Casual with Armsrace. Best of 20 rounds. Each player is given a fixed weapon for each round, depending on his individual progress. Each player can progress one gun per round by making at least one kill. | | A mixture of Casual with Armsrace. Best of 20 rounds. Each player is given a fixed weapon for each round, depending on his individual progress. Each player can progress one gun per round by making at least one kill. | ||
|- | |- | ||
| Deathmatch | | [[CS:GO Gamemodes: Deathmatch|Deathmatch]] | ||
| 1 | | 1 | ||
| 2 | | 2 | ||
Line 171: | Line 172: | ||
== Skirmish Modes == | == Skirmish Modes == | ||
If <code>sv_skirmish_id</code> is set to a value that can be found in the following table, it will load an additional [[cfg|.cfg]] file associated to the ID. These .cfg files are supposed to be loaded to a specific base gamemode, which is mentioned as a comment in | If <code>sv_skirmish_id</code> is set to a value that can be found in the following table, it will load an additional [[cfg|.cfg]] file associated to the ID. These .cfg files are supposed to be loaded to a specific base gamemode, which is mentioned as a comment in their first lines as well as in <code>csgo/scripts/items/items_game.txt</code>. Anyway, it is possible to use any base gamemode. | ||
To play one of the following game modes, type <code>sv_skirmish_id <number></code> in the console and launch a map with a base gamemode, see above. <br> | To play one of the following game modes, type <code>sv_skirmish_id <number></code> in the console and launch a map with a base gamemode, see above. <br> | ||
Alternatively, it is possible | Alternatively, it is possible in-game to execute the corresponding .cfg files manually and restarting the game using <code>exec <cfg filename></code> and <code>mp_restartgame 1</code>. Incidentally, one could of course write/modify such [[cfg|configs]] himself.<br> | ||
To return to a "pure" gamemode from the above table, use a skirmish ID that is not on this table (intuitively 0), so the game will not load any additional .cfg files to a gamemode. | To return to a "pure" gamemode from the above table, use a skirmish ID that is not on this table (intuitively 0), so the game will not load any additional .cfg files to a gamemode. | ||
Line 196: | Line 197: | ||
| Casual | | Casual | ||
| op08_stab_stab_zap.cfg | | op08_stab_stab_zap.cfg | ||
| Only knives and recharging taser. | | Only [[weapon_knife|knives]] and recharging [[weapon_taser|taser]]. | ||
|- | |- | ||
| Flying Scoutsman | | Flying Scoutsman | ||
Line 202: | Line 203: | ||
| Casual | | Casual | ||
| op08_flying_scoutsman.cfg | | op08_flying_scoutsman.cfg | ||
| Only [[ | | Only [[weapon_ssg08|scouts]] and [[weapon_knife|knives]], low gravity, high precision. | ||
|- | |- | ||
| Trigger Discipline | | Trigger Discipline | ||
Line 220: | Line 221: | ||
| Deathmatch | | Deathmatch | ||
| op08_hunter_gatherers.cfg | | op08_hunter_gatherers.cfg | ||
| Team deathmatch with collecting dogtags: Killed enemies will drop dogtags that anyone can pick up. Collecting dogtags from the enemy team awards victory points. Killing enemies with the | | [[CS:GO Gamemodes: Deathmatch#Team Mode|Team deathmatch]] with collecting [[item_dogtags|dogtags]]: Killed enemies will drop dogtags that anyone can pick up. Collecting dogtags from the enemy team awards victory points. Killing enemies with the Deathmatch [[CS:GO Gamemodes: Deathmatch#Bonus Weapon|bonus weapon]] makes them drop an extra dogtag. The team with the most victory points at the end of the time limit wins. | ||
|- | |- | ||
| Heavy Assault Suit | | Heavy Assault Suit | ||
Line 226: | Line 227: | ||
| Casual | | Casual | ||
| op08_heavy_assault_suit.cfg | | op08_heavy_assault_suit.cfg | ||
| [[item_heavyassaultsuit|Heavy armor]] can be purchased for $6000. {{ | | [[item_heavyassaultsuit|Heavy armor]] can be purchased for $6000. {{Deprecated | The item is no longer accessible in the buy menu, but can still be bought with the command <code>buy heavyarmor</code> while not owning a rifle.}} | ||
|- | |- | ||
| Arms Race | | Arms Race | ||
Line 244: | Line 245: | ||
| Casual | | Casual | ||
| gamemode_retakecasual.cfg | | gamemode_retakecasual.cfg | ||
| Each round, 3 Terrorists spawn on a bomb site with a bomb being planted and 4 CTs spawn at fixed locations around it or on the other bomb spot. Each player can choose a loadout card at round start. {{ | | Each round, 3 Terrorists spawn on a bomb site with a bomb being planted and 4 CTs spawn at fixed locations around it or on the other bomb spot. Each player can choose a loadout card at round start. {{Warning | If there is exactly one bombsite, the game crashes with a probability of 50 %.}} | ||
|- | |- | ||
| Bloodletter | | Bloodletter | ||
Line 256: | Line 257: | ||
| Deathmatch | | Deathmatch | ||
| op08_bounty_hunter.cfg | | op08_bounty_hunter.cfg | ||
| All players are enemies, killed enemies will drop dogtags that anyone can pick up. Killing players awards less points. Collecting dogtags awards additional | | All players are enemies, killed enemies will drop [[item_dogtags|dogtags]] that anyone can pick up. Killing players awards less points. Collecting dogtags awards additional Deathmatch points. | ||
|- | |- | ||
| Team Deathmatch | | [[CS:GO Gamemodes: Deathmatch#Team Mode|Team Deathmatch]] | ||
| - | | - | ||
| Deathmatch | | Deathmatch | ||
| op08_team_deathmatch.cfg | | op08_team_deathmatch.cfg | ||
| Killing enemies is worth team victory points, killing enemies with the | | Killing enemies is worth team victory points, killing enemies with the Deathmatch [[CS:GO Gamemodes: Deathmatch#Bonus Weapon|bonus weapon]] awards additional victory points. The team with the most victory points at the end of the time limit wins. | ||
|} | |} | ||
Line 269: | Line 270: | ||
== Gamemode dependent Events == | == Gamemode dependent Events == | ||
There are the | There are the {{csgo}} specific [[List of Counter-Strike: Global Offensive Script Functions#Other|VScript functions]] <code>ScriptGetGameType()</code> and <code>ScriptGetGameMode()</code> which return the current integer value of <code>game_type</code> and <code>game_mode</code>. | ||
{{Note | This is independent of the current value of <code>sv_skirmish_id</code>.}} | {{Note | This is independent of the current value of <code>sv_skirmish_id</code>.}} | ||
These allow VScript structures such as the following. | These allow VScript structures such as the following. |
Revision as of 03:38, 12 April 2021
Here is a table of game modes and the console commands to launch them in Counter-Strike: Global Offensive.
When a map is loaded with the map
or changelevel
command, the game uses the values of game_type
, game_mode
and sv_skirmish_id
to determine .cfg files (representing a gamemode) that it executes. If these values are not set before loading a map, it results in the last gamemode played. The initial values of game_type
, game_mode
and sv_skirmish_id
are 0 (Casual).
To launch a map with a desired gamemode, adjust the values of game_type
, game_mode
and sv_skirmish_id
according to the tables below. After that, load a map by using the map <mapname>
or changelevel <mapname>
console command.

map
and changelevel
commands have an optional <gamemode>
parameter. Example: map de_dust2 deathmatch
or changelevel myCustomMap coop
. If such a gamemode parameter is given and if it is valid, the game will adjust game_type
and game_mode
and launch the map with the associated gamemode.
alias dust2retake "game_type 0; game_mode 0; sv_skirmish_id 12; map de_dust2"
. Best used in autoexecs to be able to quickly launch and test custom maps in the right gamemode.
+game_type <number> +game_mode <number> +map <mapname>

competitive
(e.g. fill
), which (also) stops bots. Also adjust bot_quota
(default: 10 for Competitive, 4 for Wingman).

gamemode_competitive_offline.cfg
and gamemode_competitive2v2_offline.cfg
inside csgo/cfg/
and renaming them from [...]_offline.cfg
to [...]_server.cfg
, unless you already use such a file in a different way. In this case you could copy-paste the content of [...]_offline.cfg
to an appropriate place of your [...]_server.cfg
.Game Type and Game Mode

sv_skirmish_id
is (e.g.) 0.
csgo/gamemodes.txt
.Game Type | Game Mode | ||||
---|---|---|---|---|---|
0 | 1 | 2 | 3 | ||
Classic | 0 | Casual | Competitive | Wingman | Weapon Expert |
Gun Game | 1 | Armsrace | Demolition | Deathmatch | |
Training | 2 | Training | |||
Custom | 3 | Custom | |||
Cooperative | 4 | Guardian | Co-op Strike | ||
Skirmish | 5 | Skirmish | |||
Free For All | 6 | Danger Zone |

_server.cfg
don't exist locally by default. You can create them and write commands into them that will be executed if you locally launch the corresponding gamemode.Game Mode | game_type | game_mode | map command optional parameter | .cfg filenames executed, if existent | Description |
---|---|---|---|---|---|
Casual (default) | 0 | 0 | casual
|
gamemode_casual.cfg, gamemode_casual_server.cfg |
Like Competitive but with fewer rounds, shorter freezetime per round, no friendly fire, no team collision, free armor and free defuse kit/cutters. |
Competitive / Scrimmage | 0 | 1 | competitive
|
gamemode_competitive.cfg, gamemode_competitive_offline.cfg (only via Practice with Bots) gamemode_competitive_server.cfg |
The classic gamemode, usually made for 5v5. Best of 30 rounds, teams are switched at halftime, friendly fire is on. Round-ending objectives are elimination, bomb explosion, bomb defusal and hostage rescue. |
Wingman | 0 | 2 | scrimcomp2v2
|
gamemode_competitive2v2.cfg, gamemode_competitive2v2_offline.cfg (only via Practice with Bots) gamemode_competitive2v2_server.cfg |
Like Competitive, but adjusted for 2v2 and for a smaller map or a map section. Best of 16 rounds. Also, each round is shorter. |
Weapon Expert | 0 | 3 | scrimcomp5v5
|
gamemode_competitive.cfg, gamemode_competitive_offline.cfg op08_weapons_expert.cfg, gamemode_competitive_server.cfg |
Like Competitive but every player can buy each weapon at most once per match. The freezetime is a bit longer. |
Arms Race | 1 | 0 | armsrace, gungameprogressive
|
gamemode_armsrace.cfg, gamemode_armsrace_server.cfg |
The game is one perpetual round where killed players respawn at the default spawns. A weapon progression (a number of guns and their order) is defined where players win by making a specified number of kills with each of these weapons. |
Demolition | 1 | 1 | demolition, gungametrbomb
|
gamemode_demolition.cfg, gamemode_demolition_server.cfg |
A mixture of Casual with Armsrace. Best of 20 rounds. Each player is given a fixed weapon for each round, depending on his individual progress. Each player can progress one gun per round by making at least one kill. |
Deathmatch | 1 | 2 | deathmatch
|
gamemode_deathmatch.cfg, gamemode_deathmatch_server.cfg |
Like Armsrace but with free weapon choice and respawns across the map. Kills grant points, depending on the weapon type and if it is currently the bonus weapon. A player wins by scoring the highest after the round's time limit. |
Training | 2 | 0 | training
|
gamemode_training.cfg, gamemode_training_server.cfg |
Assigns clients to CT with no weapon. No round limit, no time limit, no freezetime, minimal HUD. Good for singleplayer maps, used on CS:GO's Training Course. |
Custom | 3 | 0 | custom
|
- | No longer working. Used to load csgo/cfg/<mapname>.cfg . Now this mode is like Undefined, see below.
|
Guardian | 4 | 0 | guardian, cooperative
|
gamemode_competitive.cfg, gamemode_cooperative.cfg, gamemode_cooperative_server.cfg |
Two human players must defend a bombsite as CT or hostages as T against rushing bots. Maps must support this mode to work. |
Co-op Strike | 4 | 1 | coop, coopstrike, coopmission
|
gamemode_competitive.cfg, gamemode_coopmission.cfg, gamemode_coopmission_server.cfg |
Usually a custom mission for two human players on a custom map that is designed only for this mode. |
Skirmish | 5 | 0 | skirmish
|
- | Like Undefined, see below. |
Danger Zone | 6 | 0 | survival
|
gamemode_survival.cfg, gamemode_survival_server.cfg |
A Battle Royale mode for big maps where players win by being the last man (or team) standing. Maps must be designed for this mode. |
Undefined | - | - | Like Casual but with no round limit, instead with a time limit of 5 minutes for the game and map. mp_roundtime is also set to 5 minutes.
|
Skirmish Modes
If sv_skirmish_id
is set to a value that can be found in the following table, it will load an additional .cfg file associated to the ID. These .cfg files are supposed to be loaded to a specific base gamemode, which is mentioned as a comment in their first lines as well as in csgo/scripts/items/items_game.txt
. Anyway, it is possible to use any base gamemode.
To play one of the following game modes, type sv_skirmish_id <number>
in the console and launch a map with a base gamemode, see above.
Alternatively, it is possible in-game to execute the corresponding .cfg files manually and restarting the game using exec <cfg filename>
and mp_restartgame 1
. Incidentally, one could of course write/modify such configs himself.
To return to a "pure" gamemode from the above table, use a skirmish ID that is not on this table (intuitively 0), so the game will not load any additional .cfg files to a gamemode.
Example:
- To launch Stab Stab Zap on
de_dust2
, entersv_skirmish_id 1
andmap de_dust2 casual
. This is equivalent to the commandssv_skirmish_id 1
,game_type 0
,game_mode 0
andmap de_dust2
. - To launch Competitive on
de_dust2
after having played a skirmish mode, entersv_skirmish_id 0
andmap de_dust2 competitive
. This is equivalent to the commandssv_skirmish_id 0
,game_type 0
,game_mode 1
andmap de_dust2
.

cfg/
that have no associated skirmish ID. They are mentioned at the end of the following table. They probably were the modes for the skirmish IDs 2, 5 and 9.
csgo/scripts/items/items_game.txt
.Game Mode | sv_skirmish_id | Intended Base Gamemode | .cfg filenames executed | Description |
---|---|---|---|---|
Stab Stab Zap | 1 | Casual | op08_stab_stab_zap.cfg | Only knives and recharging taser. |
Flying Scoutsman | 3 | Casual | op08_flying_scoutsman.cfg | Only scouts and knives, low gravity, high precision. |
Trigger Discipline | 4 | Casual | op08_trigger_discipline.cfg | Gunshots that a player does not hit an enemy with damage himself down to a minimum of 1 HP. |
Boom! Headshot! | 6 | Deathmatch | op08_headshots.cfg | Helmets are disabled and bodyshots deal no damage, causing a small spark effect instead of blood. |
Hunter-Gatherers | 7 | Deathmatch | op08_hunter_gatherers.cfg | Team deathmatch with collecting dogtags: Killed enemies will drop dogtags that anyone can pick up. Collecting dogtags from the enemy team awards victory points. Killing enemies with the Deathmatch bonus weapon makes them drop an extra dogtag. The team with the most victory points at the end of the time limit wins. |
Heavy Assault Suit | 8 | Casual | op08_heavy_assault_suit.cfg | Heavy armor can be purchased for $6000. ![]() buy heavyarmor while not owning a rifle. |
Arms Race | 10 | Arms Race | - | Equivalent to Arms Race. |
Demolition | 11 | Demolition | - | Equivalent to Demolition. |
Retakes | 12 | Casual | gamemode_retakecasual.cfg | Each round, 3 Terrorists spawn on a bomb site with a bomb being planted and 4 CTs spawn at fixed locations around it or on the other bomb spot. Each player can choose a loadout card at round start. ![]() |
Bloodletter | - | Arms Race | op08_bloodletter.cfg | Dealing damage heals you 100 % of the damage dealt (max 200). Players take non-lethal damage over time while they are alive. |
Bounty Hunter | - | Deathmatch | op08_bounty_hunter.cfg | All players are enemies, killed enemies will drop dogtags that anyone can pick up. Killing players awards less points. Collecting dogtags awards additional Deathmatch points. |
Team Deathmatch | - | Deathmatch | op08_team_deathmatch.cfg | Killing enemies is worth team victory points, killing enemies with the Deathmatch bonus weapon awards additional victory points. The team with the most victory points at the end of the time limit wins. |
Gamemode dependent Events
There are the specific VScript functions
ScriptGetGameType()
and ScriptGetGameMode()
which return the current integer value of game_type
and game_mode
.

sv_skirmish_id
.These allow VScript structures such as the following.
local nMode = ScriptGetGameMode();
local nType = ScriptGetGameType();
if (nType == 0 && nMode == 2)
{
// code executed only in Wingman
}
else
{
// code executed only in any other gamemode
}
