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

From Valve Developer Community
Jump to navigation Jump to search
(Added Lang template. Moved the page for that matter to get the name right. Added first heading and TOC. Centered small type-mode-table. Made long tables collapsible because we can. Pushed code to the right. Removed Category:Console Variables.)
 
(Added missing map command parameters. Added 'Map default' row. Added icons, if existent.)
Line 2: Line 2:
{{toc-right}}
{{toc-right}}
{{back | Counter-Strike: Global Offensive Level Creation}}
{{back | Counter-Strike: Global Offensive Level Creation}}
Here are tables of the game modes and the console commands to launch them in {{csgo}} [[Counter-Strike: Global Offensive]].
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 ==
== Loading a Map ==
Line 11: Line 11:
When loading a map, the game will...
When loading a map, the game will...
# set the [[CSGO_Custom_Game_Mode#Whitelisting|whitelisted ConVars]] (the ones listed in <code>csgo/bspconvar_whitelist.txt</code>) to their default value,
# set the [[CSGO_Custom_Game_Mode#Whitelisting|whitelisted ConVars]] (the ones listed in <code>csgo/bspconvar_whitelist.txt</code>) to their default value,
# execute the [[cfg|.cfg]] files associated with the current values of <code>game_type</code> and <code>game_mode</code>,
# execute the [[cfg|.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/or <code>csgo/gamemodes_server.txt</code>),
# execute the .cfg file associated with the current value of <code>sv_skirmish_id</code>.
# 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>).


If these values are not set before loading a map, the map launches in the last game mode played.
If these values are not set before loading a map, the map launches in the last game mode played.
The initial values of <code>game_type</code>, <code>game_mode</code> and <code>sv_skirmish_id</code> are 0 (Casual).
The initial values of <code>game_type</code>, <code>game_mode</code> and <code>sv_skirmish_id</code> are 0 (Casual).


{{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.}}
{{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.}}
 
{{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.}}


{{Tip | [[Command Line Options|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>}}
Line 41: Line 43:
|-
|-
! Classic !! style="width:3em" | 0
! Classic !! style="width:3em" | 0
| [[Creating a Classic Counter-Strike Map|Casual]]
| [[File:Csgo icon casual.png|16px|link=]] [[Creating a Classic Counter-Strike Map|Casual]]
| [[Creating a Classic Counter-Strike Map|Competitive]]
| [[File:Csgo icon competitive.png|16px|link=]] [[Creating a Classic Counter-Strike Map|Competitive]]
| [[Creating_a_Wingman_Map|Wingman]]
| [[File:Csgo icon wingman.png|16px|link=]] [[Creating_a_Wingman_Map|Wingman]]
| Weapon Expert
| Weapon Expert
|-
|-
! Gun Game !! 1
! Gun Game !! 1
| [[Creating_a_Arsenal:_Arms_Race_Map|Armsrace]]
| [[File:Csgo icon armsrace.png|16px|link=]] [[Creating_a_Arsenal:_Arms_Race_Map|Armsrace]]
| [[Creating_a_Arsenal:_Demolition_Map|Demolition]]
| [[File:Csgo icon demolition.png|16px|link=]] [[Creating_a_Arsenal:_Demolition_Map|Demolition]]
| [[CS:GO_Gamemodes:_Deathmatch|Deathmatch]]
| [[File:Csgo icon deathmatch.png|16px|link=]] [[CS:GO_Gamemodes:_Deathmatch|Deathmatch]]
|-
|-
! Training !! 2
! Training !! 2
| Training
| [[File:Csgo icon training.png|16px|link=]] Training
|-
|-
! Custom !! 3
! Custom !! 3
Line 58: Line 60:
|-
|-
! Cooperative !! 4
! Cooperative !! 4
| [[Creating a Guardian Scenario Map|Guardian]]
| [[File:Csgo icon guardian.png|16px|link=]] [[Creating a Guardian Scenario Map|Guardian]]
| [[Creating a Co-op Strike Map|Co-op Strike]]
| [[File:Csgo icon coopstrike.png|16px|link=]] [[Creating a Co-op Strike Map|Co-op Strike]]
|-
|-
! Skirmish !! 5
! Skirmish !! 5
| Skirmish
| [[File:Csgo icon skirmish.png|16px|link=]] Skirmish
|-
|-
! Free For All !! 6
! Free For All !! 6
| [[Creating_a_Danger_Zone_Map|Danger Zone]]
| [[File:Csgo icon dangerzone.png|16px|link=]] [[Creating_a_Danger_Zone_Map|Danger Zone]]
|}
|}
{{minititle|About the following table}}
{{minititle|About the following table}}
Line 71: Line 73:
{{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.}}
{{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.}}
{{Note | With no adjustments, [[maxplayers]] is a hard limit for the number of [[player]]s and bots on the server.}}
{{Note | {{cpp}} The possible ''map command optional parameters'' can be found in the function <code>GameTypes::GetGameTypeAndModeFromAlias</code> defined in <code>gametypes.cpp</code>.}}


