- Details
- Written by: Webmaster
- Category: DoD:s Console Commands
- Hits: 3290
This is about the file autoexec.cfg file.
What it is used for and some typical examples of what you can place inside it for Day of Defeat: Source.
| Section | Description |
| What it is (for new players only) and a download to start you off. | |
| Most know this so... (for new players only) | |
| How to avoid making mistakes and spot errors when it all goes wrong | |
| Examples of some dod:s community supplied files | |
| [DoDS] Competitive Player Config 26-12-2024 |
You can download a simple example here ready to place commands in.
OR... here is how to make one from scratch manually and where to place it.
The autoexec.cfg file is used to store commands normally used in the config.cfg a file that has game settings.
This is actually a text file and editing is simple. There are many uses of ".cfg" file types in source games.
You can find a "config.cfg" file by going to your "dod\cfg" folder this way...
Viewing this file type is commonly done via your operating system default text file editor e.g.: in Windows this is Notepad.
You may notice that when you click on one for the first time there isn't an editor associated with that file type.
Just right click on the file, select "Open with" and choose "Notepad", then Press the button "Always" to associate the file type with Notepad to always open with that editor when clicking on it.
Alternatively you could download NotePad++ for a advanced text editor. Same process for associating it but you will have to select the "Choose a app on your PC" button and browse to C:\Program Files\Notepad++ and "notepad++.exe" to associate the editor.
Look at the config.cfg file, basically its a list line by line of commands.
The game engine reads each line one by one and applies the commands to the server you are starting up.
The autoexec.cfg is not there but the config.cfg file is like it. In fact anything you place in a autoexec.cfg will load after the config.cfg file and overrule any commands previously sent.
That is the purpose of this file, the final say of your personal settings in a file you can store away so you don't have to keep remaking it.
As you found out a "configuration" or ".cfg" file type normally goes in the dod\cfg folder but you may find them in other places.
The simplest way to make any .cfg file is just to copy another one, paste it in the same folder and rename it to what you want.
From a raw format you...
All that did was alter the extension of that file type from the native .txt file type to a .cfg file type.
The placement options.
The default location "dod\cfg" isn't the only place you can place the file. It isn't always the safest either.
It may get wiped out in a update, so maybe keep your custom files stored away safe and backed up somewhere.
The dod\custom folder
Source games like DoD:S support a feature where you can install almost any custom file like maps, materials and files like these.
How it works is the "dod\custom" folder acts the same as a "dod" folder. You place files in the same way you would put them in the "dod" folder.
e.g.: go to the "dod\custom" folder, make a new folder named anything you like but avoiding spaces most special charterers in the file name.
Then in that folder make another folder "cfg" place the autoexec.cfg file there and the game engine will read it.
Read the "readme.txt" in the folder to get an idea of what to place there.
I made my folder "1_config-files" as I can always find it at the top of the dod\custom folder.
The format of a .cfg file has some simple rules.
As we know the game engine reads line by line and will apply the commands found on every map start.
We humans may need a explanation of what the command does, there is a way to do titles and comments in the file.
In the example below I want to store some commands and personal binds.
Note how I have "commented out" a line for a title using this at the line start... "//"
I also used that after a command on the same line.
The engine will get to that "//" and ignore anything past that and move to the next line.
// INsanes autoexec.cfg
// My preferred commands
hud_fastswitch "1" // allows you to change weapon by pressing the key assigned to it
// My preferred binds
bind "F11" "sm_admin" // To give me the admin panel on my home game server bind "MOUSE4" "voice_medic" // Use this for the medic plug in on my home server
echo "INsanes autoexec.cfg loaded"
Errors...
Now if I made a mistake like missing the "//" on a line, that command and ones after that will break and sometime the game console will report an error as it reads the file.
Look for those errors in the console as they give you a clue where the mistake is in the file.
It is extremely easy to make a mistake. be neat, check each line you make.
Note the values in a command is surrounded by quotes "1" you can exclude them in a .cfg file type but typically look at the config.cfg and how they are formatted and follow that.
Confirm your file works...
You may see this at the end of a file echo "some words" the "echo" command prints what ever words you like in the game console, handy if your want a confirmation that your file is actually working and in the correct place.
Typically you would place things in this file like your keyboard binds, to get an idea of what is placed in them look at the config.cfg.
But you can also place scripts in there too.
Looking at the example in this steam guide we can see one using the "alias" command...
//Duck script.
//A duck script that will allow you to duck without holding a key. alias duck "duckON" alias duckON "+duck; alias duck duckOFF" alias duckOFF "-duck; alias duck duckON" bind "F10" "duck"
The cycle continues that way.
This replaces the default key for "+duck" (normally the "CTRL" key and lets you crouch) if you let go of the "CTRL" key the engine sends the command "-duck" . The + and - in front of commands means a temporary on and off pressing keys down and letting them go
In this case pressing the F10 key you are permanently crouched until you press the F10 key again. The script has given you an alternative key for crouching in the game.
Scripts for source games can be complex and break easy, there are many examples and some are good and some bad.
Lets look at what some community members use in this file next, be careful with someone else's autoexec.cfg file, they can alter your game for the better or worse.
Knowing what commands do is the first step... maybe this will help.
The below code block is direct from bulletlottery's downloads (26-12-2024) He is a competitive player with server admin with 20 years experience. He studies this all the time and plays a lot of Source and GoldSource titles.
A warning on the use is that some keyboard binds are inserted and you should review anything in yellow text before committing it to your file.
//[DoDS] Competitive Player Config //26-12-2024 // Launch CMDS -novid -nojoy -nosteamcontroller // MANDATORY CVARS // Cvars required for competitive league play r_shadows "0" r_shadowrendertotexture "0" r_shadowmaxrendered "0" r_drawdetailsprops "1" cl_predictweapons "1" cl_mouselook "1" // Mouse // m_rawinput 1 zoom_sensitivity_ratio 1 // Netcode // rate "786432" cl_cmdrate "101" cl_updaterate "101" cl_interp "0" cl_interp_ratio "0" cl_smoothtime "0.1" cl_smooth "0" cl_lagcompensation "1" cl_lagcomp_errorcheck "1" cl_predictweapons "1" // Lerp Binds ( lerp 0 for good server/league play and use lerp 33 for bad server if ping is above 100 )
bind "f1" "cl_interp 0;cl_interp_ratio 0" bind "f2" "cl_interp 0.033;cl_interp_ratio 2" // Frame Rate Cap ( never let the game go over 1000fps or it will bug out )
fps_max 999 // Gun Sway and Bob
cl_bob "0" //weapon bobbing cl_wpn_sway_scale "0.5" //weapon gun sway // Quality of life cvar - some very common cvars
cl_forcepreload 0 // Preloads textures and content before playing ( on some systems can cause stutters if on ) cl_allowdownload 1 // allows for your game to download custom server files cl_dynamic_crosshair 0 // turns off crosshair animations con_enable "1" // console enable cl_showhelp 0 // turns off help tips net_graph "1" // enable net_graph net_graphpos "2" // net_graph positioning hud_classautokill "0" // disable suicide when switching class hud_fastswitch "1" // allow you to change weapon by pressing the key assigned to it cl_show_achievement_popups "0" // disable achievement popup cl_autorezoom "0" // disable autorezoom with sniper cl_autoreload "1" // reload automatically when out of bullet cl_enabledeatheffects "0" cl_enabledeathfilmgrain "0" cl_enablespectatoreffects "0" dod_playrivalrysounds "0" // disable domination & revenge music dod_playachievementsound "0" // disable achievement music dod_playwinmusic "0" // disable winning round music // Graphic boost
mat_queue_mode 2 // force the game to use all cpu core/threads mat_filmgrain 0 // disable filmgrain effect mat_motion_blur_enabled 0 // disable motionblur mat_hdr_level 0 // disable HDR effect r_3dsky 1 // enable or disable skybox - fps boost if disabled but can be used for grenade lineup r_renderoverlayfragment 0 // fps & clarity boost. Add or remove decoration like rugs etc // Minimap - those allow you to tweak your minimap overview_zoom "1.5" // zoom on minimap overview_alpha "0.2" // opacity of the minimap - [0.0 - 1.0] overview_health "1" // 1 will display health of teammate overview_names "1" // 1 will display name of teammate overview_locked "1" // "0" = rotation // Killfeed - those allow you to tweak your killfeed cl_deathicon_height "5" // height of the icon in your killfeed cl_deathicon_width "30" // width of the icon in your killfeed cl_deathicon_bg_alpha "1" // opacity of your killfeed [0.0 - 1.0] // Quality of life binds - change YOURKEY by the key you want to assign. bind "YOURKEY" "say_team %t" // gives you the time remaining in teamchat / %h will give you your current hp / %l your location / %c your class. bind "YOURKEY" "+overview_largemap" // the map will largely appear in your screen and will go back to corner/disappear when releasing the key. bind "YOURKEY" "r_cleardecals" // if you have decals such as blood, bullets, explosion on the maps, this bind will remove them. // Jump throw script (applies to heavy/assault class only) bind "YOURKEY" "+jump; -attack; -jump" // Sound Restart (removes bugged sounds like burning/water) usually happens only in pub serv when someone is in spec. alias +bugsound "snd_restart" alias -bugsound "say_team bugsound" bind "f8" "+bugsound" // Rifle grenade - works with sv_cheats 1 on lan or on your server. Allows you to generate grenade to train lineups. alias "+nade" "give weapon_frag_ger;give weapon_frag_us;give weapon_riflegren_ger;give weapon_riflegren_us" alias "-nade" "slot2" bind "YOURKEY" "+nade" // Heavy grenade - same as above with us heavy/assault grenades. give weapon_frag_ger;give weapon_frag_us bind "YOURKEY" "give weapon_frag_us" // US grenade bind "YOURKEY" "give weapon_frag_ger" // Axis grenade // Damage in console - those cvar will give you the recap of the damage you've done in the topleft corner of your screen without needing you to look at your console. con_filter_text "Damage given" con_filter_text_out "Player:" con_filter_enable "2" developer "0" // Screenshot - screen will appear in C:\Program Files (x86)\Steam\steamapps\common\Day of Defeat Source\dod\screenshots // Screenshot - you can also use steam build-in function (F12 by default)
jpeg_quality 100 bind f12 jpeg clear clear echo "[DoDS] Comp Player AUTOEXEC LOADED!!"
There are more examples to be found here, a spreadsheet with links to some top comp' players and what they use.
Designed by INsane Webmaster - dodbits.com using Template Toaster (Joomla! Version 4)
