Difference between revisions of "Creating a Arsenal: Arms Race Map"

From Valve Developer Community
Jump to: navigation, search
(info_armsrace_terrorist and info_armsrace_counterterrorist are not unused by the game. Investigated.)
(Lang template, back button, icons. Section Game Mode Description. New section Weapon Progressions.)
 
Line 1: Line 1:
{{otherlang2
+
{{lang|Creating a Arsenal: Arms Race Map}}
|zh-cn=Creating a Arsenal: Arms Race Map:zh-cn
+
{{back|Counter-Strike: Global Offensive Level Creation}}
}}
+
[[File:Csgo icon armsrace.png|left]]
The '''Arsenal: Arms Race''' game mode is a single extended round with instant respawn. Players start with an SMG, and progress to different weapons as they get kills. The progression of unlocked weapons ends with the golden knife. The first player to get a kill the last weapon wins the match.
+
[[File:Csgo icon skirmish armsrace.png|left]]
 +
'''Arms Race''' (internally: <code>'''gungameprogressive'''</code>) is a [[game mode]] in {{game name|csgo|name=Counter-Strike: Global Offensive}}.
 +
 
 +
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 [[CS:GO Game Mode Commands]] for details and tips.
 +
 
 +
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_Mode_Commands#Skirmish_Modes|war game]].
 +
{{clr}}
 +
__TOC__
 +
 
 +
==Game Mode Description==
 +
Officially, this game mode plays as follows:
 +
* The game is a single extended round with instant respawn.
 +
* Players start with an SMG, and progress to different weapons as they get kills. The progression of unlocked weapons ends with the [[weapon_knifegg|golden knife]].
 +
* Killing a player with the knife steals a progression from a player: The killer progresses, the killed loses a progression (assuming he is not at the first weapon).
 +
* The leading player of a team is highlighted to other players and killing him 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.
 
The only required entities for a map to work in Arms Race are spawn points for each team.
  
==Spawn points==
+
===Spawn points===
Arms Race uses the normal [[info_player_counterterrorist]] and [[info_player_terrorist]] as well as the [[info_armsrace_terrorist]] and [[info_armsrace_counterterrorist]] 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.
+
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.}}
 
{{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.}}
Line 13: Line 29:
 
{{Placement 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.}}
 
{{Placement 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.}}
  
===Disabling default spawns using VScript===
+
====Disabling default spawns using VScript====
 
+
{| style="float:right;"
If you want to use the [[info_armsrace_terrorist]] and [[info_armsrace_counterterrorist]] spawns exclusively, the other must be disabled. One way to disable all [[info_player_counterterrorist]] and [[info_player_terrorist]] spawns '''''only for Arms Race''''' is writing a [[VScript]] with something like:
+
| <source lang=cpp>
<source lang=cpp>
 
 
TYPE <- ScriptGetGameType()
 
TYPE <- ScriptGetGameType()
 
MODE <- ScriptGetGameMode()
 
MODE <- ScriptGetGameMode()
Line 31: Line 46:
 
}
 
}
 
</source>
 
</source>
 +
|}
 +
If you want to use the [[info_armsrace_terrorist]] and [[info_armsrace_counterterrorist]] spawns exclusively, the other must be disabled. One way to disable all info_player_counterterrorist and info_player_terrorist spawns '''''only for Arms Race''''' is writing a [[VScript]] such as the one on the right.
 +
 
Give this text file a name and save it with the <code>.nut</code> extension, for example <code>mapname.nut</code> and put it either directly into <code>csgo/scripts/vscripts/</code> or in a (new) subdirectory from there. Place a [[logic_script]] in your level and add the previous script to its Entity Scripts. Check the console when running the map to see if something goes wrong. When publishing the map, this script must also be packed (see e.g. [[VIDE]]).
 
