CS2 custom game modes: the config that ships inside the map, game_type and game_mode, and the VScript fallback
Posted: Thu Oct 22, 2026 12:04 am
CS2 custom game modes: the config that ships inside the map, game_type and game_mode, and the VScript fallback
Custom game mode is the workshop answer to maps that need their own rules. A scoutzknivez map, an aim map, a practice map for retakes: all of them want settings the normal modes do not have. The mode exists so a map maker can ship those settings with the map instead of asking every player to type them.
How the mode is selected
Valve's documentation says to run the map through the Workshop menus and pick the Custom game mode where the option is offered. If you are loading the map from the console instead, set game_type 3 and game_mode 0 before the map command, then load it with map followed by the map name.
Where the settings live
The settings sit in csgo/maps/cfg with the map name and a .cfg extension. On a dedicated server, if sv_autoexec_mapname_cfg is not 0 when a Custom mode map loads, that file is executed through execwithwhitelist, which means only the ConVars listed in csgo/bspconvar_whitelist.txt are touched. When the cvar is 0 the file is not executed that way, and the resulting rules are close to Casual, with mp_timelimit 5, mp_roundtime 5 and bot_quota_mode normal as the visible differences.
The whitelist is the part that catches people out. A cfg that works in a listen server can do nothing on a dedicated server because the cvars it sets are not on the list.
Getting the cfg to run anyway
Valve's page gives a VScript workaround for exactly that. Write a short Squirrel script:
Save it under csgo/scripts/vscripts/ as a .nut file, add it to a logic_script entity in Hammer through Entity Scripts, and the script runs at the start of every round. When the mode is Custom it executes the map's cfg file from csgo/maps/cfg/.
One caveat on the source. The technical page lives in Valve's CS:GO documentation, which is still where the mode's internals are written up. The CS2 workshop FAQ describes the same mode from the player side, so the mode itself is current.
What gets packed with the map
When a map is uploaded to the workshop the cfg file is packed into the BSP automatically, so there is nothing to do by hand for that part. Textures, models and sounds can be shipped as well, and for custom gameplay Valve points at VScript files specifically. The CS:GO Map Publish Tool page covers what else is packed and what has to be added.
The workshop FAQ also notes that the SDK ships example Custom modes, and that how many modes Custom ends up supporting is an open question. That is why the config-file route is the one worth learning.
Practical notes
Valve Developer Community, Custom Game Mode
Counter-Strike, CS2 Workshop FAQ
Custom game mode is the workshop answer to maps that need their own rules. A scoutzknivez map, an aim map, a practice map for retakes: all of them want settings the normal modes do not have. The mode exists so a map maker can ship those settings with the map instead of asking every player to type them.
How the mode is selected
Valve's documentation says to run the map through the Workshop menus and pick the Custom game mode where the option is offered. If you are loading the map from the console instead, set game_type 3 and game_mode 0 before the map command, then load it with map followed by the map name.
Where the settings live
The settings sit in csgo/maps/cfg with the map name and a .cfg extension. On a dedicated server, if sv_autoexec_mapname_cfg is not 0 when a Custom mode map loads, that file is executed through execwithwhitelist, which means only the ConVars listed in csgo/bspconvar_whitelist.txt are touched. When the cvar is 0 the file is not executed that way, and the resulting rules are close to Casual, with mp_timelimit 5, mp_roundtime 5 and bot_quota_mode normal as the visible differences.
The whitelist is the part that catches people out. A cfg that works in a listen server can do nothing on a dedicated server because the cvars it sets are not on the list.
Getting the cfg to run anyway
Valve's page gives a VScript workaround for exactly that. Write a short Squirrel script:
Code: Select all
nType <- ScriptGetGameType()
nMode <- ScriptGetGameMode()
if (nType == 3 && nMode == 0)
{
SendToConsole("exec " + GetMapName() + " */maps")
}One caveat on the source. The technical page lives in Valve's CS:GO documentation, which is still where the mode's internals are written up. The CS2 workshop FAQ describes the same mode from the player side, so the mode itself is current.
What gets packed with the map
When a map is uploaded to the workshop the cfg file is packed into the BSP automatically, so there is nothing to do by hand for that part. Textures, models and sounds can be shipped as well, and for custom gameplay Valve points at VScript files specifically. The CS:GO Map Publish Tool page covers what else is packed and what has to be added.
The workshop FAQ also notes that the SDK ships example Custom modes, and that how many modes Custom ends up supporting is an open question. That is why the config-file route is the one worth learning.
Practical notes
- Check csgo/bspconvar_whitelist.txt before assuming a cvar will apply on a dedicated server
- Test the map in Custom mode on a listen server first, then on the dedicated server
- Both the script and the cfg have to be packed into the BSP when publishing
- game_type and game_mode only matter at load time, so set them before the map command, not after
Valve Developer Community, Custom Game Mode
Counter-Strike, CS2 Workshop FAQ