CSS autoexec.cfg

Sectionsupdated steampipe

Basic description

So why have another config file?

How to make one

Filling it up with good stuff... not bad !

Points on the text formatting used in a .cfg file

SteamPipe changes how it works

Basic description. The autoexec.cfg file is a file much like the config.cfg file that holds settings for the player in the local game directory...

cstrile\cfg or for proper SteamPipe use cstrike\custom\folder name\cfg . More on those dual addresses later and what that means for commands inside each file.

The .cfg format is widely used in a lot of programs not only Source games...

The CFG file type is primarily associated with 'Configuration'. A configuration file that is usually created when you change some settings in a program that uses .

So it holds settings, most can be adjusted by the "Options" screens and when you press a button there it writes to the file in cstrike\cfg\config.cfg

So why have another config file? The benefits of installing your own second personal config file and editing it are many, the config.cfg can get very screwed up, it does not hold all possible settings, can be overwritten accidentally.

However, place another file in there with a name of autoexec.cfg in there and it will make sure that no matter what is in the config.cfg... the autoexec.cfg file has the last say when loading the game. 

So think of the autoexec.cfg as your file you can only change by manual edits and no mater what, will load the commands you want on every map change....even though you or something else may have accidentally changed the config.cfg.

How to make one. You can download one, you can manually make one in good ole' NotePad too... or you could just go to the cstrike\cfg folder copy the config.cfg and rename it to "autoexec", empty it (Edit, Select All, Edit, Delete) and place in some basic netcode settings...

Here are the commands for each of the main cvars for Netcode, based on a normal DSL connection, (change for other speeds of course)...

echo Autoexec.cfg loaded . . . . .
// Basic autoexec.cfg   
// delete the // backslash in front of the command to enable and adjust the value to suit
//- Max bytes/sec the host can receive data
rate 30000         //( def. "10000" )
//- Max number of command packets sent to server per second
cl_cmdrate 66      //( def. "30" ) min. 10.000000 max. 100.000000
//- Number of packets per second of updates you are requesting from the server
cl_updaterate 66  //( def. "20" )
//- Sets the interpolation amount (final amount is cl_interp_ratio / cl_updaterate).
cl_interp_ratio 2 //( def. "2.0" )
// - Sets the interpolation amount (bounded on low side by server interp ratio settings).
cl_interp 0.1    //( def. "0.1" ) min. 0.000000 max. 0.500000> 

 ...then save it.

Filling it up with good stuff... not bad! The next thing is to enter commands, that's the tricky bit and there is lots to know...

  • What command is relevant to what I want to change?
  • What are the Min - Max settings (range) of that command?
  • Is it a cheat?
  • Is it a server command that would have no effect?
  • Has an update just changed the command or range of the values?

It is a matter of knowing what each one does. Take this seriously, don't just download a config and place it in, understand what each command does and then place it in... honestly some people put heaps of stuff in config files and have no idea what they do, look out for them they will do more harm than good.

I do have guides to cvars, (commands) on this site, start there, Google and YouTube is often good places to look as well, understanding what just one does (recording the results of that particular command is not good, but does show basically what happens) or the other strange effects you can get from changes can take a while! Like the download of someones config... trust your own eyes after you tested, then put it in your file.

Points on the text formatting used in a .cfg file. You may see the echo command, (adds a blank line if used alone and displays words after it)  used at the top, this displays what is beside it in the game console...lets you know a config file is seen and is now loaded by the engine...

Code:console output config
echo Autoexec.cfg loaded . . . . .

 ...you will see this in your game console after you start up.

You may also see some backslash "//" double comments on some lines, the words after that are notes, the game engine reads each line in the file. Should there be a "//" at the start of a line, all the text after that will be ignored and it moves to the next line.

echo Autoexec.cfg loaded . . . . .
// Binds This is ignored by the engine because of the backslashes in front
net_graph 1 // That command gives net graph 1 but engine ignores this text

Build this with that in mind, one command or set of commands  per line, then move to the next line.

You may have noticed I said "set of commands", that is correct even though the engine is reading line by line we can place in more than one command per line... if you like.

Say I wanted to make my Net graph in the middle and move it up a bit.

  • net_graphheight 64 is the default and net_graphheight 100 will move it up the screen a bit.
  • net_graphpos 1 is the right side position and net_graphpos 2 is the middle.
echo Autoexec.cfg loaded . . . . .
// Binds This is ignored by the engine because of the backslashes in front
net_graph 1 // That command gives net graph 1 but engine ignores this text

net_graphheight 100; net_graphpos 2 //Positions my graph middle and up a bit

As you can see there in the last line I have 2 commands. The format used to seperate them is a ; and then a space, then start the next command. How many can you have? I honestly do not know but it is more than you would care to do like this.

Here are commands for a set High FPS graphical settings...

 //ESL DBlocker Safe - FASTER FPS ESL and DBlocker safe CVARS
