VCFG: Difference between revisions
Jump to navigation
Jump to search
Tip:It can be useful to keep situational keybinds in files other than autoexec.cfg.
Confirm:What exactly happens after exec autoexec.cfg.
(HLA (and CS2) still use .cfg in some files, such as skill.cfg. Also chapter.cfg/vcfg is deprecated in Source 2 and not used in HL Alyx or any Source 2 games. SourceVR cfg is also deprecated aswell. Source 1 stuff like config.cfg was renamed.) |
(server.cfg still has same file format as source 1.) |
||
Line 27: | Line 27: | ||
| '''listenserver.vcfg''' || Ran when a listen server is being started, and runs every time the map is changed. | | '''listenserver.vcfg''' || Ran when a listen server is being started, and runs every time the map is changed. | ||
|- | |- | ||
| ''' | | '''user_keys_default.vcfg''' || Ran when no config.cfg<!--config is still unchanged in S2 --> (in {{Path|Steam folder\userdata\[[SteamID]]\[[Steam_Application_IDs|AppID]]\local\cfg\}}) is present or when player reset Keyboard settings in game Settings/Options. | ||
| | |||
|- | |- | ||
| '''user_keys_dev_default.vcfg''' || Ran when no user_keys_default.vcfg is present or when player clicks the 'Use Defaults' button in the keyboard tab in the options panel, see [[Customizing Options: Keyboard]]. | | '''user_keys_dev_default.vcfg''' || Ran when no user_keys_default.vcfg is present or when player clicks the 'Use Defaults' button in the keyboard tab in the options panel, see [[Customizing Options: Keyboard]]. |
Revision as of 06:58, 10 February 2025
Valve Configuration file (or VCFG) is a Source 2 games text file used to execute a newline-delimited list of console commands to the Developer Console. The .vcfg file extension can be found everywhere and is not specific to Source. Some Source 2 games (such as Half-Life: Alyx), still features .cfg file extension in some files (such as skill.cfg).


File format
- Each line is considered a command. Note that each command can still consist of multiple commands delimited with the semicolon
;
. - Comments can be added by using
//
. These two characters and everything following after them is ignored by the engine until the next line starts. - Cheat commands require sv_cheats 1 enabled, otherwise they have no effect. To configure a mod's default cheat convars, VScript or point_servercommand can achieve this on map start without having to enable sv_cheats.
Files
The folder <game>/cfg/
is usually dedicated to CFG files and can be further organized in subdirectories, and referred in exec by relative path.
This is a table listing common CFG files found in mods and games alike.
CFG | Description |
---|---|
autoexec.vcfg | Ran on game start up, so one can easily create the file and put any commands that one doesn't want to type each time. |
game.vcfg | Ran every time a map is loaded. |
modsettings.vcfg | Ran on game start up, unless not found in mod folder. |
listenserver.vcfg | Ran when a listen server is being started, and runs every time the map is changed. |
user_keys_default.vcfg | Ran when no config.cfg (in ![]() Steam folder\userdata\SteamID\AppID\local\cfg\ ) is present or when player reset Keyboard settings in game Settings/Options.
|
user_keys_dev_default.vcfg | Ran when no user_keys_default.vcfg is present or when player clicks the 'Use Defaults' button in the keyboard tab in the options panel, see Customizing Options: Keyboard. |
valve.rc | Special vcfg file with the .rc extension, it's ran on game start up and executes autoexec.cfg along with a few other commands. |