Forums
Unified config file in SVN - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: Unified config file in SVN (/showthread.php?tid=108)



Unified config file in SVN - thelusiv - 10-04-2005

Now VDrift is able to load and save nearly all of the game settings from a single file. This is ~/.vdrift/VDrift.conf. Here's a sampe:<pre>[ game ]server_ip = 0.0.0.0host_game = 0track = Nurburgringgame_mode = 1camera_mode = 1car_paint = 0selected_car = mustang_gt[ display ]show_fps = 0show_hud = 1terrain_detail = Medtree_detail = Medfullscreen = 0depth = 16height = 768width = 1024[ main ]data_dir = /usr/local/vdrift</pre>All of these options are loaded when the game runs and saved when the game exits. So, for instance, if you last played a game in Networked Free Drive, client mode, and had the IP address for the server set, then when you start VDrift, this will be the current value for all those settings - you can simply select "New Game" and then "Start" in the menu, and a new game will be started with the exact same configuration as before (in this case, it will try to connect to the server).Notice the data_dir variable - this is now changeable through a new command line switch. If you run <pre>vdrift -datadir /path/to/vdrift/data</pre>it will change this setting in ~/.vdrift/VDrift.config and exit.Likewise, the data_dir variable in the system-wide (default) VDrift.config (usually in /usr/share/games/vdrift/settings/VDrift.config) can be set by vdrift too. As root, run<pre>vdrift -defaultdatadir /path/to/vdrift/data</pre>it will change this setting in /path/to/vdrift/data/settings/VDrift.config and exit.edit: The lack of all the above features in 10/2 is keeping me from doing a binary release of that version, and since it's done, I'm not going to bother doing a binary release of that version. If I can get a Windows version worked out now, I think I'll re-release, this time with both source and binary packages for Linux and a binary for Windows.


Unified config file in SVN - thelusiv - 10-04-2005

Actually, one thing that bugs me is that it writes the file back out backwards from how it read it in. The sections are in reverse order, and all the settings within those sections are in reverse order...


Unified config file in SVN - joevenzon - 10-04-2005

Yep. If that bugs you too much, I can change the algorithm, although you'll lose the constant time linked list insertion. ;-)


Unified config file in SVN - joevenzon - 10-04-2005

fixed in SVN