CSGO Game Mode - Retakes

From Valve Developer Community
Jump to: navigation, search
Counter-Strike: Global Offensive Level Creation

Retakes is a game mode in Counter-Strike: Global Offensive where Terrorists defend a planted bomb against Counter-Terrorists.

This game mode features loadout cards that are dealt to players before each round starts.

This document describes how you can add proper Retakes support to your bomb scenario maps, as well as how to customize the cards in your game.

How do I customize my deck of cards?

The deck of cards (for player loadouts) can be customized using specific convars.

The game comes with a default deck of cards that has been tested on all active duty maps.

You can set these convars on your Retakes server configuration file ( see "Server configuration" section below ).

Retakes consists of the following rounds:

  • One default pistol round
  • One upgraded pistol round
  • One light buy round
  • Full buy rounds until the match ends

Each round type has its own deck of cards. There's a convar that determines each deck for each round type, for each team.

Each player is dealt a random set of cards from the deck in question. Players then choose one card from this set.

Card deck convars

Each convar is a string with special characters that determine the deck of cards for the given round type and team. All convars follow the same format.

As an example, consider the card deck for Terrorists for the default pistol round:

mp_retake_ct_loadout_default_pistol_round 3;#GameUI_Retake_Card_4v3,0,0,secondary0|1;#GameUI_Retake_Card_FlashOut,0,0,secondary0,grenade2;#GameUI_Retake_Card_HideAndPeek,0,0,secondary0,grenade4"
  • The first number, 1, indicates the maximum number of defuse kits available for this round type. These will be randomly assigned to players on the team in question.
  • The next character | is required as a separator. This separator indicates a new card group follows.
  • The next number, 3, indicates the maximum amount of cards from this group that can be dealt this round to the team.
  • The next character ; is required as a separator. This separator indicates a card definition follows.
  • The next string is the card title.
  • The next character is either 0 or 1, indicating whether this card provides armor. For this card no armor is provided.
  • The next character is either 0 or 1, indicating whether this card provides a helmet. For this card no helmet is provided.
  • Next is a comma-separated list of weapon + utilities that this card provides. In this case, only secondary0 ( glock / usp ) is provided, nothing else.
  • Next is |, indicating that this card group is done - it contains only one card, and a max of 3 of such cards can be dealt this round to the team.
  • Next is another card group. Only 1 card of this group can be dealt to the team during this round. It contains two cards ( FlashOut and HideAndPeek ).

This is the full list of convars:

mp_retake_ct_loadout_default_pistol_round
mp_retake_ct_loadout_upgraded_pistol_round
mp_retake_ct_loadout_light_buy_round
mp_retake_ct_loadout_full_buy_round
mp_retake_t_loadout_default_pistol_round
mp_retake_t_loadout_upgraded_pistol_round
mp_retake_t_loadout_light_buy_round
mp_retake_t_loadout_full_buy_round

Bonus card availability

There's a convar that controls the availability of the bonus card:

mp_retake_ct_loadout_bonus_card_availability "1,2"
mp_retake_t_loadout_bonus_card_availability "1,1,2"

Bonus cards are only dealt during full buy rounds. A value of "1,2" indicates that during the first full buy round 1 bonus card will be dealt. The next full buy round will feature 2 bonus cards. Then, only 1 bonus card will be dealt, followed by 2 the next round. For Terrorists, the availability is instead "1 card, 1 card, 2 cards, 1 card, 1 card, ..."

Bonus cards

Currently there's only one bonus card definition per team. The convars are:

mp_retake_ct_loadout_bonus_card
mp_retake_t_loadout_bonus_card

The format is similar to the card deck convar's, except that it's only one card definition. For example:

mp_retake_ct_loadout_bonus_card "#GameUI_Retake_Card_TheAWPortunity,1,1,rifle4"

How do I add proper Retakes support to an existing bomb scenario map?

The map should be modified to include specific Retakes entities that dictate exact player and bomb placement, as well as entities that restrict Terrorists' movement while the bomb is planted.

Retakes will still work without these entities, but placement of players and bombs will follow a best effort algorithm that might yield unfair setups. Additionally Terrorists will be able to move freely while the bomb is planted ( remember that Terrorists can move while CT's cannot ).

In order to provide the best experience for players the following entities should be added and configured on your bomb scenario map:

  • Brushes that restrict Terrorist movement while the bomb is planted.
  • A list of spawn points for both Terrorists and Counter-Terrorists.
  • A list of bomb plants and their weight ( how likely they're supposed to happen during a match ).

Movement blocker for Terrorists

Retakes allows Terrorists to move around the bomb plant location during round setup. However, boundaries should be set so that Terrorists cannot run too far and get too close to the CT's who are not allowed to move during this time.

The idea is to create an enclosure that allows Terrorists some level of flexibility to position themselves in preparation for the retake.

Use Hammer to create func_brush entities that block passages around both bomb sites. They follow the same pattern as the Wingman blockers, except they should be named either retake.asite or retake.bsite. You can use the TOOLS/WRONGWAY_TIMER material to display the new Retakes icon ( which differs from the usual WRONGWAY material that's used for Wingman ). Make sure they start disabled.

While the bomb is being planted Terrorists are able to move around the bomb plant location. As they approach these brushes, they fade into view and block the Terrorists' movement. The game automatically removes them after the bomb is planted and the round starts.

List of spawn points and bomb plant locations

You need to specify the list of spawn points for both Terrorists and Counter-Terrorists, as well as the list of bomb plant locations. If this information is missing, the game will do a best-effort algorithm, but it is not guaranteed to produce fair results.

Alongside your map's bsp file you need to create a file named mapname_retake.txt ( e.g. de_mirage_retake.txt ).

You can copy one of the active duty maps' file, rename it, and edit its contents accordingly.

The spawn locations contain the x y z pitch yaw roll for the corresponding location - you can obtain those numbers using getpos on your console.

For the bomb plants there's an additional weight factor, indicating how often this bomb plant location occurs during a match. For example, if you have a bomb plant location with a weight of 1, and another with a weight of 10, the latter is 10 times more likely to occur during your retakes match than the former. If all bomb plant locations have the same weight, they are all equally likely to be picked during your match.

Game mode convars

game_mode 0

game_type 0

sv_skirmish_id 12

Server configuration

You can use the provided gamemode_retakecasual.cfg file as a baseline for your Retakes server.