Home / CS 2 ARTICLE / Optimizing Counter-Strike 2 Player Configuration Files

Optimizing COUNTER-STRIKE 2 Player Configuration Files

Quick Links

About configuration files in Counter-Strike 2

Counter-Strike 2 offers extensive customization options through the developer console and configuration files, allowing players to personalize various aspects of the game. These include reducing ping, increasing FPS, adjusting aiming settings such as size, shape, and color, modifying mouse sensitivity, optimizing brightness and screen resolution, and configuring hand position, among other important settings.
While configuration files may initially appear complex, they are actually straightforward to work with. These files consist of a list of settings that you can apply to your game, ranging from simple adjustments like keyboard shortcuts and sensitivity to more intricate elements like bindings and scripts. However, newcomers to Counter-Strike may find this process daunting, as the configuration system in Counter-Strike 2 differs significantly from that of CS: GO and CS 1.6.
To simplify this for you, I have prepared a comprehensive guide that will assist you in navigating the configuration process with ease.

What are the Counter-Strike 2 configuration files for?

CS 2 configuration files serve several purposes:

  • Changing specific settings: Certain settings in CS 2 can only be modified through configuration files. These files provide a means to customize aspects of the game that are not accessible through the in-game settings menu.
  • Saving settings for future use: Configuration files offer a convenient way to save all your customized settings and preferences. By utilizing these files, you can easily apply your preferred configurations whenever you play the game, without the need to manually adjust each setting.
  • Multiple configuration profiles: With configuration files, you have the ability to create multiple profiles, each with its own set of configurations. This allows you to have different settings tailored for various servers or gameplay scenarios, providing flexibility and convenience.
  • Personalized configuration file: Unlike the game configuration files, which are reset to default settings every time you start CS 2 (unless it is writable by your operating system), a personal configuration file remains unchanged by the game. This ensures that your customized settings are preserved and not overwritten during game launches.

 

Overall, CS 2 configuration files offer a reliable and efficient way to manage and maintain your preferred settings, providing a more personalized gaming experience.

Where can I find the Counter-Strike 2 configuration files?

In Counter-Strike 2, the default configuration files can be found in the “cfg” folder within the game’s root directory. The path to these files is typically:

				
					..\Steam Library\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\
				
			

and the player (account) configuration files are located in the root folder of the Steam installation in the “userdata” folder:

				
					..\Steam\userdata\
				
			

In my case, one of the Steam libraries is installed on drive D in the “Games” folder and the full path to the default CS 2 configuration files looks like this:

				
					D:\Games\SteamGames\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\
				
			

Steam is installed on the E drive, and the path to the CS 2 accounts configuration files:

				
					E:\Steam\userdata\ID#\730\local\cfg\
				
			

Please note that "ID#" refers to your Steam numeric index. If you only have one Steam account on your PC, the "userdata" folder within the Steam folder will contain only one folder. However, if you have multiple Steam accounts, you will need to identify the correct Steam ID associated with the desired account.

The Counter-Strike 2 user configuration files

cs2_machine_convars.vcfg

The game’s Cvars.
The configuration file cs2_machine_convars.vcfg contains over 320 console commands that can be used to set up the Counter-Strike 2 game. Whenever you enter the game, this file gets overwritten. When this happens, any added commands will be executed and then deleted, while any deleted commands will be restored but not executed. However, any changes made to existing commands will remain in effect.
You can modify the values of these commands either in the Notepad or in the game console. It is worth noting that you can assign the Read-only attribute to the file in the operating system, which will prevent it from being overwritten when the game starts. In this case, the added commands will be executed every time.
However, I do not recommend using the Read-only attribute since game updates often introduce new console commands and modify or delete existing ones. By using the Read-only attribute, you may miss out on these updates and also, get some issues as well.
For example, you can add a command to display the frames per second (FPS) by simply writing the command with a value on a new line. The following examples are all correct ways to write this command:

				
					cl_showfps 1
"cl_showfps" 1
cl_showfps "1"
"cl_showfps" "1"
				
			

The last format is the preferred one.
Unfortunately, both CS 2 and CS: GO have bugs or shortcomings. You can easily check for these by loading commands via the console or by using the EXEC config loading command with a separate configuration file, which I will discuss below.

By the way, If you want to see the game loading log in the console, you can use the -dev parameter in the launch parameters.

The console may display error messages for some commands, such as “Unknown command:

				
					Unknown command: cl_teamid_overhead_colors_show$2
Unknown command: hud_scaling$3
Unknown command: snd_deathcamera_volume$4
Unknown command: snd_mapobjective_volume$4
Unknown command: snd_menumusic_volume$4
Unknown command: snd_musicvolume$2
Unknown command: snd_mvp_volume$4
Unknown command: snd_roundaction_volume$4
Unknown command: snd_roundend_volume$4
Unknown command: snd_roundstart_volume$4
Unknown command: snd_tensecondwarning_volume$4
Unknown command: sv_specspeed$2
Unknown command: ui_mainmenu_bkgnd_movie_1016BB11$9
				
			

