AutoExec Question
AutoExec Question
I've been having problems switching from the Quake4Config.cfg to AutoExec.cfg. I originally made all my change in Q4C but now am trying to change. I saved my Q4C as AE and then reset my game to default. However, when I load the game back up, it builds a new Q4C based on my AutoExec and runs it from there. Any suggestions? Thanks.
Actually you're not having any problems...things are working as they should.
Let me explain how Doom\Quake engine games load and use configuration files.
1. The game loads what is typically called default.cfg which is alway contained in a Pak file. This file when loaded sets values & binds in memory.
2. The game loads what is typically called config.cfg which if exists is contained in the Base folder. This file when loaded may over write any values & binds in memory set by the default.cfg.
3. The game loads what is typically called autoexec.cfg which if exists is contained in the Base folder. This file when loaded may over write any values & binds in memory set by the default.cfg and possibly config.cfg. The autoexec.cfg may also load additional configuration files as well...which in turn may over write other values & binds stored in memory.
4. Upon proper exit of the game, a file will be created typically called config.cfg which will be stored in the Base folder. This file will over write an existing config.cfg should there be one. This config.cfg is simply a collection of values and binds that where stored in memory...hence the last known working configuration. Should the game fail to exit properly...this file will not be created.
So the game is loading and using your autoexec.cfg...and yes if things go well it would recreate the config.cfg based upon those values stored with in the autoexec.cfg
If you are looking to avoid the creation of the config.cfg, you should be able to issue ether "quit" or "exit" commands via a bind or with in the console...ether should kill the program with out the creation of the file...if that doesn't do the trick..there typically is a command called "error" which will cause the game to throw an error and exit.
Now a lot of times players seem to run into trouble with configuration files, becaues they play mods. Now mods while they typically use the resources contained in the Base folder...they do not typically look for configuration files...with the exception of the config.cfg....which in this case should the mod its self not contain a config.cfg it will then copy over the one from the Base folder and use that. So if one is dependant on the autoexec.cfg for resetting values & binds or the launching of additional scripts...they are SOL since the mod will not copy over those files. It is in this case where the user must manually copy over the autoexec.cfg and any other configuration files they disire over to the mod folder...at which point things will work as they should...or atleast typically...I have yet to really toy with mods for Q4.
As for read-only thats typically not recomended...and frankly shouldn't be required if things are setup correctly.
Oh also worth noting...that even if you do have a mod loaded and running you should still be able to drop the console and enter "exec autoexec.cfg" which will still launch the autoexec.cfg contained in the Base folder...or via a bind. While the mod may not naturally excute the Base autoexec.cfg it still see's it & can make use of it.
Let me explain how Doom\Quake engine games load and use configuration files.
1. The game loads what is typically called default.cfg which is alway contained in a Pak file. This file when loaded sets values & binds in memory.
2. The game loads what is typically called config.cfg which if exists is contained in the Base folder. This file when loaded may over write any values & binds in memory set by the default.cfg.
3. The game loads what is typically called autoexec.cfg which if exists is contained in the Base folder. This file when loaded may over write any values & binds in memory set by the default.cfg and possibly config.cfg. The autoexec.cfg may also load additional configuration files as well...which in turn may over write other values & binds stored in memory.
4. Upon proper exit of the game, a file will be created typically called config.cfg which will be stored in the Base folder. This file will over write an existing config.cfg should there be one. This config.cfg is simply a collection of values and binds that where stored in memory...hence the last known working configuration. Should the game fail to exit properly...this file will not be created.
So the game is loading and using your autoexec.cfg...and yes if things go well it would recreate the config.cfg based upon those values stored with in the autoexec.cfg
If you are looking to avoid the creation of the config.cfg, you should be able to issue ether "quit" or "exit" commands via a bind or with in the console...ether should kill the program with out the creation of the file...if that doesn't do the trick..there typically is a command called "error" which will cause the game to throw an error and exit.
Now a lot of times players seem to run into trouble with configuration files, becaues they play mods. Now mods while they typically use the resources contained in the Base folder...they do not typically look for configuration files...with the exception of the config.cfg....which in this case should the mod its self not contain a config.cfg it will then copy over the one from the Base folder and use that. So if one is dependant on the autoexec.cfg for resetting values & binds or the launching of additional scripts...they are SOL since the mod will not copy over those files. It is in this case where the user must manually copy over the autoexec.cfg and any other configuration files they disire over to the mod folder...at which point things will work as they should...or atleast typically...I have yet to really toy with mods for Q4.
As for read-only thats typically not recomended...and frankly shouldn't be required if things are setup correctly.
Oh also worth noting...that even if you do have a mod loaded and running you should still be able to drop the console and enter "exec autoexec.cfg" which will still launch the autoexec.cfg contained in the Base folder...or via a bind. While the mod may not naturally excute the Base autoexec.cfg it still see's it & can make use of it.
Well you can't edit an existing config from the console in Q4...I think in FAKK2 and MOH:AA it might have been possible through thier mini-console...not totally sure tho.
Now you can write your current settings to a config file with ether:
writeConfig
WriteConfiguration
Past that your best option would be if you had just created a script with in the console is to first clear it, then use your uparrow page nav keys to display prior entrys, then to hit enter again to reissue them...then to perform a condump...which then you would exit Q4 and manually edit the condump file.
Really not the best way to go about it...but it is an option. So a recap:
clear
(uparrow then enter)
condump my_script.cfg
Or you could just turn on the log file and later edit or copy some of its contents.
logfile 2
(write script)
logfile 0
All of its ugly if you ask me.
You would probably do better Alt+Tab out of Q4 to your running text editor making and saving changes, then Alt+Tab back to Q4 and re-executing the script so that changes take effect and then test it. This would be the best way to do it...should your gamma not be to high...or you have a color scheme running on your text editor that works fine with high gamma settings. Like a dark navy blue background with white text...any ways just ideas.
By the way...where the hell are all my trolls?
Now you can write your current settings to a config file with ether:
writeConfig
WriteConfiguration
Past that your best option would be if you had just created a script with in the console is to first clear it, then use your uparrow page nav keys to display prior entrys, then to hit enter again to reissue them...then to perform a condump...which then you would exit Q4 and manually edit the condump file.
Really not the best way to go about it...but it is an option. So a recap:
clear
(uparrow then enter)
condump my_script.cfg
Or you could just turn on the log file and later edit or copy some of its contents.
logfile 2
(write script)
logfile 0
All of its ugly if you ask me.
You would probably do better Alt+Tab out of Q4 to your running text editor making and saving changes, then Alt+Tab back to Q4 and re-executing the script so that changes take effect and then test it. This would be the best way to do it...should your gamma not be to high...or you have a color scheme running on your text editor that works fine with high gamma settings. Like a dark navy blue background with white text...any ways just ideas.
By the way...where the hell are all my trolls?