1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FSX Automatic add-to-scenery-library on install

Discussion in 'Tools programming' started by toprob, 11/8/10.

  1. toprob

    toprob

    Joined:
    27/6/04
    Messages:
    627
    Back to this... I know it's been talked about here a few times, but here's a new thread.
    Since I've always used NSIS to build installers, I've written a NSIS script which includes the choice to automatically add the scenery to the Scenery Library after it is installed.

    However in this case, the installed scenery is landclass, so it needs to be shifted in priority so that it doesn't take priority over photo scenery. So at the moment, my script determines the priority (layer number) of Addon Scenery, and tucks my scenery after it. Slightly complicated in this case because there are 2 scenery folders to add.

    I did assume that most Scenery.cfg files would be nice and tidy, especially if most users made changes only through the Scenery Library within FSX, but testing has shown that there are a lot of messy cfg files out there, with gaps and layer numbers out of order.

    So what would you expect a tool like this to do? With a nice tidy cfg file, where area numbers = layer numbers, it simply inserts the new entries after Addon Scenery and renumbers everything after.

    But what should it do if it isn't so tidy? Should it 'repair' the cfg, i.e. renumber everything so that area=layer?

    Should it insert the new Areas after the Addon Scenery Area (given that it is really the Layer number which determines priority, and this is really what is being set in relation to Addon Scenery)?
    Should it add the new Areas to the end of the cfg file, and just tweak the Layer?

    What I really want to do is to make sure that I don't leave the Scenery.cfg messier than I found it, but then again I'd rather not do a complete 'repair'.

    And lastly, would this script be of use to anyone else once it's finished?
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi Robin,

    Are you also assuming that most addons have more priority than Addon Scenery? I usually give Addon Scenery the top priority since I use it for testing.
  3. toprob

    toprob

    Joined:
    27/6/04
    Messages:
    627
    Yes, the installer instructions will explain the pros and cons of choosing to have the installer add the entries to Scenery.cfg, so anyone who has changed the priority of Addon Scenery would know to choose the manual option. In this case, the instructions would explain why priority needs some consideration here.

    Addon Scenery seemed like the most effective folder to orientate the priority around, but I'm aware that this won't suit everyone. Me, for instance, because I tend to test photo scenery in Addon Scenery, so I'd be better off with the landclass scenery before rather than after, but for most people it should give the result they want. If anyone has a better idea, let me know.

    The goal is to choose a location far enough up the list to allow already-installed addon photo scenery to have priority.

Share This Page