These commands are valid and functional, but they are not written correctly with dollar signs. However, there is no need to worry about these error messages, as the game console simply reports and ignores the erroneous lines in the cs2_machine_convars.vcfg file.

Explanation of abbreviations in config files of Counter-Strike 2

				
					c_
Cursor abbreviation
Variables for mouse settings

cam_
Camera abbreviation
Variables for setting up a third-person camera

cc_
Subtitles abbreviation
Variables for subtitles settings

cl_
Client abbreviation
Variables for game client settings

sv_
Server abbreviation
Variables for setting up a server client

hud_
Head-Up Display abbreviation
Variables for configuring Hud

joy_
Joystick abbreviation
Variables for gamepad settings

m_
Mouse abbreviation
Variables for mouse settings

mat_
Materials abbreviation
Graphics&CPU

mm_
Matchmaking abbreviation
Variables for setting up a competition mode

net_
Network abbreviation
Variables for configuring internet connection

r_
Rendering abbreviation
Variables to set the game rendering

snd_
Sound abbreviation
Variables to customize the sound

ui_
User Interface abbreviation
Variables to customize the user interface

viewmodel_
Variables to set up the hand position in the game, on each of the three axes

voice_
Variables for chat settings

zoom_
Variables for zoom sensitivity

bot_
Variables for bot_ settings

mp_
Multiplayer abbreviation
Variables for setting up game rules and conditions on the server

tv_
Source TV abbreviation
Variables for setting up GOTV

+some_console_command1 - "+" key press
-some_console_command1 - "-" key unpress
				
			

cs2_user_convars_0_slot0.vcfg

The user’s Cvars.
The configuration file, cs2_user_convars_0_slot0.vcfg, is a user component of Counter-Strike 2 and it houses a collection of up to 70 console commands. These commands serve the purpose of customizing various user settings within the game. By modifying this file, players can personalize elements such as their crosshair, joystick configuration, mouse sensitivity, as well as pitch and yaw factors. These settings allow players to tailor their gaming experience to their preferences, enhancing their overall gameplay.
In general the cs2_user_convars_0_slot0.vcfg file shares similarities with the previously mentioned cs2_machine_convars.vcfg file.

cs2_user_keys_0_slot0.vcfg

The user’s binds.
All new binds will be saved in this file. The useful wheel jump bind is already inside by default.

cs2_video.txt

The cs2_video.txt configuration file encompasses a collection of up to 50 console commands that primarily govern the video settings within Counter-Strike 2. Some of the key commands found in this file include:

				
					"setting.cpu_level" "0" - effect quality: 0 - low; 1 - medium; 2 - high; 3 - very high;
"setting.gpu_level" "0" - shader quality: 0 - low; 1 - medium; 2 - high; 3 - very high;
"setting.mat_antialias" "1" - anti-aliasing factor: 0, 1, 2, 4, 8, 16;
"setting.mat_aaquality" "0" - the quality of smoothing: 0 - none; 1, 2, 3, 4 - a multiplicity of smoothing in ascending order;
"setting.mat_forceaniso" "0" - anisotropic filtering coefficient: 0, 2, 4, 8, 16;
"setting.mat_vsync" "0" - vertical synchronization: 0 - off; 1 - on;
"setting.mat_triplebuffered" "0" - 3-way buffering: 0 - off; 1 - on;
"setting.mat_monitorgamma" "1.6" - image brightness;
"setting.mat_grain_scale_override" "1" - the presence of the graining effect on the screen: 0 - not present; 1 - present;
"setting.gpu_mem_level" "0" - texture detail: 0 - low; 1 - medium; 2 - high;
"setting.mem_level" "2" - additional memory:
"setting.mat_queue_mode" "-1" - multicore mode: -1, 0, 1, 2;
"setting.csm_quality_level" "0" - shadow quality: 0 - low; 1 - medium; 2 - high;
"setting.mat_software_aa_strength" "0" - edge smoothing quality: 0, 1, 2, 4, 8, 16;
"setting.mat_motion_blur_enabled" "0" - motion blur: 0 - off; 1 - on;
"setting.fullscreen" "1" - full-screen mode: 0 - off; 1 - on;
"setting.defaultres" "1920" - resolution of the X axis of the screen;
"setting.defaultresheight" "1080" - resolution of the Y-axis of the screen;
"setting.aspectratiomode" "2" - image aspect ratio: 0 - 4:3; 1 - 16:9; 2 - 16:10;
"setting.nowindowborder" "0" - no restrictions in the window mode: 0 - off; 1 - on;
				
			

