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

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Nesciuse moved page Counter-Strike: Global Offensive/Game Modes/Arms Race/en to Counter-Strike: Global Offensive/Game Modes/Arms Race without leaving a redirect: Move en subpage to basepage)
 
(23 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Arms Race maps are relatively simple to set up since they are usually small and don't require a lot of working with gameplay entities.
{{LanguageBar}}
{{back|Counter-Strike: Global Offensive Level Creation}}{{Delisted|csgo}}
<noinclude></noinclude>
[[File:Csgo icon armsrace.png|left|link=]]
[[File:Csgo icon skirmish armsrace.png|left|link=]]


'''Arms Race''' (internally: <code>'''gungameprogressive'''</code>) is a [[game mode]] in {{csgo|3.1}}.


== Spawn points ==
A map can be launched in this game mode by invoking the console commands <code>game_type 1; game_mode 0; map <mapname></code>, or shorter: <code>map <mapname> gg</code>. See [[Counter-Strike:_Global_Offensive/Game Modes]] for details and tips.


For any map to function properly, you need to place spawnpoint entities in the game world. The [[info_player_terrorist]] and [[info_player_counterterrorist]] entities are used to mark where players spawn. You want at least 32 total player spawns for the majority of servers to run your map.
On official servers, Arms Race is played as a skirmish game mode, meaning that additionally, {{ent|sv_skirmish_id|10}} is set, too. This has the side effect that the game mode icon seen in the loading screen has a shield and that the map voting process at the end of the game also "offers" a different [[CS:GO Game Modes#Skirmish Modes|war game]].
{{clr}}


Since Arms Race maps use deathmatch-style spawn mechanics, the placement of spawn points doesn't matter much; however, to keep your map simple and easy to understand, you'll probably want to cluster the spawn points together in areas, usually one for each team.
== Game Mode Description ==
Officially, this game mode plays as follows:
* The game is a single extended round with instant respawn.
* Players start with a weapon and progress to different weapons as they get kills. When a map loads, the game generates a random weapon progression, consisting of 2 sniper rifles, 3 rifles, 1 machine gun, 3 SMGs, 4 pistols, 2 shotguns and the [[weapon_knifegg|Golden Knife]], in this order.
* Killing a player with the knife steals a progression: The killer progresses, the killed loses a progression (assuming they are not at the first weapon).
* The leading player of a team is highlighted to other players and killing them grants an instant progression.
* The first player to get a kill with the golden knife wins the match.


== Enabling the gamemode ==
== Map Requirements ==
The only required entities for a map to work in Arms Race are spawn points for each team.


Arms Race is a server-side setting toggled by setting the "game_type" command to 1. To properly test your Arms Race map, include "+game_type=1" in the launch options before compiling and running the map.
=== Spawn points ===
Arms Race uses the normal [[info_player_counterterrorist|info_player_(counter)terrorist]] as well as the [[info_armsrace_counterterrorist|info_armsrace_(counter)terrorist]] entities as player spawns. The spawn priorities of all of these are ignored in Arms Race, so a terrorist will always spawn at a randomly chosen spawnpoint from all existing [[info_player_terrorist]]s and [[info_armsrace_terrorist]]s.{{confirm}}


{{tip|You should aim to include at least 16 spawn points for each team, so your map will run smoothly with up to 32 players on a server.}}
{{ModernPlacementTip|Since Arms Race maps use deathmatch-style spawn mechanics, the placement of spawn points doesn't matter much; however, to keep your map simple and easy to understand, you'll probably want to cluster the spawn points together in areas, usually one for each team.}}
{{tip|To have spawn points where both CTs and Ts can spawn, place one of both Arms Race spawn entities inside each other. Players will not spawn inside each other as long as there are enough of these "dual" spawn points.}}
To use the same spawn points like in {{csgo mode|Dm}}, one could...
* select all [[info_deathmatch_spawn]] entities (e.g. using [[Entity Report]]), copy and paste them in the same spot (e.g. {{key|shift|right}} and then {{key|left}}), change the class to info_armsrace_terrorist and do the same again for info_armsrace_counterterrorist. Also, you might want to disable the default spawns, see [[#Disabling Default Spawns using VScript|below]].<br>
* execute the [[VScript]] code <code>SendToConsoleServer("[[mp_randomspawn]] 1; mp_randomspawn_los 1")</code> if the current game mode is Arms Race, which might not require a map recompile.
== Modifying Gameplay ==
=== Weapon Progressions ===
{| class=standard-table
! ConVar !! Default !! Description
|-
| <code>mp_ggprogressive_use_random_weapons</code>
| 1
|
*0: The game uses a progression defined in <code>csgo/[[gamemodes.txt]]</code> or <code>csgo/gamemodes_server.txt</code>.
*1: The game generates a random weapon progression, see [[#Game Mode Description|above]].
|-
| <code>mp_ggprogressive_random_weapon_kills_needed</code>
| 2
| If <code>mp_ggprogressive_use_random_weapons</code> is set to 1, this determines the number of kills that a [[player]] must make with a weapon to progress to the next (except for the Golden Knife, which requires one kill).
|-
| <code>sv_ggprogressive_autosniper_first</code>
| 1
|
*0: In random progressions, either the [[weapon_g3sg1|G3SG1]] or the [[weapon_scar20|Scar-20]] is the first weapon.
*1: In random progressions, any sniper rifle is the first weapon.
|-
| <code>sv_ggprogressive_shotgun_last</code>
| 1
|
*0: In random progressions, shotguns follow after the [[weapon_deagle|Desert Eagle]]/[[weapon_revolver|R8 Revolver]], before the other pistols.
*1: In random progressions, shotguns are the last weapon group.
|}
To play with a custom weapon progression, it is suggested to define it in the file <code>csgo/gamemodes_server.txt</code>, then set <code>mp_ggprogressive_use_random_weapons</code> to 0 and launch a map in this game mode, see above.
The file <code>csgo/gamemodes_server.txt</code> could look like this:
{{Expand|
<pre style="background-color:#444; border-color:#666; color:#ddd; margin:0">
"GameModes_Server.txt"
{
"gameTypes"
{
// ...
"gungame"
{
"gameModes"
{
"gungameprogressive"
{
// ...
"weaponprogression_ct"
{
"ak47" { "kills" "3" }
"awp" { "kills" "3" }
"knifegg" { "kills" "1" }
}
"weaponprogression_t"
{
"ak47" { "kills" "3" }
"awp" { "kills" "3" }
"knifegg" { "kills" "1" }
}
}
// ...
}
}
// ...
}
// ...
}
</pre>
}}
{{note|This is just the necessary part of the file. The expressions <code>// ...</code> should indicate that there can be much more in it.}}
{{note|See [[:Category:Counter-Strike: Global Offensive Weapons|Counter-Strike: Global Offensive Weapons]] for a list of weapons. For this, omit the <code>weapon_</code> prefix.}}
=== Related ConVars ===
{| class=standard-table
! ConVar !! Default !! Description
|-
| <code>mp_ggprogressive_healthshot_killcount</code>
| 3
| Grant [[weapon_healthshot|healthshot]]s in Arms Race after this number of kills.
|-
| <code>mp_ggprogressive_round_restart_delay</code>
| 15
| Number of seconds to delay before restarting a round after a win in Arms Race. {{note|This is overriden by <code>mp_match_restart_delay</code>.}}
|}
=== Disabling Default Spawns using VScript ===
<source lang=cpp style="float:right; background:none">
TYPE <- ScriptGetGameType()
MODE <- ScriptGetGameMode()
if (TYPE == 1 && MODE == 0) // Arms Race uses game_type == 1 and game_mode == 0
{
EntFire("info_player_terrorist", "SetDisabled")
EntFire("info_player_counterterrorist", "SetDisabled")
}
else
{
EntFire("info_player_terrorist", "SetEnabled")
EntFire("info_player_counterterrorist", "SetEnabled")
}
</source>
If you want to use the [[info_armsrace_terrorist]] and [[info_armsrace_counterterrorist]] spawns exclusively, the info_player_terrorist and info_player_counterterrorist entities must be disabled, unless there are none. One way to do this '''''only for Arms Race''''' is writing a [[VScript]] such as the one on the right.
* Create a text file with the content shown on the right. Save it at <code>csgo/scripts/vscripts/</code> or in a subfolder from there as a <code>.nut</code> file.
* In [[Hammer]], create a [[logic_script]] and add this file to its <code>Entity Scripts</code>.
* In-game, check the console when running the map to see if something goes wrong. If [[Both Teams are Full error|a team is full]], there are most likely no valid spawn points for that team.
* When publishing the map, this script must also be packed (see e.g. [[VIDE]]).
=== Bots ===
The current {{csgo mode|Dm}} [[bot]]s can be used in Arms Race, but need a slight modification. When they spawn, they are programmed to buy a weapon and because they can't buy in Arms Race, they get stuck "buying". To overcome this, one could copy and paste <code>csgo/scripts/ai/deathmatch/bt_default.kv3</code>, rename it and remove these lines:
{{pre|
{
type {{=}} "action_buy"
},
}}
</pre>
In-game, by setting {{ent|mp_bot_ai_bt|"scripts/ai/deathmatch/<new filename>.kv3"}}, all bots will then use this modified [[CS:GO Bot Behavior Trees|behavior tree]] without getting stuck.{{csgo-navbox}}
[[Category:Counter-Strike: Global Offensive]]
[[Category:Counter-Strike: Global Offensive]]
[[Category:Level Design Tutorials]]
[[Category:Level_Design]]

Latest revision as of 05:45, 12 July 2024

English (en)中文 (zh)Translate (Translate)
Counter-Strike: Global Offensive Level Creation
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.
Csgo icon armsrace.png
Csgo icon skirmish armsrace.png

Arms Race (internally: gungameprogressive) is a game mode in Counter-Strike: Global Offensive.

A map can be launched in this game mode by invoking the console commands game_type 1; game_mode 0; map <mapname>, or shorter: map <mapname> gg. See Counter-Strike:_Global_Offensive/Game Modes for details and tips.

On official servers, Arms Race is played as a skirmish game mode, meaning that additionally, sv_skirmish_id 10 is set, too. This has the side effect that the game mode icon seen in the loading screen has a shield and that the map voting process at the end of the game also "offers" a different war game.

Game Mode Description

Officially, this game mode plays as follows:

  • The game is a single extended round with instant respawn.
  • Players start with a weapon and progress to different weapons as they get kills. When a map loads, the game generates a random weapon progression, consisting of 2 sniper rifles, 3 rifles, 1 machine gun, 3 SMGs, 4 pistols, 2 shotguns and the Golden Knife, in this order.
  • Killing a player with the knife steals a progression: The killer progresses, the killed loses a progression (assuming they are not at the first weapon).
  • The leading player of a team is highlighted to other players and killing them grants an instant progression.
  • The first player to get a kill with the golden knife wins the match.

Map Requirements

The only required entities for a map to work in Arms Race are spawn points for each team.

Spawn points

Arms Race uses the normal info_player_(counter)terrorist as well as the info_armsrace_(counter)terrorist entities as player spawns. The spawn priorities of all of these are ignored in Arms Race, so a terrorist will always spawn at a randomly chosen spawnpoint from all existing info_player_terrorists and info_armsrace_terrorists.[confirm]

Tip.pngTip:You should aim to include at least 16 spawn points for each team, so your map will run smoothly with up to 32 players on a server.
PlacementTip.gifPlacement Tip:Since Arms Race maps use deathmatch-style spawn mechanics, the placement of spawn points doesn't matter much; however, to keep your map simple and easy to understand, you'll probably want to cluster the spawn points together in areas, usually one for each team.
Tip.pngTip:To have spawn points where both CTs and Ts can spawn, place one of both Arms Race spawn entities inside each other. Players will not spawn inside each other as long as there are enough of these "dual" spawn points.

To use the same spawn points like in CS:GO/CS2 Deathmatch Deathmatch, one could...

  • select all info_deathmatch_spawn entities (e.g. using Entity Report), copy and paste them in the same spot (e.g. Shift+ and then ), change the class to info_armsrace_terrorist and do the same again for info_armsrace_counterterrorist. Also, you might want to disable the default spawns, see below.
  • execute the VScript code SendToConsoleServer("mp_randomspawn 1; mp_randomspawn_los 1") if the current game mode is Arms Race, which might not require a map recompile.

Modifying Gameplay

Weapon Progressions

ConVar Default Description
mp_ggprogressive_use_random_weapons 1
  • 0: The game uses a progression defined in csgo/gamemodes.txt or csgo/gamemodes_server.txt.
  • 1: The game generates a random weapon progression, see above.
mp_ggprogressive_random_weapon_kills_needed 2 If mp_ggprogressive_use_random_weapons is set to 1, this determines the number of kills that a player must make with a weapon to progress to the next (except for the Golden Knife, which requires one kill).
sv_ggprogressive_autosniper_first 1
  • 0: In random progressions, either the G3SG1 or the Scar-20 is the first weapon.
  • 1: In random progressions, any sniper rifle is the first weapon.
sv_ggprogressive_shotgun_last 1
  • 0: In random progressions, shotguns follow after the Desert Eagle/R8 Revolver, before the other pistols.
  • 1: In random progressions, shotguns are the last weapon group.

To play with a custom weapon progression, it is suggested to define it in the file csgo/gamemodes_server.txt, then set mp_ggprogressive_use_random_weapons to 0 and launch a map in this game mode, see above.

The file csgo/gamemodes_server.txt could look like this:

"GameModes_Server.txt"
{
	"gameTypes"
	{
		// ...
		
		"gungame"
		{
			"gameModes"
			{
				"gungameprogressive"
				{
					// ...

					"weaponprogression_ct"
					{
						"ak47"		{ "kills"	"3" }
						"awp"		{ "kills"	"3" }
						"knifegg"	{ "kills"	"1" }
					}
								
					"weaponprogression_t"
					{
						"ak47"		{ "kills"	"3" }
						"awp"		{ "kills"	"3" }
						"knifegg"	{ "kills"	"1" }
					}
				}

				// ...
			}
		}

		// ...
	}

	// ...
}


Note.pngNote:This is just the necessary part of the file. The expressions // ... should indicate that there can be much more in it.
Note.pngNote:See Counter-Strike: Global Offensive Weapons for a list of weapons. For this, omit the weapon_ prefix.

Related ConVars

ConVar Default Description
mp_ggprogressive_healthshot_killcount 3 Grant healthshots in Arms Race after this number of kills.
mp_ggprogressive_round_restart_delay 15 Number of seconds to delay before restarting a round after a win in Arms Race.
Note.pngNote:This is overriden by mp_match_restart_delay.

Disabling Default Spawns using VScript

TYPE <- ScriptGetGameType()
MODE <- ScriptGetGameMode()

if (TYPE == 1 && MODE == 0) // Arms Race uses game_type == 1 and game_mode == 0
{
	EntFire("info_player_terrorist", "SetDisabled")
	EntFire("info_player_counterterrorist", "SetDisabled")
}
else
{
	EntFire("info_player_terrorist", "SetEnabled")
	EntFire("info_player_counterterrorist", "SetEnabled")
}

If you want to use the info_armsrace_terrorist and info_armsrace_counterterrorist spawns exclusively, the info_player_terrorist and info_player_counterterrorist entities must be disabled, unless there are none. One way to do this only for Arms Race is writing a VScript such as the one on the right.

  • Create a text file with the content shown on the right. Save it at csgo/scripts/vscripts/ or in a subfolder from there as a .nut file.
  • In Hammer, create a logic_script and add this file to its Entity Scripts.
  • In-game, check the console when running the map to see if something goes wrong. If a team is full, there are most likely no valid spawn points for that team.
  • When publishing the map, this script must also be packed (see e.g. VIDE).

Bots

The current CS:GO/CS2 Deathmatch Deathmatch bots can be used in Arms Race, but need a slight modification. When they spawn, they are programmed to buy a weapon and because they can't buy in Arms Race, they get stuck "buying". To overcome this, one could copy and paste csgo/scripts/ai/deathmatch/bt_default.kv3, rename it and remove these lines:

{
	type = "action_buy"
},

In-game, by setting mp_bot_ai_bt "scripts/ai/deathmatch/<new filename>.kv3", all bots will then use this modified behavior tree without getting stuck.