How To Auto Exec Consol Commands?

woodwood Join Date: 2003-08-06 Member: 19065Members
<!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->

you know everytime i start up NS, i have to open up my console and type

cl_hudswitch 1
cl_autohelp 0

etc

is there a way to put a auto exec file for NS to do this whenever u start up NS ( ns only not dod or cs or whatever )

Comments

  • SariselSarisel .::&#39; ( O ) &#39;;:-. .-.:;&#39; ( O ) &#39;::. Join Date: 2003-07-30 Member: 18557Members, Constellation
    in your half-life/ns folder, create a file called: autoexec.cfg

    inside that file you can type whatever console commands you want executed each time you play the game
  • Vahn_PaktuVahn_Paktu Join Date: 2002-10-28 Member: 1666Members, Constellation
    or look in your config.cfg file(Open it in notepad) and change the values there or add them to the end. because config.cfg execs last I think(don't know) that it will overwrite what the autoexec does if it has something similar.
  • SariselSarisel .::&#39; ( O ) &#39;;:-. .-.:;&#39; ( O ) &#39;::. Join Date: 2003-07-30 Member: 18557Members, Constellation
    autoexec.cfg always overwrites whatever is in config.cfg
  • SoulSkorpionSoulSkorpion Join Date: 2002-04-12 Member: 423Members
    The autoexec.cfg is executed every time you join a game, I think. The commands in it are executed in the console. Any commands executed in the console ingame, or options set by the options menu, are recorded in the config.cfg.

    So... if you type in those variables, they should actually stay in your config.cfg, I think, and work for all games after that. But then again, maybe only certain ones get put into the config.cfg.

    The best option is to make a copy of your config.cfg called ns.cfg and edit that as you like, then add the line "exec ns.cfg" to your autoexec.cfg (you'll have to create it if it doesn't exist).
  • RoscoeRoscoe Join Date: 2002-11-29 Member: 10221Members
    Config.cfg is exec'ed last. Its settings won't be overwritten with anything in any other cfg's so if you have something set up a certain way in your config, the config is where you have to change it. A simple way to verify the execution order is to use echoes at the end of your configs that you will see when you start up the game, such as: echo "NS autoexec loaded", etc. Also try rebinding something in your autoexec that is already bound in your config...it won't work since config.cfg takes precedence.
  • DiscoZombieDiscoZombie Join Date: 2003-08-05 Member: 18951Members
    unless your config.cfg is read only, I'm surprised you have to set those variables again... I thought config.cfg was auto-saved with changes to your settings every time you quit the game...
  • ZdrozZZdrozZ Join Date: 2003-01-11 Member: 12158Members, Constellation
    <!--QuoteBegin--DiscoZombie+Aug 13 2003, 12:12 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (DiscoZombie @ Aug 13 2003, 12:12 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> unless your config.cfg is read only, I'm surprised you have to set those variables again... I thought config.cfg was auto-saved with changes to your settings every time you quit the game... <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    It is auto-saved, but I dont know why the freaking cl_autohelp is alway 1 whenever I enter a game. And I use autoexec.cfg too, to overwrite it and to load my bunny hop scripts <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo-->
  • ThansalThansal The New Scum Join Date: 2002-08-22 Member: 1215Members, Constellation
    edited August 2003
    .........

    I was gona help

    but BHop scripts?
  • SariselSarisel .::&#39; ( O ) &#39;;:-. .-.:;&#39; ( O ) &#39;::. Join Date: 2003-07-30 Member: 18557Members, Constellation
    <!--QuoteBegin--Roscoe+Aug 13 2003, 10:53 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Roscoe @ Aug 13 2003, 10:53 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Config.cfg is exec'ed last. Its settings won't be overwritten with anything in any other cfg's so if you have something set up a certain way in your config, the config is where you have to change it. A simple way to verify the execution order is to use echoes at the end of your configs that you will see when you start up the game, such as: echo "NS autoexec loaded", etc. Also try rebinding something in your autoexec that is already bound in your config...it won't work since config.cfg takes precedence. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    ?!?

    What you have in autoexec.cfg will overwrite what is down in config.cfg. This has been the case since I've started playing with my configurations in quake2, and it is the same in half-life. I used to put in binds, scripts, everything in my autoexec.cfg. Then started organizing it in seperate config files and exec'ing them through autoexec.cfg.
  • PolyMorphPolyMorph Join Date: 2003-04-14 Member: 15475Members
    <!--QuoteBegin--Thansal+Aug 13 2003, 07:42 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Thansal @ Aug 13 2003, 07:42 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> .........

    I was gona help

    but BHop scripts? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    I think he was joking....
  • RoscoeRoscoe Join Date: 2002-11-29 Member: 10221Members
    <!--QuoteBegin--Sarisel+Aug 13 2003, 02:55 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Sarisel @ Aug 13 2003, 02:55 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ?!?

    What you have in autoexec.cfg will overwrite what is down in config.cfg. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Either you have the strangest HL folder I have ever seen since I started messing with HL scripting in TFC 3 years ago, or you are mistaken. If you use wasd movement and have bind "w" "+forward" in your config.cfg try changing it in autoexec to bind "w" "say_team WTH". Join a server or start a lan and see what happens. Or try putting gl_max_size 128 in autoexec and gl_max_size 256 in config. Join a server or start a lan and type gl_max_size in console to see what it is set at. The only way what you are suggesting would work is if you erased your config before joining a game or changed something that wasn't in the config to begin with.

    To the original question, though, the settings should have been saved when you typed the cvars into console unless your config is read only.
  • woodwood Join Date: 2003-08-06 Member: 19065Members
    treid changing the config.cfg

    but each time i restart the game the settings revert back /shrug

    trying to add the autoexec.cfg now
Sign In or Register to comment.