These are just a few examples of the console commands found in the cs2_video.txt file. By modifying these settings, players can tailor the visual experience of Counter-Strike 2 to their liking, ensuring optimal graphics performance and visual fidelity.

How to Create and Run a personal config file?

To create and run a personal config file in Counter-Strike 2, you can follow these steps:

  • Create a text file: Start by creating a text file using any text editor. You can include letters, numbers, and special characters in the file name, such as dashes, underscores, and ampersands.
  • Change the file extension: Change the file extension from “*.txt” to “*.cfg“. In Windows OS, file extensions are hidden by default. To display file extensions, go to the Control Panel, select File Explorer Options, navigate to the View panel, and uncheck the box that says “Hide extensions for known file types“.
  • Choose a directory: It is recommended to create a directory specifically for your config files to avoid confusion with other game files. Create a directory, such as “..\cfg\mycfg\“, where you can store your config files.
  • Specify the file path: Place your config file in the desired directory. For example, if your config file is named “user.cfg” and located in the “..\cfg\mycfg\” directory, the file path might look like this:
				
					D:\Games\SteamGames\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\mycfg\user.cfg
				
			
  • Modify the autoexec.cfg file: Open the “autoexec.cfg” file, which is loaded automatically with the game. Add a line to execute your personal config file. For example, if your config file is “user.cfg“, the line in “autoexec.cfg” would be:
    exec mycfg/user.cfg“.
    Note that both forward slashes (“/”) and backslashes (“\”) are accepted.
  • Load multiple configs: You can load multiple configs from different directories or from the same directory. In the “autoexec.cfg” file, you can use the “exec” command to chain multiple config files. For example:
				
					exec user.cfg
exec mycfg/user.cfg
exec mycfg/mycfg2/user.cfg
				
			
  • Chain configs within a directory: If you have multiple config files within the same directory, you can chain them using the “exec” command. For example, if you have “user1.cfg“, “user2.cfg“, and “user3.cfg” in the “mycfg” directory, the lines in the files would be:
				
					- In autoexec.cfg: exec mycfg/user1.cfg
- In user1.cfg: exec mycfg/user2.cfg
- In user2.cfg: exec mycfg/user3.cfg
				
			

By following these steps, you can create and run personal config files in Counter-Strike 2, allowing you to customize your game settings and preferences.

If there are repeated commands with different values in the CS 2 configuration files, it will not result in an error. The game will consider the value of the command that is executed last, taking it into account for gameplay. Additionally, if a command is not written correctly, it will not have a critical impact on the game. The Counter-Strike 2 console will simply ignore the line with the invalid command, ensuring that it does not affect the gameplay experience. Similarly, if the value of a command is incorrect, it will not have a critical impact either. The CS 2 console will disregard the line with the incorrect command value, ensuring that it does not affect the game.

Personal configuration file example:

				
					mm_dedicated_search_maxping "26"
fps_max "0"
cl_draw_only_deathnotices "0"
// cl_showfps "1"
func_break_max_pieces "0"
sv_party_mode "0"
spec_replay_autostart "0"

// Show score+FPS
alias +drow "cl_showfps 1; +showscores"
alias -drow "cl_showfps 0; -showscores"
bind "TAB" "+drow"

// Buy
bind "F4" "buy hegrenade; buy flashbang; buy smokegrenade; buy molotov"
bind "F5" "buy deagle; buy vesthelm; buy defuser"
bind "F6" "buy sg550; buy aug; buy vesthelm; buy defuser"
bind "F7" "buy ak47; buy m4a1_silencer; buy vesthelm; buy defuser"
bind "F8" "buy scar20; buy sg550; buy vesthelm; buy defuser"
bind "F9" "buy awp; buy vesthelm; buy defuser"
				
			

How to save the current configuration in the game?

While previous Counter-Strike titles used the host_writeconfig command to save the current configuration to a new file, this command is not currently functioning as intended in Counter-Strike 2.
The configuration file specified in the command is not created or not saved, and the command only reports that the user configuration files cs2_user_convars_0_slot0.vcfg and cs2_user_keys_0_slot0.vcfg are overwritten. This information is meaningless since these files can be overwritten through the game menu or the game console. Additionally, the file cs2_machine_convars.vcfg is not overwritten either.
As of this writing, there is no direct method within the game to save a complete configuration file in one step. However, there is alternative approach you can consider:
Compile a list of the console commands you’ve used to customize your settings and create a new config file manually, entering those commands one by one. Also, don’t forget to use hotkeys like alt+tab and ctrl+c/v.
The developers may address this issue and implement a proper host_writeconfig functionality in future updates. Stay tuned for patch notes and announcements.
Below, you can find the method for Counter-Strike: Global Offensive using the host_writeconfig command.

