Personal tools
Home > Information > FS2004 > What you need to know about NewScenery.CFG
Document Actions

What you need to know about NewScenery.CFG

by Visual Flight last modified 2006-05-29 07:40

A detailed description of how FS2004 uses NewScenery.cfg, Scenery.CFG and OldScenery.CFG

Whenever Scenery Library in FS9 is used to make any changes to the scenery configuration, FS9 writes an amended copy of Scenery.cfg named NewScenery.cfg into the same folder as Scenery.cfg. When FS9 starts up it checks for the presence of NewScenery.cfg file, and if it finds it it does the following:

1. Deletes OldScenery.cfg
2. Renames Scenery.cfg to OldScenery.CFG
3. Renames NewScenery.cfg to Scenery.cfg

or

1. Copies Scenery.cfg to OldScenery.cfg
2. Copies NewScenery.cfg to Scenery.cfg
3. Deletes NewScenery.cfg

Whichever of these is actually used, the end result is the same.

Advice for end users

1. Exit FS2004 before installing any scenery.

2. Always restart FS2004 at least once in between making any changes via Scenery Library and installing any other scenery.

AdviceĀ for installer writers

Installer writers need to be wary of the situation whereby someone goes into FS9 Scenery Library and, in preparation for installing a new add-on, deletes or disables a scenery area or two. Unless they specifically restart FS9 prior to installing the new add-on, FS2004 will use NewScenery.cfg when next started, so any changes to Scenery.cfg made by the add-on installer will get relegated to OldScenery.cfg, possibly leaving the add-on installer writer or support desk wondering what happened to their scenery.cfg modifications.

Here's some suggestions for making a more robust installer:

1. Always check for the presence of NewScenery.CFG and use that in preference to Scenery.CFG if it is detected.

2. Use Win32 INI file functions to manipulate NewScenery.CFG/Scenery.CFG rather than reading/writing as a text file.

 

Powered by Plone