Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Prevent cmds and .cfgs from being permanent?

Hi guys,

Whenever I add a new line of code, or exec a .cfg file, it seems to be enabled every time I load Xonotic. Then, the only way to get rid of a line of code is to delete it from a .cfg file in the save game folder (btw, I'm Windows 7).

Is there a way to input code that only affects the game once and must be enabled each time you start the game?



Uh, I'm not sure what you're asking there? So here's a small explanation of how things work in Xonotic:

When DarkPlaces is launched, it looks for a file called quake.rc in its filesystem (it's most probably in your data pk3 or uncompressed in your git repo).
This in turn executes these files in order:

The autoexec files can be created by you to store commands in a file that isn't touched by the game.
config.cfg is where the game saves its configuration when you quit. More precisely, it stores cvars that are declared with the store flag (I believe this is enabled by the seta command). You should not edit this file because it is regenerated every time the game quits. That's why there is autoexec.cfg.

So, what is it you're talking about? This sequence above is all that the game execs when it starts. It does not remember what cfg files you've exec'd before to re-exec them later. Other cfg files are only exec'd from inside those files mentioned above.

I didn't really make myself very clear Tongue

Basically, I created a brand new config file (entitled effects.cfg) with these commands:

cl_playerdetailreduction 5
cl_projectiles_sloppy 1
cl_gibs_lifetime 3
cl_gibs_maxcount 30

I executed the config file in Xonotic ('exec effects.cfg') and ever since, the commands in the config are activated even when I don't type in 'exec effects.cfg'.

I was just wondering if there was a way of preventing the config from being activated automatically each time I start Xonotic.

(Btw, the same applies for text entered manually in Xonotic - it is always activated automatically, whenever I start the game.)

That is because it saved the new cvar values into your config.cfg. You have two options:
-Make config.cfg read-only so that no configuration is saved at all, and instead manage your config manually in autoexec.cfg
-Have autoexec reset those four cvars to their default values or something like that

Your config is not loaded automatically at all. Your config affects the settings which are in turn saved. So does setting cvars through the console.

I made config.cfg read only and it works!

Thank you very much Mr. Bougo.

Don't forget that no config changes will be saved now, heh Smile
So if you bind a key, you'll lose the bind when you quit. Personally I prefer it that way.

Yeah. Whenever I want to save a cmd or bind, I disable read-only. Whenever I want a cmd or bind to work temporarily I enable read-only. Simples :-)

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Solved] Make Xonotic Truly Portable? WizardFait 1 3,446 01-08-2016, 07:14 AM
Last Post: Halogene
  [SOLVED] Realtime World Lighting? rocknroll237 9 6,884 09-12-2011, 03:36 PM
Last Post: mand1nga

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-