Create an account


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

#1
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?

Thanks,

Cam
Reply

#2
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:
Code:
default.cfg
config.cfg
data/campaign.cfg
config_update.cfg
font-xolonium.cfg
autoexec/*.cfg
autoexec.cfg

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.
Reply

#3
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.)
Reply

#4
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.
Reply

#5
I made config.cfg read only and it works!

Thank you very much Mr. Bougo.
Reply

#6
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.
Reply

#7
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 :-)
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Solved] Make Xonotic Truly Portable? WizardFait 1 4,854 01-08-2016, 07:14 AM
Last Post: Halogene
  [SOLVED] Realtime World Lighting? rocknroll237 9 9,640 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-