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.
#2
You coding nerd.
You stole meh crosshair crap Tongue
[Image: 2zecl8z.png]
#3
In all fairness, you did tell me to set my crosshair to that. Everything else is me though.
If you read this, you suck.
#4
I, The Rival Wrote:In all fairness, you did tell me to set my crosshair to that. Everything else is me though.

Eh, the only thing that can really help you ingame is what I gave you, using the crosshair stuff and also fast buying.
[Image: 2zecl8z.png]
#5
Bah Wrote:
I, The Rival Wrote:In all fairness, you did tell me to set my crosshair to that. Everything else is me though.

Eh, the only thing that can really help you ingame is what I gave you, using the crosshair stuff and also fast buying.

I am yet to import my buy binds into autoexec.cfg (I was actually going to do that tonight).

Also the first post is going to get heavily edited, because I'd like to have this thread as the main thread, and then have other threads linking off of it, so I can do better guides and explain why stuff is the way it is.
If you read this, you suck.
#6
very good rival, you took my post http://war-lords.net/counter-strike/css-.../#msg13298
a step further.
Big Grin
/clap
[Image: 171148_101.png]
DEAGLE > EVERYTHING
#7
King_Viper Wrote:very good rival, you took my post http://war-lords.net/counter-strike/css-.../#msg13298
a step further.
Big Grin
/clap

Cheers man. If I credit you, would you mind if I used the info from your buy binds thread when I update this thread? I've still got a few others to do, but it's going to take a little time. I just want to get it done so nice that everyone will understand how to do these things Smile
If you read this, you suck.
#8
it looks like it is in a Batch file Format. you use Echo for displaying something like this


@echo off
echo welcome %username%
echo time is %time% and the date is %date%
pause
to use:
[list type=decimal]
[*]when you save this switch file type to any
[*]type you name with a .bat at the end (exp :welcome.bat)
[/list]
~The lonely Stoner seems to free his mind at night~
#9
Dre@m$ Wrote:it looks like it is in a Batch file Format. you use Echo for displaying something like this


@echo off
echo welcome %username%
echo time is %time% and the date is %date%
pause
to use:
[list type=decimal]
[*]when you save this switch file type to any
[*]type you name with a .bat at the end (exp :welcome.bat)
[/list]

I haven't done that much scripting with .bat, you can write those scripts with vbScript though right? I used to make ones that wiped hard drives, and my friend and I had wars over who could mess up each others laptops the most with a vbscript. Good times.

A lot of the coding for writing these scripts hinges on a small list of preset commands. You can pretty much do anything with just a few commands (like bind, incrementvar etc) so I don't think it's as complex as .bat, but I think there are some similarities between the two.

You done much CS:S scripting, Dreams?
If you read this, you suck.
#10
no i dont do as much scripting as i want to.I want to learn VB,java,CSS,HTML in laster years i wish i could get CSS i just have to save up for a steam version so my dad will let me download it but the big problem is School i dont want to waste all my time on a computer.i going to get our old comp(With no internet for 2 more years) i think i get Vb.net for dummies so i just code out of that.I hope to get VB down.I know to make any good bots,or any thing that has a internet connection you need to know C++ for the sockets.bat isnt that bad i mean it can drop the a-bomb on you but that only if you dont know what you are doing..
~The lonely Stoner seems to free his mind at night~

Users browsing this thread: 4 Guest(s)