Zh/Counter-Strike: Global Offensive/Game Modes

以下是关于游戏模式和启动这些模式的控制台命令表 .
要以所需的游戏模式启动地图，请调整 s
* game_type,
* game_mode,
* sv_game_mode_flags and
* sv_skirmish_id
根据下表，使用 或 控制台命令加载地图.
{| class="standard-table"	游戏模式 	控制台指令
保留原规则 	map de_dust2 	
 	game_type 1; game_mode 2;sv_game_mode_flags 0;sv_skirmish_id 0;map de_dust2 	
 	game_type 0; game_mode 1;sv_game_mode_flags 32;sv_skirmish_id 0;map de_dust2	
 	game_type 0; game_mode 0;sv_game_mode_flags 0;sv_skirmish_id 3;map de_dust2 	
== 加载一张地图 ==
当你加载一张地图时，游戏将会...
# 设置 (列在) 到其默认值,
# 执行与当前game_type和game_mode值相关的文件 (列在 and ),
# 执行与sv_game_mode_flags当前值相关联的CFG文件, 请参阅below
# 执行与sv_skirmish_id当前值相关联的CFG文件 (列在 下的 skirmish_modes), 请参阅below.
如果在加载地图前没有设置这四个 ConVars,地图将以最后一种游戏模式启动.它们的初始值为 0（休闲）.
== 游戏类型与游戏模式 ==
与 是一种 这决定了下一个地图加载时的初始化方式, 包括 但不限于 文件, 用于设置控制游戏规则无数的的 ConVars，例如, , 等等.
除此以外，还有其他游戏规则或设置也会在当前比赛中检查 与 的值.例如，所有玩家的用户界面、被安装或拆除时发生的事件 是否会导致屏幕着色、玩家是否可以拾取武器 等实验性武器,
下表列出了所有可用的 游戏模式 的值以及他们对应的 和 , 他们的准确名称及别名 命令, 它们的最大 数, 在这种游戏模式下启动地图时执行的CFG文件，以及描述.
游戏模式 	游戏模式 	type 	mode 	内部名称 	地图 命令别名 	 	执行的CFG,如有 	描述
 	(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 and free /.
 	 	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.
 	 	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.
 	 	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.
 	 	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.
 	 	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.
 	 	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.
 	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.
 	 	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 is .
 	 	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.
 	 	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.
 	War Games 	5 	0 	skirmish 	skirmish 	12 	- 	Like Undefined, see below.
 	 	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.
 	Map default	seedescription 	seedescription 	- 	default, auto 	depends	depends 	This is not a game mode itself, rather a "redirect". The game picks and from the map's default_game_type and default_game_mode values, defined in either , (under maps/<mapname>/) or . 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 ofthe above	none ofthe above	- 	- 	? 	- 	No CFG file is executed, only the 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 sv_game_mode_flags is used for game mode variations. It can determine more 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
Valve currently uses this to implement game mode variations without touching sv_skirmish_id.
 Current usage of Game Mode Flags
Game Mode	Game Mode 	Flags Value	Flags Value 	Flags Value
Game Mode	Game Mode 	0 	4 	32
 	Competitive	default 	 	Short Match
 	Deathmatch 	default 	Team vs Team	Free For All
== Skirmish Modes ==
War Games are game mode variations.
The sv_skirmish_id determines the War Game that a map will be launched in. Each War Game can have 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 the intended game mode of a skirimsh CFG file (the ones in the table below) can be found in and also in the 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 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.
War Game	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 , recharging and grenades.
 	Free For All 	2 	dm_freeforall 	Deathmatch 	gamemode_dm_freeforall.cfg 	Like Deathmatch, but teammates are enemies.
 	Flying Scoutsman 	3 	flyingscoutsman 	Casual 	op08_flying_scoutsman.cfg 	Only and , low gravity, high precision.
 	Trigger Discipline	4 	triggerdiscipline	Casual 	op08_trigger_discipline.cfg 	Gunshots that a does not hit an enemy with damage theirselves down to a minimum of 1 .
 	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 : 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 	can be purchased for $6000.
 	Arms Race 	10 	armsrace 	Arms Race 	- 	Equivalent to #Arms Race.
 	Demolition 	11 	demolition 	Demolition 	- 	Equivalent to #Demolition.
 	 	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.
 	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 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 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 )
}
In , there are the specific VScript functions ScriptGetGameType() and ScriptGetGameMode() which return the current integer value of game_type and game_mode, respectively.
These allow VScript structures such as the one on the right; If this example code is executed, it will fire an 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 and by adding it to the of any entity in a map. See also: and .
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 work.