r_lod 2; r_staticprop_lod 3; r_3dsky 0; r_occlusion 0; r_dynamic 0; r_worldlights 0; r_lightaverage 0; r_maxdlights 0; r_PhysPropStaticLighting 0; r_decals 64; r_drawbatchdecals 0; r_drawmodeldecals 0; r_maxmodeldecal 5; r_drawflecks 0; r_renderoverlayfragment 0; r_drawdetailprops 1; r_shadowrendertotexture 0; mat_reduceparticles 1; mat_filterlightmaps 1; mat_filtertextures 1; cl_phys_props_enable 0; cl_detaildist 1200; cl_detailfade 400; rope_smooth 0; rope_rendersolid 1; props_break_max_pieces 0; func_break_max_pieces 0; cl_bob 0.002; cl_bobcycle 0.8; cl_bobup 0.5; net_graph 0 ; snd_mixahead 0.1

 It is much better to make them line by line and write down what each one does. If one of the commands in that huge string changes, it is hard to find and a little messy.

You can see now there are rules and you can not just plonk in any old text any way you like and expect it to work.

  • Grammar of the commands must be correct net_graph 1 will work  netgraph 1 will not it is missing "_"
  • Spaces are important net_graph1 will not work. An extra space net_graph     1 will work ... but is messy.
  • Capitals are allowed in the console... but again write the command like it is supposed to be.
  • Values do have a limit like net_graph 0, 1,  2, 3 and 4 but not 5 . Learn the limits, (range) of the command.
  • Be neat, if you lay out the commands nicely you can find them quickly

SteamPipe changes how it works. SteamPipe changed the places we can put the file and also the order it loads.

You can now have multiple autoecec.cfg files.

If you place a autoexec.cfg in a "cstrike\custom\my_second_confg\cfg" it is like a second file for commands.

One of the options in my latest set of HUDs needed a autoexec.cfg file for demo scripts...

//INsanes 10 Demo script, put here by the NSIS Installer automatically :) dodbits.com
alias demotoggle "demo_1"
alias demo_1 "record demo_1; echo demo_1 Recording; alias demotoggle stoppingdemo_1"
alias stoppingdemo_1 "echo demo_1 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_2"
alias demo_2 "record demo_2; echo demo_2 Recording; alias demotoggle stoppingdemo_2"
alias stoppingdemo_2 "echo demo_2 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_3"
alias demo_3 "record demo_3; echo demo_3 Recording; alias demotoggle stoppingdemo_3"
alias stoppingdemo_3 "echo demo_3 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_4"
alias demo_4 "record demo_4; echo demo_4 Recording; alias demotoggle stoppingdemo_4"
alias stoppingdemo_4 "echo demo_4 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_5"
alias demo_5 "record demo_5; echo demo_5 Recording; alias demotoggle stoppingdemo_5"
alias stoppingdemo_5 "echo demo_5 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_6"
alias demo_6 "record demo_6; echo demo_6 Recording; alias demotoggle stoppingdemo_6"
alias stoppingdemo_6 "echo demo_6 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_7"
alias demo_7 "record demo_7; echo demo_7 Recording; alias demotoggle stoppingdemo_7"
alias stoppingdemo_7 "echo demo_7 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_8"
alias demo_8 "record demo_8; echo demo_8 Recording; alias demotoggle stoppingdemo_8"
alias stoppingdemo_8 "echo demo_8 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_9"
alias demo_9 "record demo_9; echo demo_9 Recording; alias demotoggle stoppingdemo_9"
alias stoppingdemo_9 "echo demo_9 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_10"
alias demo_10 "record demo_10; echo demo_10 Recording; alias demotoggle stoppingdemo_10"
alias stoppingdemo_10 "echo demo_10 Stopped; wait; wait; wait; stop demo; alias demotoggle demo_1"

So that's fine but to place that in a autoexec.cfg file and put it in the users cstrike/cfg directory ...it would overwrite their file, that's bad.

Not required now. You can make second autoexec.cfg and place it in "cstrike\custom\folder_of_any_name\cfg".

It uses the scripts in this second autoexec.cfg... and all the commands in the other one like favorite binds video settings and such.

SteamPipe loads files and will look in all places of the game directory in this case "cstrike". A hint of what files it loads first is found in the cstrike\gameinfo.txt file.

  1. cstrike\custom and all folders under that is the first place it loads files...and the contents in this case commands inside all files named autoexec.cfg.
  2. There may be more that one autoexec.cfg files in cstrike\custom. In that case the one that has the first file name that is numerical or alphabetically first like cstrike\custom\1A_config\autoecec.cfg will load commands in it and others named cstrike\custom\9Z_config\autoecec.cfg may have the same commands with a different value... but they will not load if the first one is already loaded.
  3. Next the engine will look at cstrike\cfg\autoexec.cfg and it is the same as above, if there are commands in files already loaded the value of those commands will not be set as the first one loaded takes the lead.
  4. However, if commands in all the autoexec.cfg files are different ones they will all load.

So as you can see, the best name for a folder in cstrike\custom may be one called "a1_my_config".

That one would always load, just in case some fool placed in a autoexec.cfg in a custom file called "pony_config", you downloaded it, now it has reversed your mouse settings, graphics. If your folder is numerically and alphabetically first say "anti_pony_config" your commands will be set.

But if some of the "pony_config" has different commands yours have not they will load.

Enter Amount

dodbits.com Copyright © 2011. All Rights Reserved.