FlightGear configuration via XML: Difference between revisions

Jump to navigation Jump to search
→‎defaults.xml and autosave.xml: Try to edit first part for clarity, absolutely spell everything out from the pov of a reasonably new user, one who might be uncomfortable with editing text files. Add tip. Use note template. To do: look at other parts
(→‎defaults.xml and autosave.xml: Try to edit first part for clarity, absolutely spell everything out from the pov of a reasonably new user, one who might be uncomfortable with editing text files. Add tip. Use note template. To do: look at other parts)
Line 10: Line 10:


== defaults.xml and autosave.xml ==
== defaults.xml and autosave.xml ==
FlightGear installs with a configuration already set up in a XML file, {{Base Package Resource|filename=preferences.xml}}.  Some of these settings are preserved between FlightGear sessions in another file, <code>autosave.xml</code>. All settings contained in these two files get parsed by FlightGear while it starts up.
On startup Flightgear reads both <code>autosave.xml</code> and <code>defaults.xml</code> to find values for all configuration settings. Flightgear then stores these settings in the [[Property_tree|property tree]] after which the parts of Flightgear that need settings will use them. These two files are [[XML|XML text files]] and you can easily read or edit them using a simple text editor.


Some of the properties in {{Base Package Resource|filename=preferences.xml}} have an XML attribute, <code>userarchive</code>, that automatically add any changes of those properties to <code>autosave.xml</code>.
* {{Base Package Resource|filename=preferences.xml}} is a XML text file that contains the ''default configuration'' settings. It comes already installed with Flightgear. <code>defaults.xml</code> should '''not''' be changed by users.


we should absolutely stop telling anyone to edit {{Base Package Resource|filename=preferences.xml}} in FG_ROOT; any documentation or advice which says to should be changes ASAP. <ref>{{cite web
* <code>autosave.xml</code> is a XML text file that contains ''changes'' to ''some'' settings contained in <code>defaults.xml</code>. Changes to these settings are saved between sessions. <code>autosave.xml</code> can be safely edited by users.
 
:: Note only some settings are saved between sessions. Settings which are to be saved have an XML attribute: <code>userarchive</code>. Changes to other settings will not be saved, and Flightgear will start up in the next session with the defaults from <code>defaults.xml</code>.
 
:: If you want to restore default settings ('factory defaults') to see if a problem goes away you can delete <code>autosave.xml</code>. You can also back up the file and restore it later. See [[Troubleshooting_problems]].
 
{{Note|We should absolutely stop telling anyone to edit {{Base Package Resource|filename=preferences.xml}} in FG_ROOT; any documentation or advice which says to should be changed ASAP. <ref>{{cite web
   |url    =  https://forum.flightgear.org/viewtopic.php?p=192632#p192632  
   |url    =  https://forum.flightgear.org/viewtopic.php?p=192632#p192632  
   |title  =  <nowiki> Re: NavCache:init failed:Sqlite error:Sqlite API abuse </nowiki>  
   |title  =  <nowiki> Re: NavCache:init failed:Sqlite error:Sqlite API abuse </nowiki>  
Line 21: Line 27:
   |added  =  Oct 26th, 2013  
   |added  =  Oct 26th, 2013  
   |script_version = 0.40  
   |script_version = 0.40  
   }}</ref>
   }}</ref>}}
 


=== defaults.xml ===
=== defaults.xml ===
1,746

edits

Navigation menu