[HOWTO] autoexec.cfg & scripts
5 posts
• Page 1 of 1
[HOWTO] autoexec.cfg & scripts
Jonny and Beckham, at least, wanting to know more about this strange animal, i make this fast small howto^^
first of all, why an autoexec.cfg ?
this file is loaded when you launch the game, so each line you put in is loaded at start, and with this file you can't loose your config (especially if you take time to make saves ). moreover, if it isn't loaded when launching the game, you just need to type /exec autoexec.cfg in console to load it..
and just a little thing before starting : i recommand you to use Notepad++ to edit your files, it's really better than zindow$ notepad and it's free
well, let's go :
1- create a new file in your mod folder (noquarter, etpub, etpro, as you want^^) called autoexec.cfg edit it and just writte this lines
2- create a new file in same mod's folder and call it binds.cfg
writte in all your binds. this file will be loaded by autoexec.cfg at start of game, so you can't loose your binds with this method.
3- create a new file (always in same folder) and call it config.cfg
writte in all your configs not standards (so, each config you have changed, writte it in this file) like field of view, mouse sensitivity or lagometer on...
4- that's all, just launch the game and enjoy
i give you here MY files and add comments when useful, so you have an exemple and can see how it work.. but i don't put all others files called by this ones, my config is a little tortuous !^^
binds.cfg :
ok, let us detail a little the first script :
set swtoggle "vstr swon"
here we define the variable swtoggle and give it the value swon (i choose names, here it's star wars toggle and star wars on, you can give names you want )
set swon "echo ^<SW ON; name ^2-^<|^2PS^<|^2-^<Yoda; exec yoda.cfg; set swtoggle vstr swoff"
when the variable swtoggle is on swon the script do :
echo ^<SW ON <- print SW ON in left of screen, then you know the script work and wich name you load.
; <- the semicolon is used to say we want to give another command.
name ^2-^<|^2PS^<|^2-^<Yoda <- change the name.
exec yoda.cfg <- load the file yoda.cfg where new binds are defined.
set swtoggle vstr swoff <- we give to swtoggle the value swoff, then if we press the key again the script will execute swoff
bind F8 "vstr swtoggle"
just bind the variable to a key.
you can add as many lines as you want with this kind of scripts, and do kind of scripts you want, just make work your imagination !
here a maxFPS switcher with 3 settings for exemple :
configs.cfg :
here i just give you useful configs, this file is really too big to give it here
well, with this and your configs you can now make your own autoexec.cfg and never loose again your configs !^^
Edit : you're welcome Jonny & Ichi
Edit² : ok, now i hope it will be more simple to understand.. btw, you can pm me if you have problems, i would answer as quickly as possible
first of all, why an autoexec.cfg ?
this file is loaded when you launch the game, so each line you put in is loaded at start, and with this file you can't loose your config (especially if you take time to make saves ). moreover, if it isn't loaded when launching the game, you just need to type /exec autoexec.cfg in console to load it..
and just a little thing before starting : i recommand you to use Notepad++ to edit your files, it's really better than zindow$ notepad and it's free
well, let's go :
1- create a new file in your mod folder (noquarter, etpub, etpro, as you want^^) called autoexec.cfg edit it and just writte this lines
- Code: Select all
set name "^?-^S|^7P^9S^S|^?-^7Memnoch" //just set the name
exec binds.cfg //call the file binds.cfg
exec config.cfg //call the file config.cfg
2- create a new file in same mod's folder and call it binds.cfg
writte in all your binds. this file will be loaded by autoexec.cfg at start of game, so you can't loose your binds with this method.
3- create a new file (always in same folder) and call it config.cfg
writte in all your configs not standards (so, each config you have changed, writte it in this file) like field of view, mouse sensitivity or lagometer on...
4- that's all, just launch the game and enjoy
i give you here MY files and add comments when useful, so you have an exemple and can see how it work.. but i don't put all others files called by this ones, my config is a little tortuous !^^
binds.cfg :
- Code: Select all
unbindall //remove ALL binds, so we have to set ALL binds in this file
// name switcher for Millenium Falcon -> change name and load news binds with differents colors
set swon "echo ^<SW ON; name ^2-^<|^2PS^<|^2-^<Yoda; exec yoda.cfg; set swtoggle vstr swoff"
set swoff "echo ^fSW OFF; name ^?-^S|^7P^9S^S|^?-^7Memnoch; exec mem.cfg; set swtoggle vstr swon"
set swtoggle "vstr swon"
bind F8 "vstr swtoggle"
// servers -> load binds with servers rules
bind leftarrow "exec ps1.cfg ; echo ^7P^9S^S#1 ^floaded"
bind downarrow "exec ps2.cfg ; echo ^7P^9S^f#2 ^Sloaded"
bind rightarrow "exec a12s.cfg ; echo ^1[a12s] ^floaded"
// chat
bind f "vsay hi ^fHello [p]"
bind g "vsay_team hi ^fHey [p]^f, i have something for you !"
bind h "say ^1[s]hp !"
bind i "vsay Oops ^6(.)(.)"
bind j "vsay_team thanks ^VThank you sexy nurse [r]"
bind o "vsay HoldFire ^1Hey [d]^1, can't you just say sorry when you teamkill ??"
bind p "vsay welcome ^8You're welcome Honey !^^"
bind r "vsay thanks"
bind b "mp_fireteammsg"
bind t "messagemode"
bind u "messagemode3"
bind v "mp_quickmessage"
bind y "messagemode2"
// moves and gameplay
bind 0 "weaponbank 10"
bind 1 "weaponbank 3"
bind 2 "weaponbank 2"
bind 3 "weaponbank 1"
bind 4 "weaponbank 5"
bind 5 "weaponbank 6"
bind 6 "weaponbank 7"
bind 7 "weaponbank 4"
bind 8 "weaponbank 8"
bind 9 "weaponbank 9"
bind MOUSE1 "+attack"
bind MOUSE2 "+moveup"
bind MOUSE3 "weapalt"
bind MOUSE4 "+zoom"
bind MOUSE5 "+reload"
bind MWHEELDOWN "weapprev"
bind MWHEELUP "weapnext"
bind a "+moveleft"
bind c "+movedown"
bind d "+moveright"
bind e "+leanright"
bind q "+leanleft"
bind s "+kick"
bind k "kill ; play sound/player/gib.wav"
bind w "+forward"
bind x "+back"
bind z "+prone"
bind SHIFT "+sprint"
// sprint switcher
set beginsprinting "echo ^1Sprinting ON; +sprint; set sprinttoggle vstr endsprinting"
set endsprinting "echo ^fSprinting OFF; -sprint; set sprinttoggle vstr beginsprinting"
set sprinttoggle "vstr beginsprinting"
bind CAPSLOCK "vstr sprinttoggle"
// HUD
bind TAB "+scores"
bind ESCAPE "togglemenu"
bind SPACE "+activate"
bind , "mapzoomout"
bind . "mapzoomin"
bind - "zoomout"
bind = "zoomin"
bind ~ "toggleconsole"
bind l "openlimbomenu"
bind m "+mapexpand"
bind ALT "+stats"
bind CTRL "+topshots"
bind F1 "vote yes"
bind F2 "vote no"
bind F3 "ready"
bind F4 "notready"
bind F11 "autoscreenshot"
// on/off demo switcher
bind F12 "vstr demotoggle"
set demostop "set demotoggle vstr demostart; stoprecord"
set demostart "set demotoggle vstr demostop; autorecord"
set demotoggle "vstr demostart"
// Fireteam
bind KP_LEFTARROW "selectbuddy 3"
bind KP_5 "selectbuddy 4"
bind KP_RIGHTARROW "selectbuddy 5"
bind KP_END "selectbuddy 0"
bind KP_DOWNARROW "selectbuddy 1"
bind KP_PGDN "selectbuddy 2"
bind KP_ENTER "mp_fireteamadmin"
bind KP_INS "selectbuddy -2"
bind KP_DEL "selectbuddy -1"
ok, let us detail a little the first script :
set swon "echo ^<SW ON; name ^2-^<|^2PS^<|^2-^<Yoda; exec yoda.cfg; set swtoggle vstr swoff"
set swoff "echo ^fSW OFF; name ^?-^S|^7P^9S^S|^?-^7Memnoch; exec mem.cfg; set swtoggle vstr swon"
set swtoggle "vstr swon"
bind F8 "vstr swtoggle"
set swtoggle "vstr swon"
here we define the variable swtoggle and give it the value swon (i choose names, here it's star wars toggle and star wars on, you can give names you want )
set swon "echo ^<SW ON; name ^2-^<|^2PS^<|^2-^<Yoda; exec yoda.cfg; set swtoggle vstr swoff"
when the variable swtoggle is on swon the script do :
echo ^<SW ON <- print SW ON in left of screen, then you know the script work and wich name you load.
; <- the semicolon is used to say we want to give another command.
name ^2-^<|^2PS^<|^2-^<Yoda <- change the name.
exec yoda.cfg <- load the file yoda.cfg where new binds are defined.
set swtoggle vstr swoff <- we give to swtoggle the value swoff, then if we press the key again the script will execute swoff
bind F8 "vstr swtoggle"
just bind the variable to a key.
you can add as many lines as you want with this kind of scripts, and do kind of scripts you want, just make work your imagination !
here a maxFPS switcher with 3 settings for exemple :
set fps43 "echo FPS set to 43!; seta com_maxfps 43; set switch_fps vstr fps76"
set fps76 "echo FPS set to 76!; seta com_maxfps 76; set switch_fps vstr fps125"
set fps125 "echo FPS set to 125!; seta com_maxfps 125; set switch_fps vstr fps43"
set switch_fps "vstr fps125"
bind "H" "vstr switch_fps"
configs.cfg :
here i just give you useful configs, this file is really too big to give it here
- Code: Select all
// movement
seta cg_bobroll "0.0000"
seta cg_bobpitch "0.0000"
seta cg_bobup "0.0000"
seta cg_runroll "0.0000"
seta cg_runpitch "0.0000"
//blinking_blood
seta cg_drawdamagekick "0"
seta cg_drawfallkick "0"
seta cg_fallkick "0"
seta cg_damagekick "0"
seta cg_bloodFlash "0"
seta cg_bloodDamageBlend "0"
seta cg_showblood "1"
seta cg_bloodTime "10"
seta cg_impactvibration "0"
seta cg_blinktime "100"
seta cg_crosshairPulse "0"
seta sv_screenshake "0"
seta cg_muzzleFlash "1"
// hud
seta cg_fov "110" //default : 90. max : 120
seta cg_drawFPS "1"
seta cg_zoomfov "40"
// client engine
seta cl_mouseAccel "0"
// common
seta com_hunkMegs "288" //max : 1/2 of your total ram. i have 1Go and don't need to set this higher than 288
seta com_zoneMegs "64"
seta com_soundMegs "64"
seta com_maxfps "76" //magic numbers : 45 76 125 333
well, with this and your configs you can now make your own autoexec.cfg and never loose again your configs !^^
Edit : you're welcome Jonny & Ichi
Edit² : ok, now i hope it will be more simple to understand.. btw, you can pm me if you have problems, i would answer as quickly as possible
Last edited by mem on Tue Jan 30, 2007 14:02, edited 4 times in total.
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest