Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make The Most Of Autoexec.cfg
#1
Introduction

In the past few days I have been messing around with scripts and stuff for CS:S. I found that you can tweak a lot of the games aspects just by editing your autoexec.cfg. If you can learn and properly use the codes that are built in to the game, you can make your CS:S life a lot easier, and a little more fun Smile


Where To Find It

WARNING : Autoexec will automatically load each time you start up CS:S. A .cfg file is basically a text file that contains a bunch of codes that CS:S will run when you type "exec ***.cfg" into console (where *** is the name of the .cfg file). You can have several different .cfg files in your cfg folder, and manually load them, or just have an autoexec.cfg with everything you want in it, which will load each time you fire up CS:S.

You will find this file in C:/Program Files/Steam/steamapps/your account name/counter strike source/cstrike/cfg. You can open it with Notepad, and its completely editable.

If you don't have an autoexec.cfg, you can make one. Open Notepad, and save the blank file as autoexec.cfg. You need to make sure that the file extension (the bit at the end that denotes what type of file it is) is .cfg and NOT .txt.

There are some simple ways to do this. You can click "Save As" and then change the file type when you are saving it as .cfg. Make sure that you select  "All Files" from the dropdown list, rather than "Text Document".

You can also manually edit it afterwards, by going into Tools > Folder Options and unchecking "Hide extensions for known file types". This makes it so that all the file extensions will appear on the end of the file names. You can just edit the name from .txt to .cfg. A warning will pop up, but just click Yes.


Now For Some Codes

Now that you have your autoexec.cfg, what will you do with it? Well, you can do loads with it. By default, when you load CS:S up, it will load your autoexec.cfg as well. If it doesn't (or you need to reload your autoexec.cfg), you can just type "exec autoexec" in console, and it will reload this. You should take this opportunity to put code into autoexec that you would need when you run the game.

I have my autoexec set up in several different sections, so it's easy for me to find any cvars that I want to change. I suggest you lay out our autoexec in a similar way to this, because if you're going to be changing your autoexec or referencing it a lot, you're going to want to be able to find the cvars easier Smile


So what kind of codes can you put in it? Well, here is what I have in my autoexec.

Note: please ignore the rates! These rates are old and the values in them are random! I DO NOT USE THESE SETTINGS, ITS JUST AN EXAMPLE


Code:
              // Rivals Settings \\               



//Console Message
echo
echo Congratulations! AutoExec Loaded! Have A Cookie :D
echo






//Rate Settings\\
cl_allowdownload "0"
cl_allowupload    "0"
cl_cmdrate    "66"
cl_downloadfilter "no sounds"
cl_interp "0.0304"
cl_interp_ratio "1"
cl_lagcompensation "1"
cl_pred_optimize "2"
cl_predictweapons "1"
cl_resend    "6"
cl_smooth "0"
cl_smoothtime "0.01"
cl_timeout "13371337"
cl_updaterate    "66"
rate    "45000"


//Crosshair Settings\\
cl_crosshairscale 4444
cl_dynamiccrosshair 3
cl_legacy_crosshair_scale 1


//Graphics Settings\\

//Map Settings
cl_forcepreload 1
mat_mipmaptextures 1
mat_vsync 0
r_decal_cullsize 2

//Heads Up Display
drawpanel
net_graph 1
hud_saytext_time 12
cl_drawhud 1

//Blood
violence_ablood "1"
violence_agibs "1"
violence_hblood "1"
violence_hgibs "1"

//Radar
cl_radartype 0
drawradar
cl_radaralpha 200




//Sound\\
cl_hudhint_sound 0
cl_language en
voice_enable 1



//Binds & Scripts\\

Binds and scripts go here (that will be discussed in another section).

Now as you can see, I have it broken up into several sections. The section name will have //name\\ and then any subheadings will just have //. This is just so that I have everything split up into smaller sections, rather than just a wall of commands. It makes it easier for me. I will explain these sections now :

Console Message

This is a message that is displayed in console when autoexec has been loaded. This can be whatever you want it to be. You use the term "echo" to tell CS:S to display the message in console. For symmetry, I put an echo before the line of text and after the line of text. You can literally write whatever you want here, but it's best to keep it short.

Rate Settings

This is all your settings that define the parameters of your connection. It basically controls how much data you are sending to the server per millisecond (ms), how much data you are downloading from the server etc. Having the wrong configuration here can cause things such as choke and lag, or cause other players to miss you (and in turn, you will miss other players). The term "bad reg" is used in this scenario, as it means "bad hit registry".

I will have to go through this in a separate thread when I have time to draw some diagrams. It's a long topic and will take a little to understand.