Give this text file a name and save it with the <code>.nut</code> extension, for example <code>mapname.nut</code> and put it either directly into <code>csgo/scripts/vscripts/</code> or in a (new) subdirectory from there. Place a [[logic_script]] in your level and add the previous script to its Entity Scripts. Check the console when running the map to see if something goes wrong. When publishing the map, this script must also be packed (see e.g. [[VIDE]]).
 +
{{clr}}
 +
 +
==Weapon Progressions==
 +
{| class=standard-table
 +
! ConVar !! Default Value !! Description
 +
|-
 +
| <code>mp_ggprogressive_use_random_weapons</code>
 +
| 1
 +
| If set to 1, the game generates a random weapon progression, consisting of 3 SMGs, 4 rifles, 2 shotguns, 2 sniper rifles, 1 machine gun, 4 pistols and the [[weapon_knifegg|Golden Knife]].
 +
 +
If set to 0, the game uses a progression defined in <code>csgo/[[gamemodes.txt]]</code> or <code>csgo/gamemodes_server.txt</code>.
 +
|-
 +
| <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).
 +
|}
  
==Testing your map==
+
To define a custom weapon progression, it is suggested to define it in the file <code>csgo/gamemodes_server.txt</code>, set <code>mp_ggprogressive_use_random_weapons</code> to 0 and launch a map in this game mode, see above.
The map is launched in the Arms Race gamemode by first setting the server-side [[ConVar]]s <code>game_type</code> to 1 and <code>game_mode</code> to 0 and then running the map using the <code>[[map]]</code> or <code>[[changelevel]]</code> command. See [[CSGO Game Mode Commands]] for details and tips.
+
 
 +
The file <code>csgo/gamemodes_server.txt</code> could look like this:
 +
{{ExpandBox|
 +
<pre>
 +
"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.}}
  
 
[[Category:Counter-Strike: Global Offensive]]
 
[[Category:Counter-Strike: Global Offensive]]
 
[[Category:Level Design Tutorials]]
 
[[Category:Level Design Tutorials]]

Latest revision as of 15:32, 19 September 2021

English 简体中文
Counter-Strike: Global Offensive Level Creation
Csgo icon armsrace.png
Csgo icon skirmish armsrace.png

Arms Race (internally: gungameprogressive) is a game mode in Counter-Strike: Global Offensive 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 CS:GO Game Mode Commands 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 an SMG, and progress to different weapons as they get kills. The progression of unlocked weapons ends with the golden knife.
  • Killing a player with the knife steals a progression from a player: The killer progresses, the killed loses a progression (assuming he is not at the first weapon).
  • The leading player of a team is highlighted to other players and killing him 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.png 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.
Placementtip.gif Placement 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.

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", "", 0)
	EntFire("info_player_counterterrorist", "SetDisabled", "", 0)
}
else
{
	EntFire("info_player_terrorist", "SetEnabled", "", 0)
	EntFire("info_player_counterterrorist", "SetEnabled", "", 0)
}

If you want to use the info_armsrace_terrorist and info_armsrace_counterterrorist spawns exclusively, the other must be disabled. One way to disable all info_player_counterterrorist and info_player_terrorist spawns only for Arms Race is writing a VScript such as the one on the right.

Give this text file a name and save it with the .nut extension, for example mapname.nut and put it either directly into csgo/scripts/vscripts/ or in a (new) subdirectory from there. Place a logic_script in your level and add the previous script to its Entity Scripts. Check the console when running the map to see if something goes wrong. When publishing the map, this script must also be packed (see e.g. VIDE).

Weapon Progressions

ConVar Default Value Description
mp_ggprogressive_use_random_weapons 1 If set to 1, the game generates a random weapon progression, consisting of 3 SMGs, 4 rifles, 2 shotguns, 2 sniper rifles, 1 machine gun, 4 pistols and the Golden Knife.

If set to 0, the game uses a progression defined in csgo/gamemodes.txt or csgo/gamemodes_server.txt.

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

To define a custom weapon progression, it is suggested to define it in the file csgo/gamemodes_server.txt, 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:



Note.png Note:  This is just the necessary part of the file. The expressions // ... should indicate that there can be much more in it.