Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
writecfg or similar?

#1
I've finally got my config how I like it.

Problem: I entertain a lot, and routinely have people come over and play on my machine.

What in-game commands, if any, can assist me in creating a backup config for myself and my guests?

I am currently copying the config.cfg file and renaming it, to be executed with exec xxx.cfg (where xxx is player name.)

The issue that I am having, is that certain settings, namely autoswitch and "drop weapon" bind, are not being saved, and have to be changed manually when a new player loads a config.

Any help would be much appreciated.

Thank you.
Reply

#2
How are they not saved? Settings are written to config.cfg, no matter what you exec'd before. To change your settings, either edit them with a text editor, or exec the file, do the changes in the menu, quit the game, and rewrite your separate config with config.cfg.

Personally, I don't like config saving, so I made my config.cfg read-only and execute my (cleanly typed by hand) configuration from autoexec.cfg. That way I can mess with settings and have them reset when I restart the game.
Reply

#3
Maybe I'm hallucinating, today, it seems to work. Although, my crosshair settings have stayed the same between config files.

So any idea of how to dump the current config to a file for later use?

I'm specifically looking for a way to do it without having to minimize the game, or do any file browsing, so that when my people come over, they can play by typing:

exec: myconfig.cfg
free to change any settings they wish, and when finished type:
(this is the command I am missing!) writecfg myconfig.cfg

I hope you can understand what I'm trying to do, I know my communication skills are lacking.
Reply

#4
EDITED

Apparently, the saveconfig command does what you want. Dumps everything to config.cfg, just like when you quit the game. And saveconfig takes an argument! There's your writecfg Smile

One problem is that when you quit the game, everything is saved to config.cfg anyway. That means you can't store your own default config in there, because if you do it will be overwritten if you ever forget to load it before quitting. Also, this means that on startup, the game will have the configuration from when it was last quit. If you don't want that, you could make config.cfg empty and read-only and have your own default config in a separate file. For convenience, you can add exec mydefaultconfig.cfg to autoexec.cfg. But don't forget to save it when you quit!

Pro tip: to search for commands, use the apropos command. apropos word lists the cvars and commands that contain word in them or their description.
Reply

#5
Perhaps loading configs as if they are a mod is a possible help here? If you start Xonotic and append -game [name of directory in Xonotic] then all files in Xonotic/[directory] will be used instead of those in Xonotic/data and hence different .cfg files will be used if they are found. This allows them to be kept completely separate. Loading a mod in game would then allow you to switch configs so you could then switch back to your default config.

Or you couls setup a guest account on your computer (depending upon OS but this works on Linux) and your settings would then be totally separate in your home directory compared to the guest users home directory.
I'm at least a reasonably tolerable person to be around - Narcopic
Reply

#6
(03-30-2012, 03:32 AM)edh Wrote: Perhaps loading configs as if they are a mod is a possible help here? If you start Xonotic and append -game [name of directory in Xonotic] then all files in Xonotic/[directory] will be used instead of those in Xonotic/data and hence different .cfg files will be used if they are found. This allows them to be kept completely separate. Loading a mod in game would then allow you to switch configs so you could then switch back to your default config.

Or you couls setup a guest account on your computer (depending upon OS but this works on Linux) and your settings would then be totally separate in your home directory compared to the guest users home directory.

First of all:
(03-29-2012, 05:19 PM)MonoXideAtWork Wrote: I'm specifically looking for a way to do it without having to minimize the game, or do any file browsing

Also, using -game will (IIRC) make the server list look empty, unless another cli parameter (which I forgot) is used. Other problems with that are dlcache duplication, a general PITA to switch accounts, and a need for several shortcuts to launch the game.
Reply



Forum Jump:


Users browsing this thread:
4 Guest(s)

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