Crosshair Settings

This is how you change your crosshair colour, size, thickness, pretty much anything you want. The main reason I have this setting is because I use a tiny purple crosshair. You can set custom colours too.The crosshair system works on RGB decimal code. RGB is "red green blue", and by giving each of them a number value, you can change the colour of your crosshair.

I'll go into this in another thread, and link that thread at the bottom.


Graphics Settings

This section is split up into several different subsections. I have gone into some detail about the kinds of cvars you can put in this section to make your game differently. THE LINK TO THAT THREAD IS AT THE BOTTOM OF THIS POST. Please reference that Smile


Sound

Just literally anything to do with sound cvars. As you can see, I don't have many here. That's because you don't really need to set many sound cvars, everything can be set in the game.

Binds & Scripts

Underneath all of that is where I keep my binds and scripts. I have a few scripts that I use (all legal, we'll discuss that further in my next thread) and several binds (completely useless, mainly for taunting). Here is my thread talking about the basics of buy binds. More binds to come!


So that is how you should have your autoexec set out. Lots of people have extremely messy ones, which annoys me. I like to keep mine neat. If you're wondering why I use "//" before some of the lines, there is a reason. If you put "//" at the beginning of a line, autoexec won't read that line. It's useful if you want to write things in your autoexec that you don't want CS:S to attempt to read.


I can't really think of anything else that I am missing, so I will just leave you with this. Any comments or questions, just leave below and I'll answer them to the best of my abilities. I just made this thread for anyone that wanted info about autoexec, or wanted to know how to do certain things, or if moving stuff around in it would damage their game.

Here are some links to other threads I have written about stuff using cvars and CS:S scripting. You may find some of them useful if you want to start building on your autoexec, or if you just want to read a little and learn something Smile I'll organise this thread a little better once I have a few more other threads written and linked to.

Other Threads By Me About AutoExec :

Graphical Tweaking With Autoexec

How To Buy Equipment With Binds (Easy)


More to come....


NOTE : Please don't ask me to write you autoexec.cfg. I am aiming to give you all the necessary information so that you can write it yourself, and hopefully learn a little at the same time. There is a proverb that says "Give a man a fish, and you'll feed him for a day. Teach a man to fish, and you'll feed him for life". I think that's quite fitting here.
If you read this, you suck.

Messages In This Thread
Make The Most Of Autoexec.cfg - by I, The Rival - Sep 10 2011, 10:41 PM
RE: Make The Most Of Autoexec.cfg - by Bah - Sep 10 2011, 10:43 PM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 10 2011, 10:57 PM
RE: Make The Most Of Autoexec.cfg - by Bah - Sep 10 2011, 11:01 PM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 10 2011, 11:32 PM
RE: Make The Most Of Autoexec.cfg - by King_Viper - Sep 11 2011, 02:08 AM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 11 2011, 02:28 AM
RE: Make The Most Of Autoexec.cfg - by Dre@m$ - Sep 11 2011, 02:41 AM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 11 2011, 02:50 AM
RE: Make The Most Of Autoexec.cfg - by Dre@m$ - Sep 11 2011, 02:56 AM
RE: Make The Most Of Autoexec.cfg - by FenKeN - Sep 11 2011, 04:37 PM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 11 2011, 08:40 PM
RE: Make The Most Of Autoexec.cfg - by BaNaNaMaN - Sep 12 2011, 06:32 AM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 12 2011, 06:56 AM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 12 2011, 10:15 AM
RE: Make The Most Of Autoexec.cfg - by Riser - Sep 12 2011, 02:15 PM
RE: Make The Most Of Autoexec.cfg - by Dre@m$ - Sep 12 2011, 08:50 PM
RE: Make The Most Of Autoexec.cfg - by -[ex]iSpy- - Sep 12 2011, 09:38 PM
RE: Make The Most Of Autoexec.cfg - by ARYA! - Sep 12 2011, 09:51 PM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 12 2011, 11:15 PM
RE: Make The Most Of Autoexec.cfg - by BaNaNaMaN - Sep 13 2011, 06:24 AM
RE: Make The Most Of Autoexec.cfg - by -[ex]iSpy- - Sep 13 2011, 09:55 AM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 13 2011, 10:38 AM
RE: Make The Most Of Autoexec.cfg - by -[ex]iSpy- - Sep 13 2011, 09:33 PM
RE: Make The Most Of Autoexec.cfg - by I, The Rival - Sep 13 2011, 10:14 PM
RE: Make The Most Of Autoexec.cfg - by Dre@m$ - Sep 14 2011, 08:59 PM

Users browsing this thread: 5 Guest(s)