First and foremost, nearly all good CS:S players have their own configuration file (.cfg for short) that they use for different environments. Such as a higher mouse sensitivity for GunGame or Surf to custom gun binds for general CS:S gaming. In this tutorial, I will be showing you how to create a Autoexec.cfg file within your Counter-Strike Source directory.
I complied quite a number of useful tips and tricks to help you create your own Autoexec.cfg OR you may use my old one and tweak it to how you see fit, either way works. If you have any questions, comments or ideas please shoot them in here. Just keep in mind that I will not take 1-on-1 help, I just don't have the time to help everyone individually, if a number of people are having the same issue then I'll update my Troubleshooting segment. I really recommend new gamers to download a working Autoexec.cfg and tweak it, once you know how it works and are comfortable to make your own, DO SO! Nothing is more awesome knowing that your own code is helping you game better, I'm a scripter and coder so I do this all the time (especially when I get bored). But enough of that, lets get cracking on this guide!
How do I find my config folder?
For those that have the standard folder (meaning it is in the Program Files (x86)), go to:
C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Source\cstrike\cfg
If you have a custom directory for your games (as in on a different hard drive for those that use SSD's), just navigate where you have your Games Folder and go from there.
What does it do?
It is a configuration file that you can use to 'tweak' your gaming styles or have custom binds, in default you do not need this to play CS:S but it does come in handy especially when you play any different mods (zombiemod especially). In general, you can add anything from: notes, binds, configuration tweaks, voice-commands, and HUD displays. When you load into CS:S, a file called 'config.cfg' will automatically load by default if the Autoexec is not found. If you add/change/edit/remove anything from the console this is where most of your configurations will be found. This is great and all but that's quite a bit of data within that file as well as that if you mess up your configuration file will load up funny and may not work (if this happens, don't fret just remove that file and reload into the game, it'll auto generate a new one!)
What do I need to know?
Make sure that you know how the syntax works in making a Autoexec file, for example:
- // == Means that this is a comment in the code, meaning you can add your notes to the code that you will understand. The computer will disregard it and ignore it as it is a 'comment'
- bind == This is your general binding key, whenever a key on the keyboard is pressed an action/event/command will be triggered. Example: bind "p" "say Rush Garage" will say in general chat to Rush Garage whenever the Key 'P' is pressed
- alias == If you want to create a multifunction command, the alias can be used to trigger another event/action/command (***NOTE: This is generally used for expert users ***)
- clear == This will clear your console, whatever was originally on it before will be erased.
- echo == This will display anything back into the console, so if you want to make sure that your Autoexec.cfg is completed make sure to add at the end an echo followed by a ending statement. This will tell you if it worked or failed, you can echo anything that you want just make sure to add the "" before and after the string otherwise the code may fail and won't work.
Now these are just your basic commands that you would need to know. There are hundreds of configurations and events that you can create, I will not list them all as that would literally take up to 4 posts to name them all.
Lets create a Autoexec.cfg file
First, lets use a notepad of your choice (if you are a coder/scripter, you can use your scripting notepad like Notepad++). And lets do the following:
- First, lets put in // This is my custom Autoexec.cfg file!
- Move your mouse to 'File' and click on Save-As
- Navigate to your Counter-Strike Source\cstrike\cfg folder (look above for the path), and you should see quite a number of .cfg files within it.
- Change the 'File Name' to 'Autoexec.cfg'
- Change the 'Save as type' to 'All Files (*)' what that means is that it'll save the file as a file, since we put the .cfg at the end it will save the file as a .cfg file instead of a .txt (if you forgot this, don't fret. The file is still there, you just have to change the file association from whatever it is to '.cfg'
- And we're done! You just now created your first Autoexec.cfg file
- This what it is suppose to look like when Save As
Please keep in mind, if you mess something up in your Autoexec.cfg file it is very easy to fix and I really recommend making copies of every new edit/change!!!!! It sounds dumb I know, but if you keep a backup of your working Autoexec.cfg and make a change now everything is messed up, you can revert back to the original and reload it back into the game as if nothing happened, this'll save you butt in many problems.
So I created my Autoexec.cfg, now what?
Now you need to figure out exactly what you want in it, maybe a few custom binds for saying Rush Garage/Front Office, or maybe a bind to get rid of those annoying "Fire in the Hole' radio chatter? Or how about making sure you have the correct rates every time you log into a server? Look below for some examples.
// This is my first Autoexec.cfg file
echo "*** Autoexec.cfg is now loading ***"
cl_righthand "1"
cl_showfps "300"
net_graph "0"
fps_max "999"
cl_cmdrate 101
cl_updaterate 101
cl_interp 0.01
rates 30000
bind "\" spectate
bind "h" sm_admin
bind "m" ignorerad
sv_voice 1
bind "p" "say_team Rush Garage!!!!"
bind "[" "say_team Rush Front Office!!!!"
echo "*** Autoexec.cfg has been loaded ***"
Now this is just an example of an Autoexec.cfg file, very bare and basic but in general that's what you really need. Don't try to go overboard and mess up your configurations, always see what each command can do. A good site to check for any Autoexec.cfg commands is Autoexec Help, now it says its for CS:GO but most of the command should work within CS:S just keep an eye out for the console. It will display any errors there and you can tweak it once again.
Troubleshooting?
- HELP! I cannot revert my old configs back!
* To fix this, make sure to delete/remove/move the Autoexec.cfg from the /cfg folder. If you have a backup or copy, use that and reload back into the game, if not then continue. From there delete your config.cfg file as well and go into your steam settings, go to your game within Steam Library and right-click on that game. Click on properties and go to UPDATES, from there uncheck the Steam Cloud and press OK. Reload back into the game and a new configuration file will be created.
- My Autoexec.cfg file isn't loading properly?
* Make sure that you have the proper syntax within the Autoexec.cfg file, if not then you'll run into errors which may or may not cause it to fail. Always use a notepad of some sort and take your time on working on this. Speeding through coding will almost guarantee an error down the road.
- Some of my commands are not working?
* Double-check your spacing, comments, and quotes. Chances are you may have forgotten one or added an extra by accident. Fat fingering is very common and happens to the best of us. I've made at least 20 errors like that before, and by now you'd think I'd double-check but nope lol!
- I have an error with one of my variables?
* Check to see if that variable can go that high in the first place, an example is that fps_max can only go up 999. Any higher and the game has no clue what the hell 9,000 (Vegeta's scouter knows but the game doesn't). Keep records in comments what the default was prior to your change this way you can revert back to that in a case of an error. Remember that comments are your best friends!!!!!!!!!!!!!!!!! I cannot stress this enough, I don't mind if your code is 112 lines long but only 24 of those lines are real code (meaning that the others are comments), this is your Autoexec.cfg are you gonna remember what you did 4 months ago? Make those comments!
- How do I test my Autoexec.cfg?
* Load into a private server (so create one with 1-5 bots) and test it, chances are if it works there it will work on any public server. Please keep in mind that you should use your judgement when use binds. If you spam it you will be dealt with, so be smart when you game.
Download
This is my custom Autoexec.cfg file, it is outdated and has very little binds that I use. However it is a very good to show the different variants that I use and you are more than welcome to use it as you see fit. If you want to remove something, don't actually remove it but add // in front of that line, the computer will ignore that line and skip to the next one, very rarely should you have to remove anything unless you hate seeing unnecessary lines of code. Cpt. Brenner's Autoexec.cfg.
Disclaimer
Due to the fact that this is open for the public, if you decide to use it please make sure to note who created it. I've spent quite a number of hours researching and testing out most of that so that anyone may use it as a public service, I will find you. I took some segments from other Autoexec.cfg I've found online. If you have some new tweaks that you want added, just pm them to me and I'll add it to an updated version.
Thank you very much for reading my first guide, if you found it useful give me a like I guess and make a comment what I need to improve on.
-Signed Cpt. Brenner
Bookmarks