This article relates to the game "Counter-Strike 2". Click here for more information.
This article relates to the game "Counter-Strike: Global Offensive". Click here for more information.

Counter-Strike: Global Offensive/Game Modes: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Popcorn moved page CS:GO Game Mode Commands to CS:GO Game Modes: 'Commands' are not actually the topic. This shortens the title, making it fit the topic better indeed.)
(CS2's map command supports game mode parameters in a new way. "Arms Race" is supported by now. "Workshop" is reserved but not yet implemented.)
 
(33 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{lang|CS:GO Game Mode Commands}}
{{LanguageBar}}
{{toc-right}}
{{Subpage|[[Counter-Strike: Global Offensive Level Creation]]|[[Counter-Strike_2_Workshop_Tools/Level_Design|Counter-Strike 2 Workshop Tools - Level Design]]}}
{{back | Counter-Strike: Global Offensive Level Creation}}
{{Delisted|csgo}}
Here are tables of the game modes and the console commands to launch them in {{game name|csgo|name=Counter-Strike: Global Offensive}}.


== Loading a Map ==
{{Toc-right}}
To launch a map with a desired game mode, adjust the [[ConVar]]s
*<code>'''game_type'''</code>,
*<code>'''game_mode'''</code>,
*<code>'''sv_game_mode_flags'''</code> and
*<code>'''sv_skirmish_id'''</code>
according to the tables below and load a map by using the <code>[[Map (ConCommand)|map]] <mapname></code> or {{ent|changelevel|<mapname>}} console command.


When loading a map, the game will...
Here are tables of the game modes and the console commands to launch them in {{csgo|4}} and {{cs2|4}}.
# set the [[whitelistcmd|whitelisted ConVars]] (the ones listed in <code>csgo/bspconvar_whitelist.txt</code>) to their default value,
# execute the [[CFG]] files associated with the current values of <code>game_type</code> and <code>game_mode</code> (defined in <code>csgo/[[gamemodes.txt]]</code> and <code>csgo/gamemodes_server.txt</code>),
# execute the CFG file associated with the current value of <code>sv_game_mode_flags</code>, see [[#Game Mode Flags|below]], and
# execute the CFG file associated with the current value of <code>sv_skirmish_id</code> (defined in <code>csgo/scripts/items/items_game.txt</code> under <code>skirmish_modes</code>), see [[#Skirmish Modes|below]].


If these four ConVars are not set before loading a map, the map launches in the last game mode played. Their initial value is 0 (Casual).
The paths named on this page are relative to {{csgo}} {{path|.../steamapps/common/Counter-Strike Global Offensive/}} or {{cs2}} {{path|.../steamapps/common/Counter-Strike Global Offensive/game/}} respectively.
{{Important|1={{cs2}} As of 2025-01-10, most of this page applies to CS2, except for the following.
* The game supports the game modes {{csgo mode|Casual|link=}}, {{csgo mode|Competitive|link=}}, {{csgo mode|Wingman|link=}}, Training Day, {{csgo mode|Deathmatch|link=}} and {{csgo mode|Armsrace|link=}}.
* {{csgo mode|Custom|link=}} works as usual. In {{csgo mode|Guardian|link=}}, special kills are not counted such that the human players cannot win as intended. In {{csgo mode|Demolition|link=}}, the players are not given any guns but the C4.
* [[#Skirmish Modes|Skirmish modes]] seem not to be implemented yet.
* The {{cmd|map (console command)|alt=map}} command does allow for a game mode parameter, like so: <code>map de_dust2 gamemode=X</code>. Legal values for <code>X</code> are:
*:<tt>casual, competitive/comp, scrimcomp2v2/wingman, scrimcomp5v5, new_user_training, ar/armsrace/gungameprogressive, gungametrbomb, dm/deathmatch, training, custom, guard/guardian/cooperative, coop/coopmision, skirmish, survival, default/auto</tt>.
* There is a new command <code>game_alias <string></code> to set <tt>game_type</tt> and <tt>game_mode</tt> according to the specified string. However, the set of legal values for this are not identical to the <code>map</code> command parameters, and it does not seem to set <tt>sv_skirmish_id</tt>.
}}


{{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 <code>gamemode</code> 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 game mode. See the ''map command optional parameter'' column in the following big table.}}
== Overview ==


{{Tip | Maps can have a default game mode, which can be read with <code>map <mapname> default</code> or <code>map <mapname> auto</code>. See the big table below.}}
To launch a map with a desired game mode, adjust the [[ConVar]]s


{{Tip | [[Command Line Options|Set Launch Options]] can be used, e.g: <code>+game_type <number> +game_mode <number> +map <mapname></code>}}
* <code>'''game_type'''</code>,
* <code>'''game_mode'''</code>,
* <code>'''sv_game_mode_flags'''</code> and
* <code>'''sv_skirmish_id'''</code>


{{Tip | You can use [[alias]]es to make frequent testing easier, for example <code>alias MyMapRetake "game_type 0; game_mode 0; sv_skirmish_id 12; map MyMap"</code>. Best used in [[autoexec]]s which allows to quickly launch and test custom maps in the right game mode.}}
according to the tables below and load a map by using the {{Command|map (console command)|<mapname>|alt = map}} or {{Command|changelevel|<mapname>}} console command.


{{Note
{{ModernConfusion|The [[Setting up 1v1 Warmup Arenas|1v1 warmup arenas]] seen in some official Competitive and Wingman maps do '''not''' use an own game mode. If warmup arenas are implemented in a map, they can be played in by launching the map in Competitive or Wingman and invoking <code>mp_warmup_start</code>.}}
| If you want to run a map in a Classic game mode with [[bot]]s, make sure {{ent|bot_quota_mode}} is not set to <code>competitive</code>, as this causes them to stop.
{{Idea | You can create <code>gamemode_competitive_server.cfg</code> (see below) to automatically set <code>bot_quota</code> and <code>bot_quota_mode</code> to have bots on your local server whenever you load a map in Competitive.}}
}}


{{Note | The game mode icons seen on the loading screen (and on this page) are loaded from <code>csgo/materials/panorama/images/icons/ui/<internal mode name>.svg</code>. If <code>sv_skirmish_id</code> is not 0, the internal name of the skirmish mode is used. If the game doesn't have the file, one can put a custom one to that place.}}
{| style="margin:auto"
 
|- style="vertical-align:top"
== Game Type and Game Mode ==
|
 
{| class="standard-table"
{{Note | Unless you want to use game mode flags, make sure <code>sv_game_mode_flags</code> is (e.g.) 0.}}
|+ Quick Examples to load ''Dust II''
{{Note | Unless you want to load a Skirmish Mode, make sure <code>sv_skirmish_id</code> is (e.g.) 0.}}
! Game Mode
{{Confusion | The [[Setting up 1v1 Warmup Arenas|1v1 warmup arenas]] seen in some Competitive and Wingman maps do '''not''' use an own game mode. If arenas are implemented in a map, warmup arenas can be played by launching the map in Competitive or Wingman and invoking <code>mp_warmup_start</code>.}}
! Console Commands
{{Note | The information of these tables can be found in <code>csgo/[[gamemodes.txt]]</code>.}}
|-
 
| ''keep previous''
{| class="standard-table" style="text-align: center; margin-left: auto; margin-right: auto;"
| <tt>map de_dust2</tt>
|-
| {{csgo mode|Dm}}
| <tt>game_type 1; game_mode 2;<br>sv_game_mode_flags 0;<br>sv_skirmish_id 0;<br>map de_dust2</tt>
|-
| {{csgo mode|Comp|Short Competitive|link=}}
| <tt>game_type 0; game_mode 1;<br>sv_game_mode_flags 32;<br>sv_skirmish_id 0;<br>map de_dust2</tt>
|-
| {{csgo mode|Fs|link=#Flying Scoutsman}}
| <tt>game_type 0; game_mode 0;<br>sv_game_mode_flags 0;<br>sv_skirmish_id 3;<br>map de_dust2</tt>
|}
|
{| class="standard-table" style="text-align:center"
|+ Defined pairs of values for <code>game_type</code> and <code>game_mode</code>
|+ Defined pairs of values for <code>game_type</code> and <code>game_mode</code>
!colspan="2" rowspan="2" | Game Type
!colspan="2" rowspan="2" | <tt>game_type</tt>
!colspan="4" | Game Mode
!colspan="5" | <tt>game_mode</tt>
|-
|-
! 0 !! 1 !! 2 !! 3
! 0 !! 1 !! 2 !! 3 !! 4
|-
|-
! Classic !! style="width:3em" | 0
! Classic !! style="width:3em" | 0
| [[File:Csgo icon casual.png|16px|link=]] [[Creating a Classic Counter-Strike Map|Casual]]
| {{csgo mode|Casual}}
| [[File:Csgo icon competitive.png|16px|link=]] [[Creating a Classic Counter-Strike Map|Competitive]]
| {{csgo mode|Competitive}}
| [[File:Csgo icon wingman.png|16px|link=]] [[Creating_a_Wingman_Map|Wingman]]
| {{csgo mode|Wingman}}
| Weapons Expert
| {{csgo mode|Weaponsexpert|link=#Weapons Expert}}
| {{cs2}} [[#Training Day|Training Day]]
|-
|-
! Gun Game !! 1
! Gun Game !! 1
| [[File:Csgo icon armsrace.png|16px|link=]] [[Creating_a_Arsenal:_Arms_Race_Map|Armsrace]]
| {{csgo mode|Armsrace}}
| [[File:Csgo icon demolition.png|16px|link=]] [[Creating_a_Arsenal:_Demolition_Map|Demolition]]
| {{csgo mode|Demolition}}
| [[File:Csgo icon deathmatch.png|16px|link=]] [[CS:GO_Gamemodes:_Deathmatch|Deathmatch]]
| {{csgo mode|Deathmatch}}
|-
|-
! Training !! 2
! Training !! 2
| [[File:Csgo icon training.png|16px|link=]] Training
| {{csgo mode|Training|link=#Training}}
|-
|-
! Custom !! 3
! Custom !! 3
| [[CS:GO Custom Game Mode|Custom]]
| {{csgo mode|Custom}}
|-
|-
! Cooperative !! 4
! Cooperative !! 4
| [[File:Csgo icon guardian.png|16px|link=]] [[Creating a Guardian Scenario Map|Guardian]]
| {{csgo mode|Guardian}}
| [[File:Csgo icon coopstrike.png|16px|link=]] [[Creating a Co-op Strike Map|Co-op Strike]]
| {{csgo mode|Coop}}
|-
|-
! Skirmish !! 5
! Skirmish !! 5
| [[File:Csgo icon skirmish.png|16px|link=]] [[CS:GO Game Mode Commands#Skirmish Modes|Skirmish]]
| {{csgo mode|Skirmish|link=#Skirmish Type}}
|-
|-
! Free For All !! 6
! Free For All !! 6
| [[File:Csgo icon dangerzone.png|16px|link=]] [[Creating_a_Danger_Zone_Map|Danger Zone]]
| {{csgo mode|Dangerzone}}
|}
{{For|details|[[#Game Type and Game Mode]]}}
|
{| class="standard-table"
|+ Some values for <code>sv_skirmish_id</code>
!style=width:2em| ID
! War Game
! Game Mode
|-
! 0
| ''None (default)''
|-
! 3
| {{csgo mode|Fs|link=#Flying Scoutsman}}
| Casual
|-
! 10
| {{csgo mode|Ar}}
| Arms Race
|-
! 11
| {{csgo mode|Demo}}
| Demolition
|-
! 12
| {{csgo mode|Retakes|link=#Retakes}}
| Casual
|}
|}
{{minititle|About the following table}}
{{For|details|[[#Skirmish Modes]]}}
{{Note | The CFG files ending with <code>_offline.cfg</code> are only executed if the server was launched via ''Practice with Bots'' from the main menu. Valve uses them to enable [[bot]]s in offline competitive since bots have been disabled in competitive by default, see {{ent|bot_quota}}.}}
|}
{{Tip | The CFG files ending with <code>_server.cfg</code> don't exist locally by default. You can create them and write commands into them that will be executed every time you locally launch the corresponding game mode.}}
 
{{Note | With no adjustments, [[maxplayers]] is a hard limit for the number of [[player]]s and bots on the server.}}
== Loading a Map ==
{{Note | {{cpp}} The possible ''map command optional parameters'' can be found in the function <code>GameTypes::GetGameTypeAndModeFromAlias</code> defined in <code>gametypes.cpp</code>.}}
When loading a map, the game will...
 
# set the [[whitelistcmd|whitelisted ConVars]] (the ones listed in {{Path|csgo/bspconvar_whitelist|txt|icon=file}}) to their default value,{{inline note|name=no such file in CS2}}
# execute the [[CFG]] files associated with the current values of <code>game_type</code> and <code>game_mode</code> (defined in {{Path|csgo/[[gamemodes.txt|gamemodes]]|txt|icon=file}} and {{Path|csgo/gamemodes_server|txt|icon=file}}),
# execute the CFG file associated with the current value of <code>sv_game_mode_flags</code>, see [[#Game Mode Flags|below]], and
# execute the CFG file associated with the current value of <code>sv_skirmish_id</code> (defined in {{Path|csgo/scripts/items/items_game|txt|icon=file}} under <code>skirmish_modes</code>), see [[#Skirmish Modes|below]].
 
If these four ConVars are not set before loading a map, the map launches in the last game mode played. Their initial value is 0 (Casual).
 
{{Tip|The <code>map</code> and <code>changelevel</code> commands have an optional <code><game mode alias></code> parameter. Example: {{Code|map de_dust2 deathmatch}} or {{Code|changelevel myCustomMap coop}}. If such an alias 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 game mode. See the ''map command aliases'' column in the following big table.}}
 
{{Tip|Maps can have a default game mode, which can be read with {{Code|map <mapname> default}} or {{Code|map <mapname> auto}}. See [[#Map default]].}}
 
{{Tip|[[Command Line Options|Set Launch Options]] can be used, e.g: {{Code|+game_type <number> +game_mode <number> +map <mapname>}}}}
 
{{Tip|You can use [[alias]]es to make frequent testing easier, for example {{Code|alias MyMapRetake "game_type 0; game_mode 0; sv_skirmish_id 12; map MyMap"}}. Best used in [[autoexec]]s which allows to quickly launch and test custom maps in the right game mode.}}
 
{{Note
| If you want to run a map in a Classic game mode with [[bot]]s, make sure {{Ent|bot_quota_mode}} is not set to <code>competitive</code>, as this causes them to stop.
{{Idea|You can create <code>gamemode_competitive_server.cfg</code> (see below) to automatically set <code>bot_quota</code> and <code>bot_quota_mode</code> to have bots on your local server whenever you load a map in Competitive.}}
}}
 
{{Note|The game mode icons seen on the loading screen (and on this page) are loaded from {{Path|csgo/materials/panorama/images/icons/ui/<internal mode name>|svg|icon=image}}. If <code>sv_skirmish_id</code> is not 0, the internal name of the skirmish mode is used. If the game doesn't have the file, one can put a custom one to that place.}}
 
== Game Type and Game Mode ==
{{Code|game_type}} and {{Code|game_mode}} are [[console variable]]s that determine how the next map is initialized when loaded, including but not limited to the [[exec]]ution of [[CFG]] files, used to set some of the countless ConVars that control game rules, for example {{Command|mp_roundtime}}, {{Command|mp_t_default_secondary}}, {{Command|sv_deadtalk}} and so forth.
 
Apart from that, there are also other game rules or settings for which the value of {{Code|game_type}} and {{Code|game_mode}} is checked ''during'' the current match.
Examples are the UI for all players, the events when {{Ent|weapon_c4}} is planted or defused, whether {{Ent|item_heavyassaultsuit}} causes a screen tint, whether players can pick up experimental weapons such as {{Ent|weapon_axe}}, ...
 
The following table lists all available ''game mode''s along with their values for {{Code|game_type}} and {{Code|game_mode}}, their internal name, their aliases for the {{Command|map (console command)|alt = map}} command, their default maximum number of [[player]]s, the CFG files that are executed when a map is launched in this ''game mode'', and a description.
 
{{Note
| The CFG files ending with {{Code|_offline.cfg|preset=1}} are only executed if the server was launched via ''Practice with Bots'' from the main menu. Valve uses them to enable [[bot]]s in offline competitive since bots have been disabled in competitive by default, see {{Ent|bot_quota}}. <br /> The CFG files ending with {{Code|_server.cfg|preset=1}} don't exist locally by default. You can create them and write commands into them that will be executed every time you locally launch the corresponding game mode.
}}
 
{{Note|With no adjustments, [[maxplayers]] is a hard limit for the number of [[player]]s and bots on the server.}}


{| class="standard-table mw-collapsible" style="width:100%;"
{{Note
! colspan="2"| Game Mode
| The information of these tables can be found in {{Path|csgo/[[gamemodes.txt]]}}. <br /> {{cpp}} The possible ''map command aliases'' can be found in the function {{Code|GameTypes::GetGameTypeAndModeFromAlias}} defined in {{Code|gametypes.cpp|preset=1}}.
! style="width:3em;" | type
}}
! style="width:3em;" | mode
 
{| class="standard-table mw-collapsible" width="100%"
|- style="position:sticky; top:0"
! colspan="2" | Game Mode
! width="3em" | <tt>type</tt>
! width="3em" | <tt>mode</tt>
! Internal Name
! Internal Name
! style="white-space:nowrap;"| map command<br>optional parameters
! style="white-space:nowrap" | <tt>map</tt> command<br>aliases
! [[maxplayers|max-<br>players]]
! [[maxplayers|max-<br>players]]
! CFG filenames executed, if existent
! CFG filenames executed, if existent
! Description
! Description
|-
|- id="Casual"
| [[File:Csgo icon casual.png|32px]]
| [[File:Csgo icon casual.png|32px]]
| [[Creating a Classic Counter-Strike Map|Casual]] ''(default)''
| [[Creating a Classic Counter-Strike Map|Casual]] ''(default)''
| <center>0</center>
| <center>0</center>
| <center>0</center>
| <center>0</center>
| <code>casual</code>
| <tt>casual</tt>
| <code>casual</code>
| <tt>casual</tt>
| 20
| 20
| gamemode_casual.cfg, <br> gamemode_casual_server.cfg
| gamemode_casual.cfg, <br> gamemode_casual_server.cfg
| Like Competitive but with fewer rounds, shorter freezetime per round, no friendly fire, no team collision, free [[item_assaultsuit|armor]] and free [[item_defuser|defuse kit]]/[[item_cutters|cutters]].
| Like Competitive but with fewer rounds, shorter freezetime per round, no friendly fire, no team collision, free [[item_assaultsuit|armor]] and free [[item_defuser|defuse kit]]/[[item_cutters|cutters]].
|-
|- id="Competitive"
| [[File:Csgo icon competitive.png|32px]]
| [[File:Csgo icon competitive.png|32px]]
| [[Creating a Classic Counter-Strike Map|Competitive]]
| [[Creating a Classic Counter-Strike Map|Competitive]]
| <center>0</center>
| <center>0</center>
| <center>1</center>
| <center>1</center>
| <code>competitive</code>
| <tt>competitive</tt>
| <code>competitive, comp</code>
| <tt>competitive, comp</tt>
| 10
| 10
| gamemode_competitive.cfg, <br> gamemode_competitive_offline.cfg&nbsp;(!)<br> gamemode_competitive_server.cfg
| gamemode_competitive.cfg, <br> gamemode_competitive_offline.cfg&nbsp;(!)<br> gamemode_competitive_server.cfg
| The classic game mode, usually made for 5v5. Best of 30 rounds, teams are switched at halftime, friendly fire is on. Round-ending objectives are elimination, [[Creating a Bomb Defusal Map|bomb explosion, bomb defusal]], [[Creating a Hostage Rescue Map|hostage rescue]] and timeout.
| The classic game mode, usually made for 5v5. Best of 30 rounds, teams are switched at halftime, friendly fire is on. Round-ending objectives are [[Creating a Classic Counter-Strike Map#Game Mode Description|elimination, bomb explosion, bomb defusal, hostage rescue and timeout]].
|-
|- id="Wingman"
| [[File:Csgo icon wingman.png|32px]]
| [[File:Csgo icon wingman.png|32px]]
| [[Creating_a_Wingman_Map|Wingman]]
| [[Counter-Strike: Global Offensive/Game Modes/Wingman|Wingman]]
| <center>0</center>
| <center>0</center>
| <center>2</center>
| <center>2</center>
| <code>scrimcomp2v2</code>
| <tt>scrimcomp2v2</tt>
| <code>scrimcomp2v2</code>
| <tt>scrimcomp2v2</tt>
| 4
| 4
| gamemode_competitive2v2.cfg, <br> gamemode_competitive2v2_offline.cfg&nbsp;(!)<br> gamemode_competitive2v2_server.cfg
| gamemode_competitive2v2.cfg, <br> gamemode_competitive2v2_offline.cfg&nbsp;(!)<br> 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.
| Like Competitive, but adjusted for 2v2 and for a smaller map or a map section. Best of 16 rounds. Also, each round is shorter.
|-
|- id="Weapons Expert"
|
|
| Weapons Expert
| [[Counter-Strike: Global Offensive/Game Modes/Weapons Expert|Weapons Expert]]
| <center>0</center>
| <center>0</center>
| <center>3</center>
| <center>3</center>
| <code>scrimcomp5v5</code>
| <tt>scrimcomp5v5</tt>
| <code>scrimcomp5v5</code>
| <tt>scrimcomp5v5</tt>
| 10
| 10
| gamemode_competitive.cfg, <br> gamemode_competitive_offline.cfg&nbsp;(!)<br> op08_weapons_expert.cfg, <br> gamemode_competitive_server.cfg
| gamemode_competitive.cfg, <br> gamemode_competitive_offline.cfg&nbsp;(!)<br> op08_weapons_expert.cfg, <br> gamemode_competitive_server.cfg
| Like Competitive but every player can buy each weapon at most once per match. The freezetime is a bit longer.
| Like Competitive but every player can buy each weapon at most once per match. The freezetime is a bit longer.
|-
|- id="Training Day"
|
|style=white-space:nowrap|Training Day
:{{cs2|only}}
| <center>0</center>
| <center>4</center>
| <tt>new_user_training</tt>
| <tt>new_user_training</tt>
| 10
| gamemode_new_user_training.cfg
| Like Competitive with bots but automatically assigning humans to Terrorists with game instructions turned on. This game mode's CFG file also specifies a [[Counter-Strike: Global Offensive/Bot Behavior Trees|behavior tree]] for the bots that is made for {{csgo map|de_dust2|Dust II}}.
|- id="Arms Race"
| [[File:Csgo icon armsrace.png|32px]]
| [[File:Csgo icon armsrace.png|32px]]
| [[Creating_a_Arsenal:_Arms_Race_Map|Arms Race]]
| [[Counter-Strike: Global Offensive/Game Modes/Arms Race|Arms Race]]
| <center>1</center>
| <center>1</center>
| <center>0</center>
| <center>0</center>
| <code>gungameprogressive</code>
| <tt>gungameprogressive</tt>
| <code>armsrace, arms,<br>gungame, gg,<br>gungameprogressive</code>
| <tt>armsrace, arms,<br>gungame, gg,<br>gungameprogressive</tt>
| 10
| 10
| gamemode_armsrace.cfg, <br> gamemode_armsrace_server.cfg
| gamemode_armsrace.cfg, <br> 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.
| 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.
|-
|- id="Demolition"
| [[File:Csgo icon demolition.png|32px]]
| [[File:Csgo icon demolition.png|32px]]
| [[Creating_a_Arsenal:_Demolition_Map|Demolition]]
| [[Counter-Strike: Global Offensive/Game Modes/Demolition|Demolition]]
| <center>1</center>
| <center>1</center>
| <center>1</center>
| <center>1</center>
| <code>gungametrbomb</code>
| <tt>gungametrbomb</tt>
| <code>demolition, demo,<br>gungametrbomb</code>
| <tt>demolition, demo,<br>gungametrbomb</tt>
| 10
| 10
| gamemode_demolition.cfg, <br> gamemode_demolition_server.cfg
| gamemode_demolition.cfg, <br> 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.
| A mixture of Casual with Armsrace. Best of 20 rounds. Each player is given a fixed weapon for each round, depending on their individual progress. Each player can progress one gun per round by making at least one kill.
|-
|- id="Deathmatch"
| [[File:Csgo icon deathmatch.png|32px]]
| [[File:Csgo icon deathmatch.png|32px]]
| [[CS:GO Gamemodes: Deathmatch|Deathmatch]]
| [[Counter-Strike: Global Offensive/Game Modes/Deathmatch|Deathmatch]]
| <center>1</center>
| <center>1</center>
| <center>2</center>
| <center>2</center>
| <code>deathmatch</code>
| <tt>deathmatch</tt>
| <code>deathmatch, dm</code>
| <tt>deathmatch, dm</tt>
| 16
| 16
| gamemode_deathmatch.cfg, <br> gamemode_deathmatch_server.cfg
| gamemode_deathmatch.cfg, <br> 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.
| 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.
|-
|- id="Training"
| [[File:Csgo icon training.png|32px]]
| [[File:Csgo icon training.png|32px]]
| Training
| Training
| <center>2</center>
| <center>2</center>
| <center>0</center>
| <center>0</center>
| <code>training</code>
| <tt>training</tt>
| <code>training</code>
| <tt>training</tt>
| 1
| 1
| gamemode_training.cfg, <br> gamemode_training_server.cfg
| gamemode_training.cfg, <br> 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.
| 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.
|-
|- id="Custom"
|
|
| [[CS:GO_Custom_Game_Mode|Custom]]
| [[Counter-Strike: Global Offensive/Game Modes/Custom|Custom]]
| <center>3</center>
| <center>3</center>
| <center>0</center>
| <center>0</center>
| <code>custom</code>
| <tt>custom</tt>
| <code>custom</code>
| <tt>custom</tt>
| 100
| 100
| -
| gamemode_custom.cfg, <br> gamemode_custom_server.cfg
| Like Undefined, see below, but if <code>sv_autoexec_mapname_cfg</code> is not <code>0</code> (which however it its default value), the CFG file <code>csgo/maps/cfg/<mapname>.cfg</code> is [[execwithwhitelist|executed with whitelist]].
| Like ''Undefined'', see below. This is an "empty" game mode allowing mapmakers to implement any map-specific ''custom'' game mode, if they wish to.<br>If <tt>sv_autoexec_mapname_cfg</tt> is not <code>0</code> (which however it its default value), the CFG file {{Path|csgo/maps/cfg/<mapname>|cfg|icon=file}} is [[execwithwhitelist|executed with whitelist]].
|-
|- id="Guardian"
| [[File:Csgo icon guardian.png|32px]]
| [[File:Csgo icon guardian.png|32px]]
| [[Creating_a_Guardian_Scenario_Map|Guardian]]
| [[Counter-Strike: Global Offensive/Game Modes/Guardian|Guardian]]
| <center>4</center>
| <center>4</center>
| <center>0</center>
| <center>0</center>
| <code>cooperative</code>
| <tt>cooperative</tt>
| <code>guardian, guard,<br>cooperative</code>
| <tt>guardian, guard,<br>cooperative</tt>
| 20
| 20
| gamemode_competitive.cfg, <br> gamemode_cooperative.cfg, <br> gamemode_cooperative_server.cfg
| gamemode_competitive.cfg, <br> gamemode_cooperative.cfg, <br> 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 as intended.
| Two human players must defend a bombsite as CT or hostages as T against rushing bots. Maps must support this mode to work as intended.
|-
|- id="Co-op Strike"
| [[File:Csgo icon coopstrike.png|32px]]
| [[File:Csgo icon coopstrike.png|32px]]
| [[Creating_a_Co-op_Strike_Map|Co-op Strike]]
| [[Counter-Strike: Global Offensive/Game Modes/Co-op Strike|Co-op Strike]]
| <center>4</center>
| <center>4</center>
| <center>1</center>
| <center>1</center>
| <code>coopmission</code>
| <tt>coopmission</tt>
| <code>coop, coopstrike,<br>coopmission</code>
| <tt>coop, coopstrike,<br>coopmission</tt>
| 10
| 10
| gamemode_competitive.cfg, <br> gamemode_coopmission.cfg, <br> gamemode_coopmission_server.cfg
| gamemode_competitive.cfg, <br> gamemode_coopmission.cfg, <br> gamemode_coopmission_server.cfg
| Usually a custom mission for two human players on a custom map that is designed primarily for this mode.
| Usually a custom mission for two human players on a custom map that is designed primarily for this mode.
|-
|- id="Skirmish Type"
| [[File:Csgo icon skirmish.png|32px]]
| [[File:Csgo icon skirmish.png|32px]]
| [[CS:GO Game Mode Commands#Skirmish Modes|Skirmish]]
| [[#Skirmish Modes|War Games]]
| <center>5</center>
| <center>5</center>
| <center>0</center>
| <center>0</center>
| <code>skirmish</code>
| <tt>skirmish</tt>
| <code>skirmish</code>
| <tt>skirmish</tt>
| 12
| 12
| -
| -
| Like Undefined, see below.
| Like ''Undefined'', see below. {{ModernConfusion|This game type is not used for [[#Skirmish Modes]], also known as War Games.}}
|-
|- id="Danger Zone"
| [[File:Csgo icon dangerzone.png|32px]]
| [[File:Csgo icon dangerzone.png|32px]]
| [[Creating_a_Danger_Zone_Map|Danger Zone]]
| [[Counter-Strike: Global Offensive/Game Modes/Danger Zone|Danger Zone]]
| <center>6</center>
| <center>6</center>
| <center>0</center>
| <center>0</center>
| <code>survival</code>
| <tt>survival</tt>
| <code>survival</code>
| <tt>survival</tt>
| 16
| 16
| gamemode_survival.cfg, <br> gamemode_survival_server.cfg
| gamemode_survival.cfg, <br> 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 to work as intended.
| 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 to work as intended.
|-
|- id="Workshop"
|
| Workshop
:{{cs2|only}}
| <center>7</center>
| <center>0</center>
| <tt>workshop</tt>
| -
| 1
| gamemode_workshop.cfg, <br> gamemode_workshop_server.cfg
| {{clarify|Seems not yet implemented. Appears in the file {{path|csgo/pak01_dir.vpk/gamemodes_tools|txt|icon=file}}. This combination of <tt>game_type</tt> and <tt>game_mode</tt> is not yet recognized by the game, but it is reserved, as a comment in <code>.../gamemodes.txt</code> states.}}
|- id="Map default"
|
|
| ''Map default''
| ''Map default''
| colspan="2" | <center>''see<br>description''</center>
| colspan="2"|<center>''see<br>description''</center>
| -
| -
| <code>default, auto</code>
| <tt>default, auto</tt>
| ''depends''
| ''depends''
| ''depends''
| ''depends''
| This is not a game mode itself, rather a "redirect". The game picks <code>game_type</code> and <code>game_mode</code> from the map's <code>default_game_type</code> and <code>default_game_mode</code> values, defined in either <code>csgo/maps/[[.kv|<mapname>.kv]]</code>, <code>csgo/[[gamemodes.txt]]</code> (under <code>maps/<mapname>/</code>) or <code>csgo/gamemodes_server.txt</code>. If they are defined in more than one of these files, the latter of the named files overrides the former. If they are not defined in any of these, the current type and mode are kept. All official maps use this appropriately (just that competitive maps use Casual).
| This is not a game mode itself, rather a "redirect". The game picks {{Code|game_type}} and {{Code|game_mode}} from the map's <code>default_game_type</code> and <code>default_game_mode</code> values, defined in either {{Path|csgo/maps/[[.kv|<mapname>]]|kv|icon=file}}, {{Path|csgo/[[gamemodes.txt|gamemodes]]|txt|icon=file}} (under <code>maps/<mapname>/</code>) or {{Path|csgo/gamemodes_server|txt|icon=file}}. If they are defined in more than one of these files, the latter of the named files overrides the former. If they are not defined in any of these, the current type and mode are kept. All official maps use this appropriately (just that competitive maps use Casual).
|-
{{Example|
* Invoking <code>map de_dust2 auto</code> launches ''Dust II'' in Casual.<br>
* Invoking <code>map ar_shoots auto</code> launches ''Shoots'' in Arms Race.}}
|- id="Undefined"
|
|
| ''Undefined''
| ''Undefined''
| colspan="2" | <center>''none of<br>the above''</center>
| colspan="2"|<center>''none of<br>the above''</center>
| -
| -
| -
| -
Line 240: Line 343:
| No CFG file is executed, only the [[whitelistcmd|whitelisted ConVars]] are set to their default value. By default this results in game rules like Casual but with no round limit, instead with a time limit of 5 minutes for the game and map. <code>mp_roundtime</code> is also set to 5 minutes.
| No CFG file is executed, only the [[whitelistcmd|whitelisted ConVars]] are set to their default value. By default this results in game rules like Casual but with no round limit, instead with a time limit of 5 minutes for the game and map. <code>mp_roundtime</code> is also set to 5 minutes.
|}
|}


== Game Mode Flags ==
== Game Mode Flags ==
Line 256: Line 357:
| 32 || <code>gamemode_<internal game mode name>_short.cfg</code>
| 32 || <code>gamemode_<internal game mode name>_short.cfg</code>
|}
|}
{{note|This works for all game modes except Custom.}}
{{Note|This works for all game modes except Custom.}}
{{note|A <code>_short</code> CFG is executed before a <code>_tmm</code> CFG.}}
{{Note|A <code>_short</code> CFG is executed before a <code>_tmm</code> CFG.}}


{{Example|
{{Example|
Line 268: Line 369:
|+ Current usage of Game Mode Flags
|+ Current usage of Game Mode Flags
!rowspan="2" colspan="2"| Game Mode
!rowspan="2" colspan="2"| Game Mode
!rowspan="2"| Flags Usage
!colspan="3"| Flags Value
!colspan="3"| Flags Value
|-
|-
! 0
! 0
! 4
! 4 (<tt>tmm</tt>)
! 32
! 32 (<tt>short</tt>)
|-
|-
| [[File:Csgo icon competitive.png|32px]]
| [[File:Csgo icon competitive.png|32px]]
| Competitive
| Competitive
| match length
| ''default''
| ''default''
|  
|  
Line 284: Line 383:
| [[File:Csgo icon deathmatch.png|32px]]
| [[File:Csgo icon deathmatch.png|32px]]
| Deathmatch
| Deathmatch
| style
| ''default''
| ''default''
| Team vs Team
| Team vs Team
Line 290: Line 388:
|}
|}


Exmaple: To play Team vs Team, invoke <code>game_type 1; game_mode 2; sv_game_mode_flags 4; map <mapname></code>, or shorter: <code>sv_game_mode_flags 4; map <mapname> dm</code>.
{{Example|To play Team vs Team, invoke <code>game_type 1; game_mode 2; sv_game_mode_flags 4; map <mapname></code>, or shorter: <code>sv_game_mode_flags 4; map <mapname> dm</code>.}}


== Skirmish Modes ==
== Skirmish Modes ==
Line 296: Line 394:
'''War Games''' are game mode variations.
'''War Games''' are game mode variations.


The [[ConVar]] <code>'''sv_skirmish_id'''</code> determines the War Game that a map will be launched in. Each War Game can have [[CFG]] files associated to it that are executed if a map is launched in that War Game, namely if <code>sv_skirmish_id</code> is set to the ID of that War Game. These CFG files contain only few commands and are executed after the CFG files of a game mode and after the CFG files of the game mode flags. They can be loaded in any game mode, but the intended game mode of a skirimsh CFG file (the ones in the table below) can be found in <code>csgo/scripts/items/items_game.txt</code> and also in the CFG file itself.
The [[ConVar]] <code>'''sv_skirmish_id'''</code> determines the War Game that a map will be launched in. Each War Game can have [[CFG]] files associated to it that are executed if a map is launched in that War Game, namely if <code>sv_skirmish_id</code> is set to the ID of that War Game. These CFG files contain only few commands and are executed after the CFG files of a game mode and after the CFG files of the game mode flags. They can be loaded in any game mode, but each skirimsh CFG file has a game mode that is intended to be used as a base which can be found in the appropriate game's text file and also in the skirmish CFG file itself.


To play one of the following game modes, type <code>sv_skirmish_id <number></code> in the console and launch a map with the intended game mode, see above.
To play one of the following skirmish modes, type <code>sv_skirmish_id <number></code> in the console and launch a map with the intended game mode, see above.
<br>
<br>
Alternatively, one could also do <code>exec <cfg filename></code> and <code>mp_restartgame 1</code> in-game or even write own [[CFG|configs]] for that matter.
Alternatively, one could also do <code>exec <cfg filename></code> and <code>mp_restartgame 1</code> in-game or even write own [[CFG|configs]] for that matter.


To return to a "pure" game mode found in the above table, set <code>sv_skirmish_id</code> to a value that is '''not''' in the following table (intuitively 0), so the game will not load any additional CFG files to a game mode.
To return to a "pure" game mode found in the above table, set <code>sv_skirmish_id</code> back to 0, so the game will not load any additional CFG files to a game mode.


{{Example|
{{Example|
Line 309: Line 407:
}}
}}


{{note | The skirmish IDs 5 and 9 are undefined. However, there are CFG files in <code>csgo/cfg/</code> that have no associated skirmish ID. They are mentioned at the end of the following table.}}
{{Note|The skirmish IDs 5 and 9 are undefined. However, there are CFG files in {{Path|csgo/cfg/}} that have no associated skirmish ID. They are mentioned at the end of the following table.}}
 
{{Note|The information of this table can be found in {{csgo}}{{cs2}} {{Path|csgo/scripts/items/items_game|txt|icon=file}} under <code>skirmish_modes</code> or in {{cs2}} {{Path|csgo/scripts/items/skirmish_ids|txt|icon=file}}.}}
{{note | The information of this table can be found in <code>csgo/scripts/items/items_game.txt</code> under <code>skirmish_modes</code>.}}


{| class="standard-table mw-collapsible" style="width:100%;"
{| class="standard-table mw-collapsible" style="width:100%;"
!style="white-space:nowrap;" colspan="2"| War Game
|- style="position:sticky; top:0"
! skirmish<br>id
! style="white-space:nowrap" colspan="2" | War Game
! <tt>skirmish<br>_id</tt>
! Internal Name
! Internal Name
! Intended Game Mode
! Intended Game Mode
Line 321: Line 419:
! Description
! Description
|-
|-
|
| ''None (default)''
| <center>0</center>
| -
| -
| -
| No Skirmish Mode, i.e. the game mode defined by <code>game_type</code> and <code>game_mode</code>.
|- id="Stab Stab Zap"
|
|
| Stab Stab Zap
| Stab Stab Zap
Line 328: Line 434:
| op08_stab_stab_zap.cfg
| op08_stab_stab_zap.cfg
| Only [[weapon_knife|knives]], recharging [[weapon_taser|taser]] and grenades.
| Only [[weapon_knife|knives]], recharging [[weapon_taser|taser]] and grenades.
|-
|- id="Free For All"
|
|
| Free For All
| Free For All
Line 335: Line 441:
| Deathmatch
| Deathmatch
| gamemode_dm_freeforall.cfg
| gamemode_dm_freeforall.cfg
| Like Deathmatch, but teammates are enemies. {{note|The official FFA Deathmatch mode is not this skirmish mode, see [[#Game Mode Flags]].}}
| Like Deathmatch, but teammates are enemies. {{Note|The official FFA Deathmatch mode is not this skirmish mode, see [[#Game Mode Flags]].}}
|-
|- id="Flying Scoutsman"
| [[File:Csgo icon skirmish flyingscoutsman.png|32px]]
| [[File:Csgo icon skirmish flyingscoutsman.png|32px]]
| Flying Scoutsman
| Flying Scoutsman
Line 344: Line 450:
| op08_flying_scoutsman.cfg
| op08_flying_scoutsman.cfg
| Only [[weapon_ssg08|scouts]] and [[weapon_knife|knives]], low gravity, high precision.
| Only [[weapon_ssg08|scouts]] and [[weapon_knife|knives]], low gravity, high precision.
|-
|- id="Trigger Discipline"
|
|
| Trigger Discipline
| Trigger Discipline
Line 351: Line 457:
| Casual
| Casual
| op08_trigger_discipline.cfg
| op08_trigger_discipline.cfg
| Gunshots that a [[player]] does not hit an enemy with damage himself down to a minimum of 1 [[Health|HP]].
| Gunshots that a [[player]] does not hit an enemy with damage theirselves down to a minimum of 1 [[Health|HP]].
|-
|- id="Boom! Headshot!"
|
|
| Boom! Headshot!
| Boom! Headshot!
Line 360: Line 466:
| op08_headshots.cfg
| op08_headshots.cfg
| Helmets are disabled and bodyshots deal no damage, causing a small spark effect instead of blood.
| Helmets are disabled and bodyshots deal no damage, causing a small spark effect instead of blood.
|-
|- id="Hunter-Gatherers"
|
|
| Hunter-Gatherers
| Hunter-Gatherers
Line 367: Line 473:
| Deathmatch
| Deathmatch
| op08_hunter_gatherers.cfg
| op08_hunter_gatherers.cfg
| [[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.
| [[Counter-Strike: Global Offensive/Game Modes/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 [[Counter-Strike: Global Offensive/Game Modes/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.
|-
|- id="Heavy Assault Suit"
|
|
|style="white-space:nowrap;"| Heavy Assault Suit
|style="white-space:nowrap;"| Heavy Assault Suit
Line 375: Line 481:
| Casual
| Casual
| op08_heavy_assault_suit.cfg
| op08_heavy_assault_suit.cfg
| [[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.}}
| [[item_heavyassaultsuit|Heavy armor]] can be purchased for $6000. {{ModernDeprecated|The item is no longer accessible, neither using the buy menu, nor with the command <code>[[buy]] heavyarmor</code>, rendering this skirmish mode useless.}}
|-
|- id="Arms Race Skirmish"
| [[File:Csgo icon skirmish armsrace.png|32px]]
| [[File:Csgo icon skirmish armsrace.png|32px]]
| Arms Race
| Arms Race
Line 383: Line 489:
| Arms Race
| Arms Race
| -
| -
| Equivalent to Arms Race.
| Equivalent to [[#Arms Race]].
|-
|- id="Demolition Skirmish"
|
|
| Demolition
| Demolition
Line 391: Line 497:
| Demolition
| Demolition
| -
| -
| Equivalent to Demolition.
| Equivalent to [[#Demolition]].
|-
|- id="Retakes"
| [[File:Csgo icon skirmish retakes.png|32px]]
| [[File:Csgo icon skirmish retakes.png|32px]]
| [[CS:GO_Game_Mode_-_Retakes|Retakes]]
| [[Counter-Strike: Global Offensive/Game Modes/Retakes|Retakes]]
| <center>12</center>
| <center>12</center>
| <code>retakes</code>
| <code>retakes</code>
| 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. {{Warning | If there is exactly one bombsite, the game crashes with a probability of 50 %.}}
| 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 %.}}
|-
|- id="Bloodletter"
|
|
| Bloodletter
| Bloodletter
Line 408: Line 514:
| op08_bloodletter.cfg
| 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.
| Dealing damage heals you 100 % of the damage dealt (max 200). Players take non-lethal damage over time while they are alive.
|-
|- id="Bounty Hunter"
|
|
| Bounty Hunter
| Bounty Hunter
Line 416: Line 522:
| op08_bounty_hunter.cfg
| op08_bounty_hunter.cfg
| 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.
| 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.
|-
|- id="Team Deathmatch"
|
|
| [[CS:GO Gamemodes: Deathmatch#Team Mode|Team Deathmatch]]
| [[Counter-Strike: Global Offensive/Game Modes/Deathmatch#Team Mode|Team Deathmatch]]
| <center>-</center>
| <center>-</center>
| -
| -
| Deathmatch
| Deathmatch
| op08_team_deathmatch.cfg
| op08_team_deathmatch.cfg
| 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. {{note|The official Team Deathmatch mode is not this skirmish mode, see [[#Game Mode Flags]].}}
| Killing enemies is worth team victory points, killing enemies with the Deathmatch [[Counter-Strike: Global Offensive/Game Modes/Deathmatch#Bonus Weapon|bonus weapon]] awards additional victory points. The team with the most victory points at the end of the time limit wins. {{Note|The official Team Deathmatch mode is not this skirmish mode, see [[#Game Mode Flags]].}}
|}
|}


== Game Mode dependent Events ==
== Game Mode dependent Events ==
{| style=float:right
{| style=float:right
| <syntaxhighlight lang=cpp>
| <syntaxhighlight lang=cpp>
local nMode = ScriptGetGameMode();
local nType = ScriptGetGameType() // game_type
local nType = ScriptGetGameType();
local nMode = ScriptGetGameMode() // game_mode


if (nType == 0 && nMode == 2)
if (nType == 0 && nMode == 2)
{
{
   // code executed only in Wingman
   // code executed only in Wingman
  EntFire( "spawnpoints.2v2", "SetEnabled", "", 0 )
}
}
else
else
{
{
   // code executed only in any other game mode
   // code executed only in any other game mode
  EntFire( "spawnpoints.2v2", "SetDisabled", "", 0 )
}
}
</syntaxhighlight>
</syntaxhighlight>
{{Note|The variable names <code>nType, nMode</code> are arbitrary.}}
|}
|}
In [[VScript]], 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>.
In [[VScript]], 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>, respectively.
{{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 one on the right.
These allow VScript structures such as the one on the right; If this example code is executed, it will fire an [[I/O]] event to entities named '''spawnpoints.2v2''' depending on the current game mode. Code can be executed every round by saving it in a <code>.nut</code> file under {{Path|csgo/scripts/vscripts/}} and by adding it to the [[Entity Scripts]] of any entity in a map. See also: [[VScript Fundamentals]] and {{sq|2}}.
With this concept, one can manipulate gameplay ''depending on the current game mode'', which is a really powerful tool to make other game modes such as Co-op Strike work.


{{Idea | When making a map, you can create a VScript exclusively for that map and use this concept to make game mode dependent changes to: the map flow, player spawns, gamerules and much more. For example, it is possible to make closed areas on a map that are opened up only in some game modes, such as Deathmatch and Armsrace.}}
With this concept, one can manipulate gameplay ''depending on the current game mode'', which is a really powerful tool to make other game modes such as {{csgo mode|Coop}} work.
{{clr}}


[[Category: Counter-Strike: Global Offensive]]
{{Example|The script {{Path|csgo/scripts/vscripts/2v2/2v2_enable|nut|icon=file}} provided by Valve is commonly used to shift player spawn points and activate blockers in {{csgo mode|Wingman}}.}}
{{Idea|When making a map, you can create a VScript exclusively for that map and use this concept to make game mode dependent changes to: the map flow, player spawns, gamerules and much more. For example, it is possible to make closed areas on a map that are opened up only in some game modes, such as Deathmatch and Armsrace.}}
{{clr}}{{cs2-navbox}}
{{csgo-navbox}}
{{Cs2 topicon}}{{Csgo topicon}}

Latest revision as of 23:01, 9 January 2025

English (en)Deutsch (de)中文 (zh)Translate (Translate)
Icon-delisted.png
This page documents information about a game or software, Counter-Strike: Global Offensive Counter-Strike: Global Offensive, that is no longer available for purchase or download digitally.
It is covered here for historical and technical reference.

Here are tables of the game modes and the console commands to launch them in Counter-Strike: Global Offensive Counter-Strike: Global Offensive and Counter-Strike 2 Counter-Strike 2.

The paths named on this page are relative to Counter-Strike: Global Offensive 🖿.../steamapps/common/Counter-Strike Global Offensive/ or Counter-Strike 2 🖿.../steamapps/common/Counter-Strike Global Offensive/game/ respectively.

Icon-Important.pngImportant:Counter-Strike 2 As of 2025-01-10, most of this page applies to CS2, except for the following.
  • The game supports the game modes CS:GO/CS2 Casual Casual, CS:GO/CS2 Competitive Competitive, CS:GO/CS2 Wingman Wingman, Training Day, CS:GO/CS2 Deathmatch Deathmatch and CS:GO/CS2 Arms Race Arms Race.
  • Custom works as usual. In CS:GO Guardian Guardian, special kills are not counted such that the human players cannot win as intended. In CS:GO Demolition Demolition, the players are not given any guns but the C4.
  • Skirmish modes seem not to be implemented yet.
  • The map command does allow for a game mode parameter, like so: map de_dust2 gamemode=X. Legal values for X are:
    casual, competitive/comp, scrimcomp2v2/wingman, scrimcomp5v5, new_user_training, ar/armsrace/gungameprogressive, gungametrbomb, dm/deathmatch, training, custom, guard/guardian/cooperative, coop/coopmision, skirmish, survival, default/auto.
  • There is a new command game_alias <string> to set game_type and game_mode according to the specified string. However, the set of legal values for this are not identical to the map command parameters, and it does not seem to set sv_skirmish_id.

Overview

To launch a map with a desired game mode, adjust the ConVars

  • game_type,
  • game_mode,
  • sv_game_mode_flags and
  • sv_skirmish_id

according to the tables below and load a map by using the map <mapname> or changelevel <mapname> console command.

Warning.pngRisk of Confusion:The 1v1 warmup arenas seen in some official Competitive and Wingman maps do not use an own game mode. If warmup arenas are implemented in a map, they can be played in by launching the map in Competitive or Wingman and invoking mp_warmup_start.
Quick Examples to load Dust II
Game Mode Console Commands
keep previous map de_dust2
CS:GO/CS2 Deathmatch Deathmatch game_type 1; game_mode 2;
sv_game_mode_flags 0;
sv_skirmish_id 0;
map de_dust2
CS:GO/CS2 Competitive Short Competitive game_type 0; game_mode 1;
sv_game_mode_flags 32;
sv_skirmish_id 0;
map de_dust2
CS:GO/CS2 Flying Scoutsman Flying Scoutsman game_type 0; game_mode 0;
sv_game_mode_flags 0;
sv_skirmish_id 3;
map de_dust2
Defined pairs of values for game_type and game_mode
game_type game_mode
0 1 2 3 4
Classic 0 CS:GO/CS2 Casual Casual CS:GO/CS2 Competitive Competitive CS:GO/CS2 Wingman Wingman Weapons Expert Counter-Strike 2 Training Day
Gun Game 1 CS:GO/CS2 Arms Race Arms Race CS:GO Demolition Demolition CS:GO/CS2 Deathmatch Deathmatch
Training 2 CS:GO Training Training
Custom 3 Custom
Cooperative 4 CS:GO Guardian Guardian CS:GO Co-op Strike Co-op Strike
Skirmish 5 CS:GO/CS2 War Games War Games
Free For All 6 CS:GO Danger Zone Danger Zone
For details, see #Game Type and Game Mode.
Some values for sv_skirmish_id
ID War Game Game Mode
0 None (default)
3 CS:GO/CS2 Flying Scoutsman Flying Scoutsman Casual
10 CS:GO/CS2 Arms Race Arms Race Arms Race
11 CS:GO Demolition Demolition Demolition
12 CS:GO/CS2 Retakes Retakes Casual
For details, see #Skirmish Modes.

Loading a Map

When loading a map, the game will...

  1. set the whitelisted ConVars (the ones listed in Filecsgo/bspconvar_whitelist.txt) to their default value,[no such file in CS2]
  2. execute the CFG files associated with the current values of game_type and game_mode (defined in Filecsgo/gamemodes.txt and Filecsgo/gamemodes_server.txt),
  3. execute the CFG file associated with the current value of sv_game_mode_flags, see below, and
  4. execute the CFG file associated with the current value of sv_skirmish_id (defined in Filecsgo/scripts/items/items_game.txt under skirmish_modes), see below.

If these four ConVars are not set before loading a map, the map launches in the last game mode played. Their initial value is 0 (Casual).

Tip.pngTip:The map and changelevel commands have an optional <game mode alias> parameter. Example: map de_dust2 deathmatch or changelevel myCustomMap coop. If such an alias parameter is given and if it is valid, the game will adjust game_type and game_mode and launch the map with the associated game mode. See the map command aliases column in the following big table.
Tip.pngTip:Maps can have a default game mode, which can be read with map <mapname> default or map <mapname> auto. See #Map default.
Tip.pngTip:Set Launch Options can be used, e.g: +game_type <number> +game_mode <number> +map <mapname>
Tip.pngTip:You can use aliases to make frequent testing easier, for example alias MyMapRetake "game_type 0; game_mode 0; sv_skirmish_id 12; map MyMap". Best used in autoexecs which allows to quickly launch and test custom maps in the right game mode.
Note.pngNote: If you want to run a map in a Classic game mode with bots, make sure bot_quota_mode is not set to competitive, as this causes them to stop.
Tip.pngIdea:You can create gamemode_competitive_server.cfg (see below) to automatically set bot_quota and bot_quota_mode to have bots on your local server whenever you load a map in Competitive.
Note.pngNote:The game mode icons seen on the loading screen (and on this page) are loaded from 🖼Imagecsgo/materials/panorama/images/icons/ui/<internal mode name>.svg. If sv_skirmish_id is not 0, the internal name of the skirmish mode is used. If the game doesn't have the file, one can put a custom one to that place.

Game Type and Game Mode

game_type and game_mode are console variables that determine how the next map is initialized when loaded, including but not limited to the execution of CFG files, used to set some of the countless ConVars that control game rules, for example mp_roundtime, mp_t_default_secondary, sv_deadtalk and so forth.

Apart from that, there are also other game rules or settings for which the value of game_type and game_mode is checked during the current match. Examples are the UI for all players, the events when weapon_c4 is planted or defused, whether item_heavyassaultsuit causes a screen tint, whether players can pick up experimental weapons such as weapon_axe, ...

The following table lists all available game modes along with their values for game_type and game_mode, their internal name, their aliases for the map command, their default maximum number of players, the CFG files that are executed when a map is launched in this game mode, and a description.

Note.pngNote: The CFG files ending with _offline.cfg are only executed if the server was launched via Practice with Bots from the main menu. Valve uses them to enable bots in offline competitive since bots have been disabled in competitive by default, see bot_quota.
The CFG files ending with _server.cfg don't exist locally by default. You can create them and write commands into them that will be executed every time you locally launch the corresponding game mode.
Note.pngNote:With no adjustments, maxplayers is a hard limit for the number of players and bots on the server.
Note.pngNote: The information of these tables can be found in 🖿csgo/gamemodes.txt.
C++ The possible map command aliases can be found in the function GameTypes::GetGameTypeAndModeFromAlias defined in gametypes.cpp.
Game Mode type mode Internal Name map command
aliases
max-
players
CFG filenames executed, if existent Description
Csgo icon casual.png Casual (default)
0
0
casual casual 20 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.
Csgo icon competitive.png Competitive
0
1
competitive competitive, comp 10 gamemode_competitive.cfg,
gamemode_competitive_offline.cfg (!)
gamemode_competitive_server.cfg
The classic game mode, 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, hostage rescue and timeout.
Csgo icon wingman.png Wingman
0
2
scrimcomp2v2 scrimcomp2v2 4 gamemode_competitive2v2.cfg,
gamemode_competitive2v2_offline.cfg (!)
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.
Weapons Expert
0
3
scrimcomp5v5 scrimcomp5v5 10 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.
Training Day
(only in Counter-Strike 2)
0
4
new_user_training new_user_training 10 gamemode_new_user_training.cfg Like Competitive with bots but automatically assigning humans to Terrorists with game instructions turned on. This game mode's CFG file also specifies a behavior tree for the bots that is made for Dust II Dust II.
Csgo icon armsrace.png Arms Race
1
0
gungameprogressive armsrace, arms,
gungame, gg,
gungameprogressive
10 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.
Csgo icon demolition.png Demolition
1
1
gungametrbomb demolition, demo,
gungametrbomb
10 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 their individual progress. Each player can progress one gun per round by making at least one kill.
Csgo icon deathmatch.png Deathmatch
1
2
deathmatch deathmatch, dm 16 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.
Csgo icon training.png Training
2
0
training training 1 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 custom 100 gamemode_custom.cfg,
gamemode_custom_server.cfg
Like Undefined, see below. This is an "empty" game mode allowing mapmakers to implement any map-specific custom game mode, if they wish to.
If sv_autoexec_mapname_cfg is not 0 (which however it its default value), the CFG file Filecsgo/maps/cfg/<mapname>.cfg is executed with whitelist.
Csgo icon guardian.png Guardian
4
0
cooperative guardian, guard,
cooperative
20 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 as intended.
Csgo icon coopstrike.png Co-op Strike
4
1
coopmission coop, coopstrike,
coopmission
10 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 primarily for this mode.
Csgo icon skirmish.png War Games
5
0
skirmish skirmish 12 - Like Undefined, see below.
Warning.pngRisk of Confusion:This game type is not used for #Skirmish Modes, also known as War Games.
Csgo icon dangerzone.png Danger Zone
6
0
survival survival 16 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 to work as intended.
Workshop
(only in Counter-Strike 2)
7
0
workshop - 1 gamemode_workshop.cfg,
gamemode_workshop_server.cfg
Clarify: Seems not yet implemented. Appears in the file Filecsgo/pak01_dir.vpk/gamemodes_tools.txt. This combination of game_type and game_mode is not yet recognized by the game, but it is reserved, as a comment in .../gamemodes.txt states.
Map default
see
description
- default, auto depends depends This is not a game mode itself, rather a "redirect". The game picks game_type and game_mode from the map's default_game_type and default_game_mode values, defined in either Filecsgo/maps/<mapname>.kv, Filecsgo/gamemodes.txt (under maps/<mapname>/) or Filecsgo/gamemodes_server.txt. If they are defined in more than one of these files, the latter of the named files overrides the former. If they are not defined in any of these, the current type and mode are kept. All official maps use this appropriately (just that competitive maps use Casual).
PlacementTip.pngExample:
  • Invoking map de_dust2 auto launches Dust II in Casual.
  • Invoking map ar_shoots auto launches Shoots in Arms Race.
Undefined
none of
the above
- - ? - No CFG file is executed, only the whitelisted ConVars are set to their default value. By default this results in game rules 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.

Game Mode Flags

The ConVar sv_game_mode_flags is used for game mode variations. It can determine more CFG files that will be executed after the game mode CFG files when a map is launched. Its value is read bitwise, meaning that adding values of the following table together results in all associated CFG files being executed.

sv_game_mode_flags
Value CFG file executed, if existent
4 gamemode_<internal game mode name>_tmm.cfg
32 gamemode_<internal game mode name>_short.cfg
Note.pngNote:This works for all game modes except Custom.
Note.pngNote:A _short CFG is executed before a _tmm CFG.
PlacementTip.pngExample:
  • If set to 32 and a map is launched in Wingman, it will cause the execution of the CFG file gamemode_scrimcomp2v2_short.cfg.
  • If set to 36 and a map is launched in Wingman, it will cause the execution of the CFG files gamemode_scrimcomp2v2_short.cfg and gamemode_scrimcomp2v2_tmm.cfg, in this order.

Valve currently uses this to implement game mode variations without touching sv_skirmish_id.

Current usage of Game Mode Flags
Game Mode Flags Value
0 4 (tmm) 32 (short)
Csgo icon competitive.png Competitive default Short Match
Csgo icon deathmatch.png Deathmatch default Team vs Team Free For All
PlacementTip.pngExample:To play Team vs Team, invoke game_type 1; game_mode 2; sv_game_mode_flags 4; map <mapname>, or shorter: sv_game_mode_flags 4; map <mapname> dm.

Skirmish Modes

War Games are game mode variations.

The ConVar sv_skirmish_id determines the War Game that a map will be launched in. Each War Game can have CFG files associated to it that are executed if a map is launched in that War Game, namely if sv_skirmish_id is set to the ID of that War Game. These CFG files contain only few commands and are executed after the CFG files of a game mode and after the CFG files of the game mode flags. They can be loaded in any game mode, but each skirimsh CFG file has a game mode that is intended to be used as a base which can be found in the appropriate game's text file and also in the skirmish CFG file itself.

To play one of the following skirmish modes, type sv_skirmish_id <number> in the console and launch a map with the intended game mode, see above.
Alternatively, one could also do exec <cfg filename> and mp_restartgame 1 in-game or even write own configs for that matter.

To return to a "pure" game mode found in the above table, set sv_skirmish_id back to 0, so the game will not load any additional CFG files to a game mode.

PlacementTip.pngExample:
  • To launch Stab Stab Zap on de_dust2, enter sv_skirmish_id 1 and map de_dust2 casual. This is equivalent to sv_skirmish_id 1; game_type 0; game_mode 0; map de_dust2.
  • To launch Competitive on de_dust2 after having played a skirmish mode, enter sv_skirmish_id 0 and map de_dust2 comp. This is equivalent to sv_skirmish_id 0; game_type 0; game_mode 1; map de_dust2.
Note.pngNote:The skirmish IDs 5 and 9 are undefined. However, there are CFG files in 🖿csgo/cfg/ that have no associated skirmish ID. They are mentioned at the end of the following table.
Note.pngNote:The information of this table can be found in Counter-Strike: Global OffensiveCounter-Strike 2 Filecsgo/scripts/items/items_game.txt under skirmish_modes or in Counter-Strike 2 Filecsgo/scripts/items/skirmish_ids.txt.
War Game skirmish
_id
Internal Name Intended Game Mode CFG filenames executed with whitelist Description
None (default)
0
- - - No Skirmish Mode, i.e. the game mode defined by game_type and game_mode.
Stab Stab Zap
1
stabstabzap Casual op08_stab_stab_zap.cfg Only knives, recharging taser and grenades.
Free For All
2
dm_freeforall Deathmatch gamemode_dm_freeforall.cfg Like Deathmatch, but teammates are enemies.
Note.pngNote:The official FFA Deathmatch mode is not this skirmish mode, see #Game Mode Flags.
Csgo icon skirmish flyingscoutsman.png Flying Scoutsman
3
flyingscoutsman Casual op08_flying_scoutsman.cfg Only scouts and knives, low gravity, high precision.
Trigger Discipline
4
triggerdiscipline Casual op08_trigger_discipline.cfg Gunshots that a player does not hit an enemy with damage theirselves down to a minimum of 1 HP.
Boom! Headshot!
6
headshots Deathmatch op08_headshots.cfg Helmets are disabled and bodyshots deal no damage, causing a small spark effect instead of blood.
Hunter-Gatherers
7
huntergatherers 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
heavyassaultsuit Casual op08_heavy_assault_suit.cfg Heavy armor can be purchased for $6000.
Obsolete-notext.pngDeprecated:The item is no longer accessible, neither using the buy menu, nor with the command buy heavyarmor, rendering this skirmish mode useless.
Csgo icon skirmish armsrace.png Arms Race
10
armsrace Arms Race - Equivalent to #Arms Race.
Demolition
11
demolition Demolition - Equivalent to #Demolition.
Csgo icon skirmish retakes.png Retakes
12
retakes 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.
Warning.pngWarning:If there is exactly one bombsite, the game crashes with a probability of 50 %.
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.
Note.pngNote:The official Team Deathmatch mode is not this skirmish mode, see #Game Mode Flags.

Game Mode dependent Events

local nType = ScriptGetGameType() // game_type
local nMode = ScriptGetGameMode() // game_mode

if (nType == 0 && nMode == 2)
{
  // code executed only in Wingman
  EntFire( "spawnpoints.2v2", "SetEnabled", "", 0 )
}
else
{
  // code executed only in any other game mode
  EntFire( "spawnpoints.2v2", "SetDisabled", "", 0 )
}
Note.pngNote:The variable names nType, nMode are arbitrary.

In VScript, there are the Counter-Strike: Global Offensive specific VScript functions ScriptGetGameType() and ScriptGetGameMode() which return the current integer value of game_type and game_mode, respectively.

Note.pngNote:This is independent of the current value of sv_skirmish_id.

These allow VScript structures such as the one on the right; If this example code is executed, it will fire an I/O event to entities named spawnpoints.2v2 depending on the current game mode. Code can be executed every round by saving it in a .nut file under 🖿csgo/scripts/vscripts/ and by adding it to the Entity Scripts of any entity in a map. See also: VScript Fundamentals and Squirrel Squirrel.

With this concept, one can manipulate gameplay depending on the current game mode, which is a really powerful tool to make other game modes such as CS:GO Co-op Strike Co-op Strike work.

PlacementTip.pngExample:The script Filecsgo/scripts/vscripts/2v2/2v2_enable.nut provided by Valve is commonly used to shift player spawn points and activate blockers in CS:GO/CS2 Wingman Wingman.
Tip.pngIdea:When making a map, you can create a VScript exclusively for that map and use this concept to make game mode dependent changes to: the map flow, player spawns, gamerules and much more. For example, it is possible to make closed areas on a map that are opened up only in some game modes, such as Deathmatch and Armsrace.