Zh/Counter-Strike: Global Offensive/Game Modes: Difference between revisions
(Created page with "{{Language subpage}} {{Toc-right}} 以下是关于{{csgo|3.1}}游戏模式和启动这些模式的控制台命令表 {{csgo|3.1}}. 要以所需的游戏模式启动地图,...") |
m (Multipage removal) |
||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{Subpage|[[Counter-Strike: Global Offensive Level Creation]]|[[Counter-Strike_2_Workshop_Tools/Level_Design|Counter-Strike 2 Workshop Tools - Level Design]]}} | |||
{{Delisted|csgo}} | |||
{{Toc-right}} | {{Toc-right}} | ||
以下是关于{{csgo|3.1}}游戏模式和启动这些模式的控制台命令表 {{csgo|3.1}}. | 以下是关于{{csgo|3.1}}游戏模式和启动这些模式的控制台命令表 {{csgo|3.1}}. | ||
要以所需的游戏模式启动地图,请调整 | 要以所需的游戏模式启动地图,请调整 {{L|ConVar}}s | ||
* <code>'''game_type'''</code>, | * <code>'''game_type'''</code>, | ||
Line 12: | Line 15: | ||
根据下表,使用 {{Command|map (console command)|<mapname>|alt = map}} 或 {{Command|changelevel|<mapname>}} 控制台命令加载地图. | 根据下表,使用 {{Command|map (console command)|<mapname>|alt = map}} 或 {{Command|changelevel|<mapname>}} 控制台命令加载地图. | ||
{{ModernConfusion| | {{ModernConfusion|在一些官方竞技模式和搭档模式中看到的{{L|Setting up 1v1 Warmup Arenas|1v1热身竞技}}中''''不''''使用自己的游戏模式。如果在地图中设置了热身竞技,则可以通过调用<code>mp_warmup_start</code>在官方竞技模式或搭档模式中启动地图来进行比赛.}} | ||
{| style="margin:auto" | {| style="margin:auto" | ||
Line 18: | Line 21: | ||
| | | | ||
{| class="standard-table" | {| class="standard-table" | ||
|+ | |+ 加载 "Dust2 "的快速示例 | ||
! | ! 游戏模式 | ||
! | ! 控制台指令 | ||
|- | |- | ||
| '' | | ''保留原规则'' | ||
| <tt>map de_dust2</tt> | | <tt>map de_dust2</tt> | ||
|- | |- | ||
| {{csgo mode|Dm}} | | {{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> | | <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| | | {{csgo mode|Comp|短时赛|link=}} | ||
| <tt>game_type 0; game_mode 1;<br>sv_game_mode_flags 32;<br>sv_skirmish_id 0;<br>map de_dust2</tt> | | <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| | | {{csgo mode|Fs|跳狙飞人}} | ||
| <tt>game_type 0; game_mode 0;<br>sv_game_mode_flags 0;<br>sv_skirmish_id 3;<br>map de_dust2</tt> | | <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" | {| class="standard-table" style="text-align:center" | ||
|+ | |+ 关于 <code>game_type</code> 和 <code>game_mode</code> 的定义值 | ||
!colspan="2" rowspan="2" | <tt>game_type</tt> | !colspan="2" rowspan="2" | <tt>game_type</tt> | ||
!colspan="4" | <tt>game_mode</tt> | !colspan="4" | <tt>game_mode</tt> | ||
Line 42: | Line 45: | ||
! 0 !! 1 !! 2 !! 3 | ! 0 !! 1 !! 2 !! 3 | ||
|- | |- | ||
! | ! 经典模式 !! style="width:3em" | 0 | ||
| {{csgo mode|Casual}} | | {{csgo mode|Casual|休闲模式}} | ||
| {{csgo mode|Competitive}} | | {{csgo mode|Competitive|竞技模式}} | ||
| {{csgo mode|Wingman}} | | {{csgo mode|Wingman|搭档模式}} | ||
| {{csgo mode|Weaponsexpert| | | {{csgo mode|Weaponsexpert|武器专家}} | ||
|- | |- | ||
! | ! 战争游戏模式 !! 1 | ||
| {{csgo mode|Armsrace}} | | {{csgo mode|Armsrace|军备竞赛}} | ||
| {{csgo mode|Demolition}} | | {{csgo mode|Demolition|爆破模式}} | ||
| {{csgo mode|Deathmatch}} | | {{csgo mode|Deathmatch|死亡竞赛}} | ||
|- | |- | ||
! | ! 训练 !! 2 | ||
| {{csgo mode|Training| | | {{csgo mode|Training|训练}} | ||
|- | |- | ||
! | ! 自定义 !! 3 | ||
| {{csgo mode|Custom}} | | {{csgo mode|Custom|自定义}} | ||
|- | |- | ||
! | ! 合作模式 !! 4 | ||
| {{csgo mode|Guardian}} | | {{csgo mode|Guardian|守护模式}} | ||
| {{csgo mode|Coop}} | | {{csgo mode|Coop|合作打击}} | ||
|- | |- | ||
! | ! 小规模 !! 5 | ||
| {{csgo mode|Skirmish| | | {{csgo mode|Skirmish|战争游戏模式}} | ||
|- | |- | ||
! Free For All !! 6 | ! Free For All !! 6 | ||
Line 72: | Line 75: | ||
| | | | ||
{| class="standard-table" | {| class="standard-table" | ||
|+ | |+ 有关 <code>sv_skirmish_id</code> 的值 | ||
!style=width:2em| ID | !style=width:2em| ID | ||
! | ! 战争游戏模式 | ||
! Game Mode | ! Game Mode | ||
|- | |- | ||
! 0 | ! 0 | ||
| '' | | ''无 (默认)'' | ||
|- | |- | ||
! 3 | ! 3 | ||
| {{csgo mode|Fs| | | {{csgo mode|Fs|跳狙飞人}} | ||
| | | 休闲模式 | ||
|- | |- | ||
! 10 | ! 10 | ||
| {{csgo mode|Ar}} | | {{csgo mode|Ar|军备竞赛}} | ||
| | | 军备竞赛 | ||
|- | |- | ||
! 11 | ! 11 | ||
| {{csgo mode|Demo}} | | {{csgo mode|Demo|爆破模式}} | ||
| | | 爆破模式 | ||
|- | |- | ||
! 12 | ! 12 | ||
| {{csgo mode|Retakes| | | {{csgo mode|Retakes|回防模式}} | ||
| | | 休闲 | ||
|} | |} | ||
{{For|details|[[#Skirmish Modes]]}} | {{For|details|[[#Skirmish Modes]]}} | ||
|} | |} | ||
== | == 加载一张地图 == | ||
当你加载一张地图时,游戏将会... | |||
# | # 设置 {{L|whitelistcmd|列入白名单的 ConVar}} (列在{{Path|csgo/bspconvar_whitelist.txt}}) 到其默认值, | ||
# | # 执行与当前<code>game_type</code>和<code>game_mode</code>值相关的{{L|CFG}}文件 (列在{{Path|csgo/{{L|gamemodes.txt}}}} and {{Path|csgo/gamemodes_server.txt}}), | ||
# | # 执行与<code>sv_game_mode_flags</code>当前值相关联的CFG文件, 请参阅[[#Game Mode Flags|below]] | ||
# | # 执行与<code>sv_skirmish_id</code>当前值相关联的CFG文件 (列在{{Path|csgo/scripts/items/items_game.txt}} 下的 <code>skirmish_modes</code>), 请参阅[[#Skirmish Modes|below]]. | ||
如果在加载地图前没有设置这四个 ConVars,地图将以最后一种游戏模式启动.它们的初始值为 0(休闲). | |||
{{ | {{tip|<code>map</code>命令和<code>changelevel</code>命令有一个可选的<code><game mode alias></code>参数.例如: {{Code|map de_dust2 deathmatch}} or {{Code|changelevel myCustomMap coop}}.如果给出了这样一个别名参数,并且该参数有效,游戏将调整<code>game_type</code>与<code>game_mode</code>并以相关的游戏模式启动地图.请参阅请参见下表中的''地图命令''别名列。}} | ||
{{ | {{tip|地图可以有一个默认游戏模式,可以用 {{Code|map <mapname> default}}或{{Code|map <mapname> auto}}. 请参阅[[#Map default]].}} | ||
{{ | {{tip|可以通过命令设置游戏启动项{{L|Command Line Options|Set Launch Options}}例如: {{Code|+game_type <number> +game_mode <number> +map <mapname>}}}} | ||
{{ | {{tip|你可以使用{{L|alias|别名}}来简化频繁的测试, 例如{{Code|alias MyMapRetake "game_type 0; game_mode 0; sv_skirmish_id 12; map MyMap"}}. 最适用于 {{L|autoexec}}s 可在正确的游戏模式下快速启动和测试自定义地图.}} | ||
{{note | |||
{{ | | 如果您想在经典游戏模式下使用{{L|bot}}s, 请确保{{Ent|bot_quota_mode}}没被设置为<code>competitive</code>, 因为这会导致它们停止运行. | ||
| | {{ModernIdea|你可以创建一个<code>gamemode_competitive_server.cfg</code> (见下文) 以自动设置 <code>bot_quota</code>和<code>bot_quota_mode</code>每当您在 竞技模式 中加载地图时,都会在本地服务器上安装机器人。.}} | ||
{{ModernIdea| | |||
}} | }} | ||
{{ | {{note|加载屏幕(和此页面上)上看到的游戏模式图标是从 {{Path|csgo/materials/panorama/images/icons/ui/<internal mode name>.svg}}. 如果 <code>sv_skirmish_id</code> 的值不为0,使用的是小规模战斗模式的内部名称。如果游戏中没有该文件,可以在该处放置自定义文件。}} | ||
== | == 游戏类型与游戏模式 == | ||
{{Code|game_type}} | {{Code|game_type}}与{{Code|game_mode}} 是一种 {{L|console variable|控制台变量}} 这决定了下一个地图加载时的初始化方式, 包括 {{L|exec}}但不限于 {{L|CFG}} 文件, 用于设置控制游戏规则无数的的 ConVars,例如{{Command|mp_roundtime}}, {{Command|mp_t_default_secondary}}, {{Command|sv_deadtalk}} 等等. | ||
除此以外,还有其他游戏规则或设置也会在当前比赛中检查 {{Code|game_type}} 与 {{Code|game_mode}} 的值.例如,所有玩家的用户界面、{{Ent|weapon_c4}}被安装或拆除时发生的事件 {{Ent|item_heavyassaultsuit}} 是否会导致屏幕着色、玩家是否可以拾取武器 {{Ent|weapon_axe}}等实验性武器, | |||
下表列出了所有可用的 ''游戏模式'' 的值以及他们对应的 {{Code|game_type}} 和 {{Code|game_mode}}, 他们的准确名称及别名 {{Command|map (console command)|alt = 地图}} 命令, 它们的最大 {{L|player|玩家}}数, 在这种''游戏模式''下启动地图时执行的CFG文件,以及描述. | |||
{{Note | {{Note | ||
| | | 以{{Code|_offline.cfg|preset=1}} 结尾的 CFG 文件只有在服务器通过主菜单中的 ''Practice with Bots'' 启动时才会被执行。Valve 使用它们在离线竞技中启用机器人,因为机器人在竞技中已被默认禁用, 请参阅 {{Ent|bot_quota}}. <br /> 默认情况下,本地不存在以 {{Code|_server.cfg|preset=1}} 结尾的 CFG 文件。您可以创建这些文件,并在其中写入命令,这些命令将在每次本地启动相应游戏模式时执行。 | ||
}} | }} | ||
{{Note| | {{Note|在没有调整的情况, {{L|maxplayers}} 是对服务器上{{L|player}}s和机器人数量的硬性限制。.}} | ||
{{Note | {{Note | ||
| | | 关于这些表格的信息请参阅 {{Path|csgo/{{L|gamemodes.txt}}}}. <br /> {{cpp}} 可以在参数中找到可能的''map command aliases'' {{Code|GameTypes::GetGameTypeAndModeFromAlias}} 列在 {{Code|gametypes.cpp|preset=1}}. | ||
}} | }} | ||
{| class="standard-table mw-collapsible" width="100%" | {| class="standard-table mw-collapsible" width="100%" | ||
|- style="position:sticky; top:0" | |- style="position:sticky; top:0" | ||
! colspan="2" | | ! colspan="2" | 游戏模式 | ||
! width="3em" | <tt>type</tt> | ! width="3em" | <tt>type</tt> | ||
! width="3em" | <tt>mode</tt> | ! width="3em" | <tt>mode</tt> | ||
! | ! 内部名称 | ||
! style="white-space:nowrap" | <tt> | ! style="white-space:nowrap" | <tt>地图</tt> 命令<br>别名 | ||
! | ! {{L|maxplayers|最大玩家数}} | ||
! | ! 执行的CFG,如有 | ||
! | ! 描述 | ||
|- id="Casual" | |- id="Casual" | ||
| [[File:Csgo icon casual.png|32px]] | | [[File:Csgo icon casual.png|32px]] | ||
| | | {{L|Creating a Classic Counter-Strike Map|Casual}} ''(default)'' | ||
| <center>0</center> | | <center>0</center> | ||
| <center>0</center> | | <center>0</center> | ||
Line 161: | Line 162: | ||
| 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 | | Like Competitive but with fewer rounds, shorter freezetime per round, no friendly fire, no team collision, free {{L|item_assaultsuit|armor}} and free {{L|item_defuser|defuse kit}}/{{L|item_cutters|cutters}}. | ||
|- id="Competitive" | |- id="Competitive" | ||
| [[File:Csgo icon competitive.png|32px]] | | [[File:Csgo icon competitive.png|32px]] | ||
| | | {{L|Creating a Classic Counter-Strike Map|Competitive}} | ||
| <center>0</center> | | <center>0</center> | ||
| <center>1</center> | | <center>1</center> | ||
Line 174: | Line 175: | ||
|- id="Wingman" | |- id="Wingman" | ||
| [[File:Csgo icon wingman.png|32px]] | | [[File:Csgo icon wingman.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Wingman|Wingman}} | ||
| <center>0</center> | | <center>0</center> | ||
| <center>2</center> | | <center>2</center> | ||
Line 184: | Line 185: | ||
|- id="Weapons Expert" | |- id="Weapons Expert" | ||
| | | | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Weapons Expert|Weapons Expert}} | ||
| <center>0</center> | | <center>0</center> | ||
| <center>3</center> | | <center>3</center> | ||
Line 194: | Line 195: | ||
|- id="Arms Race" | |- id="Arms Race" | ||
| [[File:Csgo icon armsrace.png|32px]] | | [[File:Csgo icon armsrace.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Arms Race|Arms Race}} | ||
| <center>1</center> | | <center>1</center> | ||
| <center>0</center> | | <center>0</center> | ||
Line 204: | Line 205: | ||
|- id="Demolition" | |- id="Demolition" | ||
| [[File:Csgo icon demolition.png|32px]] | | [[File:Csgo icon demolition.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Demolition|Demolition}} | ||
| <center>1</center> | | <center>1</center> | ||
| <center>1</center> | | <center>1</center> | ||
Line 214: | Line 215: | ||
|- id="Deathmatch" | |- id="Deathmatch" | ||
| [[File:Csgo icon deathmatch.png|32px]] | | [[File:Csgo icon deathmatch.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Deathmatch|Deathmatch}} | ||
| <center>1</center> | | <center>1</center> | ||
| <center>2</center> | | <center>2</center> | ||
Line 234: | Line 235: | ||
|- id="Custom" | |- id="Custom" | ||
| | | | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Custom|Custom}} | ||
| <center>3</center> | | <center>3</center> | ||
| <center>0</center> | | <center>0</center> | ||
Line 241: | Line 242: | ||
| 100 | | 100 | ||
| gamemode_custom.cfg, <br> gamemode_custom_server.cfg | | gamemode_custom.cfg, <br> 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.<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}} is | | 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}} is {{L|execwithwhitelist|executed with whitelist}}. | ||
|- id="Guardian" | |- id="Guardian" | ||
| [[File:Csgo icon guardian.png|32px]] | | [[File:Csgo icon guardian.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Guardian|Guardian}} | ||
| <center>4</center> | | <center>4</center> | ||
| <center>0</center> | | <center>0</center> | ||
Line 254: | Line 255: | ||
|- id="Co-op Strike" | |- id="Co-op Strike" | ||
| [[File:Csgo icon coopstrike.png|32px]] | | [[File:Csgo icon coopstrike.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Co-op Strike|Co-op Strike}} | ||
| <center>4</center> | | <center>4</center> | ||
| <center>1</center> | | <center>1</center> | ||
Line 274: | Line 275: | ||
|- id="Danger Zone" | |- id="Danger Zone" | ||
| [[File:Csgo icon dangerzone.png|32px]] | | [[File:Csgo icon dangerzone.png|32px]] | ||
| | | {{L|Counter-Strike: Global Offensive/Game Modes/Danger Zone|Danger Zone}} | ||
| <center>6</center> | | <center>6</center> | ||
| <center>0</center> | | <center>0</center> | ||
Line 290: | Line 291: | ||
| ''depends'' | | ''depends'' | ||
| ''depends'' | | ''depends'' | ||
| 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/ | | 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/{{L|.kv|<mapname>.kv}}}}, {{Path|csgo/{{L|gamemodes.txt}}}} (under <code>maps/<mapname>/</code>) or {{Path|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). | ||
{{ModernExample| | {{ModernExample| | ||
* Invoking <code>map de_dust2 auto</code> launches ''Dust II'' in Casual.<br> | * Invoking <code>map de_dust2 auto</code> launches ''Dust II'' in Casual.<br> | ||
Line 302: | Line 303: | ||
| ? | | ? | ||
| - | | - | ||
| No CFG file is executed, only the | | No CFG file is executed, only the {{L|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 == | ||
The | The {{L|ConVar}} <code>'''sv_game_mode_flags'''</code> is used for game mode variations. It can determine more {{L|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. | Its value is read bitwise, meaning that adding values of the following table together results in all associated CFG files being executed. | ||
Line 318: | Line 319: | ||
| 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|A <code>_short</code> CFG is executed before a <code>_tmm</code> CFG.}} | ||
{{ModernExample| | {{ModernExample| | ||
Line 355: | Line 356: | ||
'''War Games''' are game mode variations. | '''War Games''' are game mode variations. | ||
The | The {{L|ConVar}} <code>'''sv_skirmish_id'''</code> determines the War Game that a map will be launched in. Each War Game can have {{L|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 {{Path|csgo/scripts/items/items_game.txt}} and also in the CFG file itself. | ||
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. | 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 | Alternatively, one could also do <code>exec <cfg filename></code> and <code>mp_restartgame 1</code> in-game or even write own {{L|CFG|configs}} for that matter. | ||
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. | 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. | ||
Line 368: | Line 369: | ||
}} | }} | ||
{{ | {{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 {{Path|csgo/scripts/items/items_game.txt}} under <code>skirmish_modes</code>.}} | ||
{| class="standard-table mw-collapsible" style="width:100%;" | {| class="standard-table mw-collapsible" style="width:100%;" | ||
Line 394: | Line 395: | ||
| Casual | | Casual | ||
| op08_stab_stab_zap.cfg | | op08_stab_stab_zap.cfg | ||
| Only | | Only {{L|weapon_knife|knives}}, recharging {{L|weapon_taser|taser}} and grenades. | ||
|- id="Free For All" | |- id="Free For All" | ||
| | | | ||
Line 402: | Line 403: | ||
| Deathmatch | | Deathmatch | ||
| gamemode_dm_freeforall.cfg | | gamemode_dm_freeforall.cfg | ||
| Like Deathmatch, but teammates are enemies. {{ | | Like Deathmatch, but teammates are enemies. {{note|The official FFA Deathmatch mode is not this skirmish mode, see [[#Game Mode Flags]].}} | ||
|- id="Flying Scoutsman" | |- id="Flying Scoutsman" | ||
| [[File:Csgo icon skirmish flyingscoutsman.png|32px]] | | [[File:Csgo icon skirmish flyingscoutsman.png|32px]] | ||
Line 410: | Line 411: | ||
| Casual | | Casual | ||
| op08_flying_scoutsman.cfg | | op08_flying_scoutsman.cfg | ||
| Only | | Only {{L|weapon_ssg08|scouts}} and {{L|weapon_knife|knives}}, low gravity, high precision. | ||
|- id="Trigger Discipline" | |- id="Trigger Discipline" | ||
| | | | ||
Line 418: | Line 419: | ||
| Casual | | Casual | ||
| op08_trigger_discipline.cfg | | op08_trigger_discipline.cfg | ||
| Gunshots that a | | Gunshots that a {{L|player}} does not hit an enemy with damage theirselves down to a minimum of 1 {{L|Health|HP}}. | ||
|- id="Boom! Headshot!" | |- id="Boom! Headshot!" | ||
| | | | ||
Line 434: | Line 435: | ||
| Deathmatch | | Deathmatch | ||
| op08_hunter_gatherers.cfg | | op08_hunter_gatherers.cfg | ||
| [[Counter-Strike: Global Offensive/Game Modes/Deathmatch#Team Mode|Team deathmatch]] with collecting | | [[Counter-Strike: Global Offensive/Game Modes/Deathmatch#Team Mode|Team deathmatch]] with collecting {{L|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" | |- id="Heavy Assault Suit" | ||
| | | | ||
Line 442: | Line 443: | ||
| Casual | | Casual | ||
| op08_heavy_assault_suit.cfg | | op08_heavy_assault_suit.cfg | ||
| | | {{L|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>{{L|buy}} heavyarmor</code>, rendering this skirmish mode useless.}} | ||
|- id="Arms Race Skirmish" | |- id="Arms Race Skirmish" | ||
| [[File:Csgo icon skirmish armsrace.png|32px]] | | [[File:Csgo icon skirmish armsrace.png|32px]] | ||
Line 461: | Line 462: | ||
|- id="Retakes" | |- id="Retakes" | ||
| [[File:Csgo icon skirmish retakes.png|32px]] | | [[File:Csgo icon skirmish retakes.png|32px]] | ||
| | | {{L|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. {{ | | 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" | |- id="Bloodletter" | ||
| | | | ||
Line 482: | Line 483: | ||
| Deathmatch | | Deathmatch | ||
| op08_bounty_hunter.cfg | | op08_bounty_hunter.cfg | ||
| All players are enemies, killed enemies will drop | | All players are enemies, killed enemies will drop {{L|item_dogtags|dogtags}} that anyone can pick up. Killing players awards less points. Collecting dogtags awards additional Deathmatch points. | ||
|- id="Team Deathmatch" | |- id="Team Deathmatch" | ||
| | | | ||
Line 490: | Line 491: | ||
| Deathmatch | | Deathmatch | ||
| op08_team_deathmatch.cfg | | op08_team_deathmatch.cfg | ||
| 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. {{ | | 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]].}} | ||
|} | |} | ||
Line 510: | Line 511: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{ | {{note|The variable names <code>nType, nMode</code> are arbitrary.}} | ||
|} | |} | ||
In | In {{L|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>.}} | ||
These allow VScript structures such as the one on the right; If this example code is executed, it will fire an | These allow VScript structures such as the one on the right; If this example code is executed, it will fire an {{L|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 {{L|Entity Scripts}} of any entity in a map. See also: {{L|VScript Fundamentals}} and {{sq}} {{L|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 {{csgo mode|Coop}} work. | 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. | ||
Line 520: | Line 521: | ||
{{ModernExample|The script {{Path|csgo/scripts/vscripts/2v2/2v2_enable.nut}} provided by Valve is commonly used to shift player spawn points and activate blockers in {{csgo mode|Wingman}}.}} | {{ModernExample|The script {{Path|csgo/scripts/vscripts/2v2/2v2_enable.nut}} provided by Valve is commonly used to shift player spawn points and activate blockers in {{csgo mode|Wingman}}.}} | ||
{{ModernIdea|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.}} | {{ModernIdea|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}} | {{clr}}{{cs2-navbox}} | ||
{{csgo-navbox}} | |||
{{Cs2 topicon}}{{Csgo topicon}} |
Latest revision as of 05:47, 12 July 2024


在此介绍,供历史和技术参考
以下是关于反恐精英:全球攻势游戏模式和启动这些模式的控制台命令表 反恐精英:全球攻势. 要以所需的游戏模式启动地图,请调整 ConVar s
game_type
,game_mode
,sv_game_mode_flags
andsv_skirmish_id
根据下表,使用 map <mapname> 或 changelevel <mapname> 控制台命令加载地图.

mp_warmup_start
在官方竞技模式或搭档模式中启动地图来进行比赛.
|
关于 details, 见 #Game Type and Game Mode.
|
关于 details, 见 #Skirmish Modes.
|
加载一张地图
当你加载一张地图时,游戏将会...
- 设置 列入白名单的 ConVar (列在
csgo/bspconvar_whitelist.txt
) 到其默认值, - 执行与当前
game_type
和game_mode
值相关的CFG 文件 (列在csgo/gamemodes.txt
andcsgo/gamemodes_server.txt
), - 执行与
sv_game_mode_flags
当前值相关联的CFG文件, 请参阅below - 执行与
sv_skirmish_id
当前值相关联的CFG文件 (列在csgo/scripts/items/items_game.txt
下的skirmish_modes
), 请参阅below.
如果在加载地图前没有设置这四个 ConVars,地图将以最后一种游戏模式启动.它们的初始值为 0(休闲).

map
命令和changelevel
命令有一个可选的<game mode alias>
参数.例如: map de_dust2 deathmatch or changelevel myCustomMap coop.如果给出了这样一个别名参数,并且该参数有效,游戏将调整game_type
与game_mode
并以相关的游戏模式启动地图.请参阅请参见下表中的地图命令别名列。



competitive
, 因为这会导致它们停止运行.

gamemode_competitive_server.cfg
(见下文) 以自动设置 bot_quota
和bot_quota_mode
每当您在 竞技模式 中加载地图时,都会在本地服务器上安装机器人。.

csgo/materials/panorama/images/icons/ui/<internal mode name>.svg
. 如果 sv_skirmish_id
的值不为0,使用的是小规模战斗模式的内部名称。如果游戏中没有该文件,可以在该处放置自定义文件。游戏类型与游戏模式
game_type与game_mode 是一种 控制台变量 这决定了下一个地图加载时的初始化方式, 包括 exec 但不限于 CFG 文件, 用于设置控制游戏规则无数的的 ConVars,例如mp_roundtime, mp_t_default_secondary, sv_deadtalk 等等.
除此以外,还有其他游戏规则或设置也会在当前比赛中检查 game_type 与 game_mode 的值.例如,所有玩家的用户界面、weapon_c4被安装或拆除时发生的事件 item_heavyassaultsuit 是否会导致屏幕着色、玩家是否可以拾取武器 weapon_axe等实验性武器,
下表列出了所有可用的 游戏模式 的值以及他们对应的 game_type 和 game_mode, 他们的准确名称及别名 地图 命令, 它们的最大 玩家 数, 在这种游戏模式下启动地图时执行的CFG文件,以及描述.

默认情况下,本地不存在以 _server.cfg 结尾的 CFG 文件。您可以创建这些文件,并在其中写入命令,这些命令将在每次本地启动相应游戏模式时执行。



csgo/gamemodes.txt
. 
游戏模式 | type | mode | 内部名称 | 地图 命令 别名 |
最大玩家数 | 执行的CFG,如有 | 描述 | |
---|---|---|---|---|---|---|---|---|
![]() |
Casual (default) | 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 . | ||
![]() |
Competitive | 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. | ||
![]() |
Wingman | 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 | 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. | |||
![]() |
Arms Race | 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. | ||
![]() |
Demolition | 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. | ||
![]() |
Deathmatch | 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 | 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 | 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 ![]() csgo/maps/cfg/<mapname>.cfg is executed with whitelist .
| |||
![]() |
Guardian | 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. | ||
![]() |
Co-op Strike | 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 | skirmish | skirmish | 12 | - | Like Undefined, see below. ![]() | ||
![]() |
Danger Zone | 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 | 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 | 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.
Value | CFG file executed, if existent |
---|---|
4 | gamemode_<internal game mode name>_tmm.cfg
|
32 | gamemode_<internal game mode name>_short.cfg
|


_short
CFG is executed before a _tmm
CFG.
- 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
andgamemode_scrimcomp2v2_tmm.cfg
, in this order.
Valve currently uses this to implement game mode variations without touching sv_skirmish_id
.
Game Mode | Flags Value | |||
---|---|---|---|---|
0 | 4 | 32 | ||
![]() |
Competitive | default | Short Match | |
![]() |
Deathmatch | default | Team vs Team | Free For All |

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 the intended game mode of a skirimsh CFG file (the ones in the table below) can be found in csgo/scripts/items/items_game.txt
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 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.

- To launch Stab Stab Zap on
de_dust2
, entersv_skirmish_id 1
andmap de_dust2 casual
. This is equivalent tosv_skirmish_id 1; game_type 0; game_mode 0; map de_dust2
. - To launch Competitive on
de_dust2
after having played a skirmish mode, entersv_skirmish_id 0
andmap de_dust2 comp
. This is equivalent tosv_skirmish_id 0; game_type 0; game_mode 1; map de_dust2
.


csgo/cfg/
that have no associated skirmish ID. They are mentioned at the end of the following table.

csgo/scripts/items/items_game.txt
under skirmish_modes
.War Game | skirmish _id |
Internal Name | Intended Game Mode | CFG filenames executed with whitelist | Description | |
---|---|---|---|---|---|---|
None (default) | - | - | - | No Skirmish Mode, i.e. the game mode defined by game_type and game_mode .
| ||
Stab Stab Zap | stabstabzap
|
Casual | op08_stab_stab_zap.cfg | Only knives , recharging taser and grenades. | ||
Free For All | dm_freeforall
|
Deathmatch | gamemode_dm_freeforall.cfg | Like Deathmatch, but teammates are enemies. ![]() | ||
![]() |
Flying Scoutsman | flyingscoutsman
|
Casual | op08_flying_scoutsman.cfg | Only scouts and knives , low gravity, high precision. | |
Trigger Discipline | 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! | headshots
|
Deathmatch | op08_headshots.cfg | Helmets are disabled and bodyshots deal no damage, causing a small spark effect instead of blood. | ||
Hunter-Gatherers | 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 | heavyassaultsuit
|
Casual | op08_heavy_assault_suit.cfg | Heavy armor can be purchased for $6000. ![]() buy heavyarmor , rendering this skirmish mode useless. | ||
![]() |
Arms Race | armsrace
|
Arms Race | - | Equivalent to #Arms Race. | |
Demolition | demolition
|
Demolition | - | Equivalent to #Demolition. | ||
![]() |
Retakes | 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 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 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 )
}
![]() nType, nMode are arbitrary. |
In VScript , there are the specific VScript functions
ScriptGetGameType()
and ScriptGetGameMode()
which return the current integer value of game_type
and game_mode
, respectively.

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


csgo/scripts/vscripts/2v2/2v2_enable.nut
provided by Valve is commonly used to shift player spawn points and activate blockers in 

|
|