[SwiftlyS2] Retakes
Made by aga
Overview
SwiftlyS2-Retakes is a CS2 retakes game mode for SwiftlyS2.
It handles:
- Round Flow — automatic site selection, freeze time management, and round cleanup
- Automatic Bomb Planting — bomb is planted at freeze end at the selected site
- Instant Plant & Defuse — instant plant support and smart instant defuse logic with molly/enemy checks
- Weapon Allocation — dynamic weapon, armor, and utility distribution based on round type
- Weapon Preferences — persistent menus for players to choose their preferred loadouts
- Grenade Allocation — configurable per-round-type grenade distribution (random, fixed, or damage-based dynamic)
- Map Configurations — custom per-map JSON configs for spawns and smoke scenarios
- Spawn Editor — comprehensive in-game tools for managing spawns and smokes
- Queue System — max player limits, spectator queues, and late joiner handling
- Smoke Scenarios — pre-defined smokes that can be forced or randomly spawned
- AFK Manager — automatically moves inactive players to spectator or kicks them
- Anti Team-Flash — blocks teammates from being blinded by friendly flashes
- Solo Bot System — automatically spawns a bot when only one human is present
- World Breaker — automatically breaks glass and opens doors at round start
- Damage Reports — per-opponent damage summary at the end of each round
- Clutch Announcements — notifies players of 1vX clutch situations
- Native Message Suppression — suppresses redundant game messages for a cleaner chat
Support
Download Shortcuts
Plugin - https://github.com/a2Labs-cc/SwiftlyS2-Retakes/releases/latest Cookies - https://github.com/SwiftlyS2-Plugins/Cookies/releases/latest SwiftlyS2 - https://github.com/swiftly-solution/swiftlys2/releases/latest
Dependencies
| Plugin | Required | Purpose |
|---|---|---|
| Cookies | Yes | Persistent player preferences (AWP toggle, weapon loadouts, spawn selections, etc.) |
Note: Without the Cookies plugin, player preferences will not be saved between sessions — all settings reset on disconnect.
Installation
- Download or build the plugin.
- Install the Cookies plugin.
- Copy the published plugin folder to your server:
.../game/csgo/addons/swiftlys2/plugins/Retakes/ - Ensure the
resources/folder is alongside the DLL (maps, translations, gamedata). - Start or restart the server.
Player Preferences
The plugin saves player preferences using the Cookies plugin. All preferences persist between sessions and are loaded automatically on connect.
What Gets Saved
| Category | Preferences |
|---|---|
| Weapons | AWP toggle, SSG08 toggle, AWP priority, pistol round primary, half-buy primary/secondary, full-buy primary/secondary |
| Spawns | Spawn menu toggle, T/CT preferred spawn per bombsite (A and B) |
Configuration
| Field | Default | Description |
|---|---|---|
Preferences.UsePerTeamPreferences | true | Separate T/CT weapon preferences in !guns |
Preferences.DatabaseConnectionName | "default" | Cookies database connection name |
Weapon Allocation
Round Types
| Round Type | Armor | Primary | Secondary | CT Defuser |
|---|---|---|---|---|
| Pistol | Kevlar only (no helmet by default) | Pistol | ❌ | 1 random CT player |
| Half-Buy | Kevlar + Helmet | SMGs / budget rifles | ✅ Pistol | All CTs |
| Full-Buy | Kevlar + Helmet | Rifles (or AWP / Scout) | ✅ Pistol | All CTs |
Round Type Selection
| Field | Default | Description |
|---|---|---|
Allocation.Enabled | true | Enable/disable weapon allocation entirely |
Allocation.RoundType | "random" | How each round's type is chosen (see modes below) |
Allocation.RoundTypePctPistol | 20 | % chance of pistol round (random mode) |
Allocation.RoundTypePctHalf | 30 | % chance of half-buy round (random mode) |
Allocation.RoundTypePctFull | 50 | % chance of full-buy round (random mode) |
Allocation.RoundTypeSequence | [] | Ordered sequence of round types (sequence mode) |
RoundType modes:
| Value | Description |
|---|---|
"random" | Mix of all types based on the percentages above |
"pistol" / "p" | Pistol rounds only |
"half" / "h" | Half-buy rounds only |
"full" / "f" | Full-buy rounds only |
"sequence" | Plays through a defined sequence, looping on the last entry |
Sequence mode example
"Allocation": {
"RoundType": "sequence",
"RoundTypeSequence": [
{ "Type": "Pistol", "Count": 3 },
{ "Type": "HalfBuy", "Count": 2 },
{ "Type": "FullBuy", "Count": 25 }
]
}Plays 3 pistol rounds → 2 half-buy rounds → full-buy for all remaining rounds.
Weapon Selection
| Field | Default | Description |
|---|---|---|
Allocation.PistolHelmet | false | Give helmet on pistol rounds (otherwise kevlar only) |
Allocation.InstantSwap | true | Swap weapons in-hand immediately when a player changes preference mid-round |
Weapon selection priority (human players):
- Player's saved preference (from
!guns) - Configured default loadout (
Weapons.Defaults.*) - Random weapon from the allowed list
Bots always receive a random weapon from the allowed list.
Allowed Weapon Lists
Configured under Weapons:
| Field | Description |
|---|---|
Weapons.BuyMenuEnabled | Show/hide the buy menu (disabling also zeroes player money) |
Weapons.Pistols | List of weapons selectable on pistol rounds and as secondaries |
Weapons.HalfBuy.T / .Ct / .All | Allowed primaries for half-buy rounds per team |
Weapons.FullBuy.T / .Ct / .All | Allowed primaries for full-buy rounds per team |
Default Loadouts
Used when a player has no saved preference yet. Player selections always override these.
"Weapons": {
"Defaults": {
"Pistol": {
"Primary": { "T": "weapon_glock", "Ct": "weapon_usp_silencer" },
"Secondary": { "T": null, "Ct": null }
},
"HalfBuy": {
"Primary": { "T": "weapon_galilar", "Ct": "weapon_famas" },
"Secondary": { "T": "weapon_glock", "Ct": "weapon_usp_silencer" }
},
"FullBuy": {
"Primary": { "T": "weapon_ak47", "Ct": "weapon_m4a1_silencer" },
"Secondary": { "T": "weapon_glock", "Ct": "weapon_usp_silencer" }
}
}
}AWP Allocation
Only on full-buy rounds. Players must toggle !awp to be eligible.
| Field | Default | Description |
|---|---|---|
Allocation.AwpEnabled | true | Enable AWP allocation |
Allocation.AwpPerTeam | 1 | Maximum AWPs given per team |
Allocation.AwpAllowEveryone | false | Ignore player preference — everyone is eligible |
Allocation.AwpLowPlayersThreshold | 4 | Team size at or below which low-population mode activates |
Allocation.AwpLowPlayersChance | 50 | % chance of AWP spawning in low-population mode |
Allocation.AwpLowPlayersVipChance | 60 | % chance when a VIP-priority player is in the low-population team |
Allocation.AwpPriorityFlag | "" | Permission flag that grants AWP priority (empty = disabled) |
Allocation.AwpPriorityPct | 0 | % chance each AWP slot picks a priority player first |
Scout (SSG08) Allocation
Only on full-buy rounds. Players who receive an AWP are excluded.
| Field | Default | Description |
|---|---|---|
Allocation.Ssg08Enabled | true | Enable SSG08 allocation |
Allocation.Ssg08PerTeam | 0 | Maximum SSG08s given per team (0 = disabled) |
Allocation.Ssg08AllowEveryone | false | Ignore player preference — everyone is eligible |
Weapon Stripping
| Field | Default | Description |
|---|---|---|
Allocation.StripWeapons | true | Remove existing weapons before giving new loadout |
Allocation.StripRemove | true | Remove weapons instead of dropping them (keeps the ground clean) |
Allocation.GivePistolOnRifleRounds | true | Give secondary pistol on half/full-buy rounds |
Grenade Allocation
Grenades are configured separately from primary weapons, with three distinct allocation modes.
Allocation Modes
| Field | Default | Description |
|---|---|---|
Grenades.AllocationType | "random" | "random", "fixed", or "dynamic" |
| Mode | Description |
|---|---|
"random" | Each grenade in RandomChances is rolled independently per player with a configurable % chance |
"fixed" | Every player on the team always receives exactly the grenades listed in Fixed |
"dynamic" | A shared pool of grenades is distributed across the team, prioritising players who dealt the most damage last round |
Per-Round Grenade Lists
Configured under Grenades.Pistol, Grenades.HalfBuy, and Grenades.FullBuy. Each has a T and Ct sub-object with three fields:
| Field | Used by mode | Description |
|---|---|---|
RandomChances | random | Map of "weapon_name": chance (0–100). Each entry rolled independently per player |
Fixed | fixed | List of grenades every player on the team receives |
DynamicPool | dynamic | Ordered shared pool distributed across eligible players. Duplicates = multiple of that type in the pool |
Example grenade config
"Grenades": {
"AllocationType": "dynamic",
"FullBuy": {
"T": {
"RandomChances": { "weapon_smokegrenade": 100, "weapon_flashbang": 70, "weapon_molotov": 45 },
"Fixed": [ "weapon_smokegrenade", "weapon_flashbang", "weapon_molotov" ],
"DynamicPool": [ "weapon_smokegrenade", "weapon_flashbang", "weapon_flashbang", "weapon_hegrenade", "weapon_molotov" ]
},
"Ct": {
"RandomChances": { "weapon_smokegrenade": 100, "weapon_flashbang": 70, "weapon_incgrenade": 45 },
"Fixed": [ "weapon_smokegrenade", "weapon_flashbang", "weapon_incgrenade" ],
"DynamicPool": [ "weapon_smokegrenade", "weapon_flashbang", "weapon_flashbang", "weapon_hegrenade", "weapon_incgrenade" ]
}
}
}Dynamic Mode Settings
| Field | Default | Description |
|---|---|---|
Grenades.DynamicMinDamage | 1 | Minimum damage dealt last round for a player to be eligible |
Grenades.DynamicTopFraction | 0.5 | Fraction (0.0–1.0) of eligible players who can receive grenades. Applied after sorting by damage, rounded up. 1.0 = all eligible |
Grenades.DynamicMaxPerPlayer | 0 | Maximum total grenades one player can receive. 0 = no limit |
Grenades.DynamicUseCumulativeScore | false | Use exponentially-weighted multi-round damage score for priority instead of raw last-round damage. The DynamicMinDamage threshold still uses last-round damage |
How DynamicTopFraction works:
| Eligible players | TopFraction | Players who receive grenades |
|---|---|---|
| 5 | 0.5 | 3 (top 3 by damage) |
| 4 | 0.5 | 2 |
| 1 | 0.5 | 1 (always at least 1) |
The DynamicPool is distributed round-robin starting from the highest-damage player. If a player reaches DynamicMaxPerPlayer, they are skipped and the grenade moves to the next eligible player.
Per-Grenade Cap
Applies across all allocation modes.
| Field | Default | Description |
|---|---|---|
Grenades.MaxPerGrenade | See below | Maximum of each grenade type one player can receive |
Default caps (reflecting CS2 inventory limits):
"MaxPerGrenade": {
"weapon_flashbang": 2,
"weapon_smokegrenade": 1,
"weapon_hegrenade": 1,
"weapon_molotov": 1,
"weapon_incgrenade": 1,
"weapon_decoy": 1
}Grenades not listed here are uncapped.
Player
| Command | Description |
|---|---|
!guns | Open the weapon preference menu |
!gun <weapon> | Quickly set a preferred weapon (see below) |
!retake | Open the main Retakes menu |
!spawns | Toggle the CT spawn selection menu |
!awp | Toggle AWP preference |
!voices | Toggle voice announcements |
Quick Weapon Select (!gun)
Type !gun <weapon> to change your weapon preference instantly — no menu needed. Swaps the weapon in-hand immediately.
Accepted formats:
- Entity names:
weapon_ak47,weapon_m4a1_silencer - Short names:
ak,ak47,deag,usp,m4a1s,scout,galil,p250,cz,r8, etc. - Display names:
AK-47,M4A1-S,USP-S
Behaviour:
- Validates against the current round type
- Assigns to the correct slot (primary or secondary) automatically
- Reports if the weapon is not allowed this round or is already set
Examples:
!gun ak → sets AK-47 as your full-buy/half-buy primary
!gun usp → sets USP-S as your secondary
!gun m4a1s → sets M4A1-S as your CT primaryDebug
| Command | Description |
|---|---|
!debugqueues | Print debug information about the queue state |
Map Configs
Map configs live in:
plugins/Retakes/resources/maps/*.jsonEach file contains the spawn positions used by the retakes allocator. A template is available at resources/templates/template.jsonc.
Building
dotnet buildCredits
- Readme template by criskkky
- Release workflow based on K4ryuu/K4-Guilds-SwiftlyS2
- All spawns based on B3none/cs2-retakes
- Inspired by itsAudioo/CS2BombsiteAnnouncer
- Inspired by yonilerner/cs2-retakes-allocator