{| class="standard-table mw-collapsible" style="width:100%;"
{| class="standard-table mw-collapsible" style="width:100%;"
! Game Mode
! colspan="2"| Game Mode
! style="width:2.5em;" | type
! style="width:3em;" | type
! style="width:2.5em;" | mode
! style="width:3em;" | mode
! style="white-space:nowrap;"| map command<br>optional parameter
! style="white-space:nowrap;"| map command<br>optional parameters
! [[maxplayers|max-<br>players]]
! [[maxplayers|max-<br>players]]
! .cfg filenames executed, if existent
! .cfg filenames executed, if existent
! Description
! Description
|-
|-
| [[Creating a Classic Counter-Strike Map|Casual]] (default)
| [[File:Csgo icon casual.png|32px]]
| [[Creating a Classic Counter-Strike Map|Casual]] ''(default)''
| style="text-align:center;" | 0
| style="text-align:center;" | 0
| style="text-align:center;" | 0
| style="text-align:center;" | 0
Line 89: Line 93:
| 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]].
|-
|-
| [[File:Csgo icon competitive.png|32px]]
| [[Creating a Classic Counter-Strike Map|Competitive]]
| [[Creating a Classic Counter-Strike Map|Competitive]]
| style="text-align:center;" | 0
| style="text-align:center;" | 0
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| <code>competitive</code>
| <code>competitive, comp</code>
| 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 elimination, [[Creating a Bomb Defusal Map|bomb explosion, bomb defusal]], [[Creating a Hostage Rescue Map|hostage rescue]] and timeout.
|-
|-
| [[File:Csgo icon wingman.png|32px]]
| [[Creating_a_Wingman_Map|Wingman]]
| [[Creating_a_Wingman_Map|Wingman]]
| style="text-align:center;" | 0
| style="text-align:center;" | 0
Line 105: Line 111:
| 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.
|-
|-
|
| Weapon Expert
| Weapon Expert
| style="text-align:center;" | 0
| style="text-align:center;" | 0
Line 113: Line 120:
| 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.
|-
|-
| [[File:Csgo icon armsrace.png|32px]]
| [[Creating_a_Arsenal:_Arms_Race_Map|Arms Race]]
| [[Creating_a_Arsenal:_Arms_Race_Map|Arms Race]]
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| style="text-align:center;" | 0
| style="text-align:center;" | 0
| <code>armsrace,<br>gungameprogressive</code>
| <code>armsrace, arms,<br>gungame, gg,<br>gungameprogressive</code>
| 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.
|-
|-
| [[File:Csgo icon demolition.png|32px]]
| [[Creating_a_Arsenal:_Demolition_Map|Demolition]]
| [[Creating_a_Arsenal:_Demolition_Map|Demolition]]
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| <code>demolition,<br>gungametrbomb</code>
| <code>demolition, demo,<br>gungametrbomb</code>
| 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 his individual progress. Each player can progress one gun per round by making at least one kill.
|-
|-
| [[File:Csgo icon deathmatch.png|32px]]
| [[CS:GO Gamemodes: Deathmatch|Deathmatch]]
| [[CS:GO Gamemodes: Deathmatch|Deathmatch]]
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| style="text-align:center;" | 2
| style="text-align:center;" | 2
| <code>deathmatch</code>
| <code>deathmatch, dm</code>
| 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.
|-
|-
| [[File:Csgo icon training.png|32px]]
| Training
| Training
| style="text-align:center;" | 2
| style="text-align:center;" | 2
Line 145: Line 156:
| 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.
|-
|-
|
| [[CSGO_Custom_Game_Mode|Custom]]
| [[CSGO_Custom_Game_Mode|Custom]]
| style="text-align:center;" | 3
| style="text-align:center;" | 3
Line 153: Line 165:
| 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 executed with whitelist.
| 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 executed with whitelist.
|-
|-
| [[File:Csgo icon guardian.png|32px]]
| [[Creating_a_Guardian_Scenario_Map|Guardian]]
| [[Creating_a_Guardian_Scenario_Map|Guardian]]
| style="text-align:center;" | 4
| style="text-align:center;" | 4
| style="text-align:center;" | 0
| style="text-align:center;" | 0
| <code>guardian,<br>cooperative</code>
| <code>guardian, guard,<br>cooperative</code>
| 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.
|-
|-
| [[File:Csgo icon coopstrike.png|32px]]
| [[Creating_a_Co-op_Strike_Map|Co-op Strike]]
| [[Creating_a_Co-op_Strike_Map|Co-op Strike]]
| style="text-align:center;" | 4
| style="text-align:center;" | 4
Line 169: Line 183:
| 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.
|-
|-
| [[File:Csgo icon skirmish.png|32px]]
| Skirmish
| Skirmish
| style="text-align:center;" | 5
| style="text-align:center;" | 5
Line 177: Line 192:
| Like Undefined, see below.
| Like Undefined, see below.
|-
|-
| [[File:Csgo icon dangerzone.png|32px]]
| [[Creating_a_Danger_Zone_Map|Danger Zone]]
| [[Creating_a_Danger_Zone_Map|Danger Zone]]
| style="text-align:center;" | 6
| style="text-align:center;" | 6
Line 185: Line 201:
| 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.
|-
|-
| Undefined
|
| colspan="2" | <center>none of<br> the above</center>
| ''Map default''
| colspan="2" | <center>''see<br>description''</center>
| <code>default, auto</code>
| ''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>[[.kv|csgo/maps/<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).
|-
|
| ''Undefined''
| colspan="2" | <center>''none of<br>the above''</center>
| -
| -
| ?
| ?
Line 199: Line 224:
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 game mode, 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 game mode.
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 game mode, 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 game mode.


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 game mode, 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 game mode, see above.
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>
<br>
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.
Alternatively, it is possible in-game to execute the corresponding .cfg files manually and to restart 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.
 
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.


Example:
Example:
* To launch ''Stab Stab Zap'' on <code>de_dust2</code>, enter <code>sv_skirmish_id 1</code> and <code>map de_dust2 casual</code>. This is equivalent to <code>sv_skirmish_id 1; game_type 0; game_mode 0; map de_dust2</code>.
* To launch ''Stab Stab Zap'' on <code>de_dust2</code>, enter <code>sv_skirmish_id 1</code> and <code>map de_dust2 casual</code>. This is equivalent to <code>sv_skirmish_id 1; game_type 0; game_mode 0; map de_dust2</code>.
* To launch Competitive on <code>de_dust2</code> after having played a skirmish mode, enter <code>sv_skirmish_id 0</code> and <code>map de_dust2 competitive</code>. This is equivalent to <code>sv_skirmish_id 0; game_type 0; game_mode 1; map de_dust2</code>.
* To launch Competitive on <code>de_dust2</code> after having played a skirmish mode, enter <code>sv_skirmish_id 0</code> and <code>map de_dust2 comp</code>. This is equivalent to <code>sv_skirmish_id 0; game_type 0; game_mode 1; map de_dust2</code>.


{{note | The skirmish IDs 2, 5 and 9 are undefined. However, there are .cfg files in <code>cfg/</code> 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.}}
{{note | The skirmish IDs 2, 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. They probably were the modes for the skirmish IDs 2, 5 and 9.}}


{{note | The information of this table can be found in <code>csgo/scripts/items/items_game.txt</code>.}}
{{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%;"
!Game Mode
! colspan="2"| Game Mode
!sv_skirmish_id
! sv_skirmish_id
!Intended Base Game Mode
! Intended Base Game Mode
!.cfg filenames executed
! .cfg filenames executed
!Description
! Description
|-
|-
|
| Stab Stab Zap
| Stab Stab Zap
| 1
| 1
Line 224: Line 252:
| Only [[weapon_knife|knives]] and recharging [[weapon_taser|taser]].
| Only [[weapon_knife|knives]] and recharging [[weapon_taser|taser]].
|-
|-
| [[File:Csgo icon skirmish flyingscoutsman.png|32px]]
| Flying Scoutsman
| Flying Scoutsman
| 3
| 3
Line 230: Line 259:
| Only [[weapon_ssg08|scouts]] and [[weapon_knife|knives]], low gravity, high precision.
| Only [[weapon_ssg08|scouts]] and [[weapon_knife|knives]], low gravity, high precision.
|-
|-
|
| Trigger Discipline
| Trigger Discipline
| 4
| 4
Line 236: Line 266:
| 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 himself down to a minimum of 1 [[Health|HP]].
|-
|-
|
| Boom! Headshot!
| Boom! Headshot!
| 6
| 6
Line 242: Line 273:
| 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.
|-
|-
|
| Hunter-Gatherers
| Hunter-Gatherers
| 7
| 7
Line 248: Line 280:
| [[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.
| [[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
| 8
| 8
Line 254: Line 287:
| [[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. {{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.}}
|-
|-
| [[File:Csgo icon skirmish armsrace.png|32px]]
| Arms Race
| Arms Race
| 10
| 10
Line 260: Line 294:
| Equivalent to Arms Race.
| Equivalent to Arms Race.
|-
|-
|
| Demolition
| Demolition
| 11
| 11
Line 266: Line 301:
| Equivalent to Demolition.
| Equivalent to Demolition.
|-
|-
| [[File:Csgo icon skirmish retakes.png|32px]]
| [[CSGO_Game_Mode_-_Retakes|Retakes]]
| [[CSGO_Game_Mode_-_Retakes|Retakes]]
| 12
| 12
Line 272: Line 308:
| 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 %.}}
|-
|-
|
| Bloodletter
| Bloodletter
| -
| -
Line 278: Line 315:
| 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.
|-
|-
|
| Bounty Hunter
| Bounty Hunter
| -
| -
Line 284: Line 322:
| 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.
|-
|-
|
| [[CS:GO Gamemodes: Deathmatch#Team Mode|Team Deathmatch]]
| [[CS:GO Gamemodes: Deathmatch#Team Mode|Team Deathmatch]]
| -
| -

Revision as of 16:46, 18 September 2021

English (en)Deutsch (de)中文 (zh)Translate (Translate)
Counter-Strike: Global Offensive Level Creation

Here are tables of the game modes and the console commands to launch them in Template:Game name.

Loading a Map

To launch a map with a desired game mode,

  1. adjust the values of game_type, game_mode and sv_skirmish_id according to the tables below,
  2. load a map by using the map <mapname> or changelevel <mapname> console command.

When loading a map, the game will...

  1. set the whitelisted ConVars (the ones listed in csgo/bspconvar_whitelist.txt) to their default value,
  2. execute the .cfg files associated with the current values of game_type and game_mode (defined in csgo/gamemodes.txt and/or csgo/gamemodes_server.txt),
  3. execute the .cfg file associated with the current value of sv_skirmish_id (defined in csgo/scripts/items/items_game.txt under skirmish_modes).

If these values are not set before loading a map, the map launches in the last game mode played. The initial values of game_type, game_mode and sv_skirmish_id are 0 (Casual).

Tip.pngTip: The 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 game mode. See the map command optional parameter 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 the big table below.
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.

Game Type and Game Mode

Note.pngNote: Unless you want to load a Skirmish Mode, make sure sv_skirmish_id is (e.g.) 0.
Warning.pngRisk of Confusion: The 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 mp_warmup_start.
Note.pngNote: The information of these tables can be found in csgo/gamemodes.txt.
Defined pairs of values for game_type and game_mode
Game Type Game Mode
0 1 2 3
Classic 0 Csgo icon casual.png Casual Csgo icon competitive.png Competitive Csgo icon wingman.png Wingman Weapon Expert
Gun Game 1 Csgo icon armsrace.png Armsrace Csgo icon demolition.png Demolition Csgo icon deathmatch.png Deathmatch
Training 2 Csgo icon training.png Training
Custom 3 Custom
Cooperative 4 Csgo icon guardian.png Guardian Csgo icon coopstrike.png Co-op Strike
Skirmish 5 Csgo icon skirmish.png Skirmish
Free For All 6 Csgo icon dangerzone.png Danger Zone

About the following table:

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.
Tip.pngTip: 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: C++ The possible map command optional parameters can be found in the function GameTypes::GetGameTypeAndModeFromAlias defined in gametypes.cpp.
Game Mode type mode map command
optional parameters
max-
players
.cfg filenames executed, if existent Description
Csgo icon casual.png Casual (default) 0 0 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, 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 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.
Weapon Expert 0 3 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.
Csgo icon armsrace.png Arms Race 1 0 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 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 his individual progress. Each player can progress one gun per round by making at least one kill.
Csgo icon deathmatch.png Deathmatch 1 2 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 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 100 - Like Undefined, see below, but if sv_autoexec_mapname_cfg is not 0 (which however it its default value), the .cfg file csgo/maps/cfg/<mapname>.cfg is executed with whitelist.
Csgo icon guardian.png Guardian 4 0 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 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 Skirmish 5 0 skirmish 12 - Like Undefined, see below.
Csgo icon dangerzone.png Danger Zone 6 0 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.
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 csgo/maps/<mapname>.kv, csgo/gamemodes.txt (under maps/<mapname>/) or csgo/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).
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.


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 game mode, 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 game mode.

To play one of the following game modes, type sv_skirmish_id <number> in the console and launch a map with a base game mode, see above.
Alternatively, it is possible in-game to execute the corresponding .cfg files manually and to restart 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" game mode found in the above table, set sv_skirmish_id 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.

Example:

  • 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 2, 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. They probably were the modes for the skirmish IDs 2, 5 and 9.
Note.pngNote: The information of this table can be found in csgo/scripts/items/items_game.txt under skirmish_modes.
Game Mode sv_skirmish_id Intended Base Game Mode .cfg filenames executed Description
Stab Stab Zap 1 Casual op08_stab_stab_zap.cfg Only knives and recharging taser.
Csgo icon skirmish flyingscoutsman.png 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.
Obsolete-notext.pngDeprecated: The item is no longer accessible in the buy menu, but can still be bought with the command buy heavyarmor while not owning a rifle.
Csgo icon skirmish armsrace.png Arms Race 10 Arms Race - Equivalent to Arms Race.
Demolition 11 Demolition - Equivalent to Demolition.
Csgo icon skirmish retakes.png 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.
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.


Game Mode dependent Events

local nMode = ScriptGetGameMode();
local nType = ScriptGetGameType();

if (nType == 0 && nMode == 2)
{
  // code executed only in Wingman
}
else
{
  // code executed only in any other game mode
}

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.

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

These allow VScript structures such as the one on the right. 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.

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.