If in the game you change any settings for the radar, mouse, interface, etc. you need to save it because you already know that config.cfg will default each time you start CS: GO. This is easy to do with the console command host_writeconfig. Let’s say you want to save your current configuration with the name 123 or mycfg, then the syntax of the command would look like this:
host_writeconfig 123
or
host_writeconfig mycfg

The files 123.cfg or mycfg.cfg will be saved where config.cfg is.

No file extension required for host_writeconfig command

E:\Steam\userdata\ID#\730\local\cfg\123.cfg
E:\Steam\userdata\ID#\730\local\cfg\mycfg.cfg

You will also see the console response:
Host_WriteConfiguration: Wrote cfg/123.cfg
or
Host_WriteConfiguration: Wrote cfg/mycfg.cfg

By default, the CS: GO console is disabled. The console can be activated in the settings start CS: GO command “-console” or in the menu settings CS: GO on the tab “GAME” toggle switch to “YES” for the parameter “Enable Developer Console“.

st6

Summary

Configuration files (config files) are essential tools for tailoring various aspects of Counter-Strike 2 to your preferences, from gameplay settings to visual adjustments.

CS2 utilizes several types of config files, each serving distinct purposes:

  • Machine config files (cs2_machine_convars.vcfg) govern game-wide settings.
  • User config files (cs2_user_convars_0_slot0.vcfg) store user-specific preferences.
  • Binds config files (cs2_user_keys_0_slot0.vcfg) manage key bindings.
  • Video config files (cs2_video.txt) control visual settings.

 

Creating personal config files allows you to:

  • Save and easily apply your preferred settings across different gaming sessions either from the menu or directly from the online game.
  • Create multiple profiles with distinct configurations for various scenarios.
  • Preserve your customizations without being overwritten by game updates.

 

The process of creating and running a personal config file involves:

  • Creating a text file and then renaming the *.txt extension with a *.cfg extension.
  • Adding your desired console commands to the file.
  • Place it within the \Counter-Strike Global Offensive\game\csgo\cfg\ folder or a subfolder of your choice.
  • Executing the config file using the exec command in the game’s console from the menu or directly from the game.

F.A.Q.

What are configuration files in CS2?

Config files are text files containing commands that adjust various aspects of your CS2 experience, like sensitivity, crosshairs, and video settings.

Why use config files?

Config files offer:

  • Save your preferred settings and apply them easily.
  • Create setups for different servers or playstyles.
  • Access settings beyond the in-game options menu.
Where are the CS2 config files located?

In the Game folder:
..\Steam Library\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\
In the Steam profile folder:
..\Steam\userdata\SteamID\730\local\cfg\

What does cs2_machine_convars.vcfg do?

This file controls game-wide settings like resolution and ping, but is overwritten each game launch.

What's the difference between cs2_user_convars_0_slot0.vcfg and cs2_user_keys_0_slot0.vcfg?

The cs2_user_convars file stores user preferences like crosshairs and sensitivity.
The cs2_user_keys file manages key bindings like jump binds.

What can I adjust in cs2_video.txt?

This file controls video settings like brightness, anti-aliasing, and model/texture detail.

How do I create a personal config file?
  1. Create a text file using any editor.
  2. Change the extension to “.cfg”.
  3. Add your desired console commands.
  4. Save the file in your preferred location (e.g., ..\cfg\mycfg).
How do I use my config file?

Open the console in CS2 and type exec <filename>.cfg. Replace <filename> with your config file name and add a path if the folder is a child folder.

..\Counter-Strike Global Offensive\game\csgo\cfg\user.cfg – parent folder:
exec user.cfg
..\Counter-Strike Global Offensive\game\csgo\cfg\mycfg\user.cfg – child folder:
exec cfg\mycfg\user.cfg

! It is not necessary to specify the *.cfg file extension.

Can I share my config file with others?

Yes, you can share your config file with friends, but remember it might not work perfectly on their systems due to different hardware and preferences.

My config file isn't working, what do I do?
  • Check for typos in your commands.
  • Make sure the file path is correct.
  • Verify the file isn’t corrupted.
  • Try restarting the game/steam.
I accidentally messed up my config file, can I recover it?

If you haven’t saved any changes, simply delete the file and it will be recreated with default settings. If you have saved changes, you might need to manually restore the desired settings or create a new config file from scratch.

Where can I find resources for learning more about CS2 config files?

Online forums, community websites, and dedicated guides often provide detailed information about specific commands, advanced customization options, and troubleshooting tips.

Good Luck and Happy Frags!

Read More

Ancient map

Exploring Bots: CS2 Player’s Guide

Exploring Bots: CS2 Player’s Guide Quick Links Understanding Bots in CS2 Bot Difficulty in CS2 Optimizing for Maximum Challenge Bots Templates in CS2 Weapon pack

Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Name
12 days ago

ttst