Jump to content
Sign in to follow this  
Farlis

New Scenery.cfg conventions?

Recommended Posts

18 minutes ago, longrangecruise said:

I was a bit quick in accepting the proposed installation location under Program Files ( x86)) when installing KCLT and others.  I tried uninstalling and reinstalling, but I still can't choose another location with the subsequent install.

The trick is Uninstalling AND replying YES to the question "Do you want to remove the Add-on Manager?", which is made at the end. This will signal your intention to start again, and will clear up your initial choice, allowing to select a new global install folder for all FSDT products.

Share this post


Link to post

I may be misunderstanding the above (still need to install P3Dv4 and read the SDK), but am I hearing that if I wish to change priorities of one scenery over another I need to go to an .xml file and edit it... also make sure I save it as unicode?  What if I wish to disable a scenery for testing I can no longer "uncheck" it because that option is greyed out?


Intel i9-12900KF, Asus Prime Z690-A MB, 64GB DDR5 6000 RAM, (3) SK hynix M.2 SSD (2TB ea.), 16TB Seagate HDD, EVGA GeForce 3080 Ti, Corsair iCUE H70i AIO Liquid Cooler, UHD/Blu-ray Player/Burner (still have lots of CDs, DVDs!)  Windows 10, (hold off for now on Win11),  EVGA 1300W PSU
Netgear 1Gbps modem & router, (3) 27" 1440 wrap-around displays
Full array of Saitek and GoFlight hardware for the cockpit

Share this post


Link to post
5 minutes ago, Clutch Cargo said:

I may be misunderstanding the above (still need to install P3Dv4 and read the SDK), but am I hearing that if I wish to change priorities of one scenery over another I need to go to an .xml file and edit it... also make sure I save it as unicode?  What if I wish to disable a scenery for testing I can no longer "uncheck" it because that option is greyed out?

To disable a scenery for testing, use the proper option in the UI: the "Add-ons" menu under the Options menu.

Yes, to rearrange the layering order of such sceneries added using the add-on.xml method, you must edit their add-on.xml and work and add/edit the Layer parameter. Right now, it's not possible from the UI, but it's possible that LM might add it as an option, if enough users request for it.

Share this post


Link to post

Whew... thx Umberto.  Had me worried for a moment.  P.S. - Luv your add-ons!

Clutch


Intel i9-12900KF, Asus Prime Z690-A MB, 64GB DDR5 6000 RAM, (3) SK hynix M.2 SSD (2TB ea.), 16TB Seagate HDD, EVGA GeForce 3080 Ti, Corsair iCUE H70i AIO Liquid Cooler, UHD/Blu-ray Player/Burner (still have lots of CDs, DVDs!)  Windows 10, (hold off for now on Win11),  EVGA 1300W PSU
Netgear 1Gbps modem & router, (3) 27" 1440 wrap-around displays
Full array of Saitek and GoFlight hardware for the cockpit

Share this post


Link to post

Question for those in the know:

For those addons that rely on makerunways or otherwise scan the scenery.cfg file themselves to gather the necessary info, would it be sufficient as a stop-gap measure to place an "afcad" for those airports in an addon scenery folder that is then added to the scenery library in the old conventional way?


Walter Meier

 

Share this post


Link to post
45 minutes ago, virtuali said:

The main scenery.cfg file is now, by default, encoded in Unicode. More precisely, it's UTF16LE, with the first two bytes being a BOM indicating Little-Endian, which is the most common kind of UTF16.

It might not have been a problem reading from it, if you used the standard Windows API function such as GetPrivateProfileString because, depending on your C++ project settings (Unicode enabled or not), they would be mapped to either the GetPrivateProfileStringW call (Unicode) or the GetPrivateProfileStringA (Ansi) version so, you might only use GetPrivateProfileString, but the compiler is compiling something else, which changes depending on the Unicode settings of the project.

Strange, then, because my normal editor (UEDIT32) which CAN read either, definitely shows it as 8-bit ASCII.  I can check it in binary in any of sevceral ways, and it is defintielly ASCII.

47 minutes ago, virtuali said:

If you have a project set as non-Unicode, so you are sure you are really calling the Ansi version of the API, then I'm afraid you are testing a scenery.cfg that, for some reason, is not default anymore, perhaps some installer or something else might have changed its encoding, but I assure you that, if you clean up all %APPDATA% and %PROGRAMDATA% folders for P3D, then you start it again, the default scenery.cfg will revert to its standard Unicode encoding.

Well, this is the same on 3 different PCs, two Win7 one Win10, which have had P3D4 installed on them from scratch and no scenery.cfg editing as yet on two of them. Perhaps the early betas of P3D4 set them so? But they've certainly not been replaced. But, true, I do not delete these things each time i do an update.

52 minutes ago, virtuali said:

Have a look at the Scenery_Addons.XML file under %PROGRAMDATA%\Lockheed Martin\Prepar3d V4 (or V3), it contains a list created by the sim itself, of all areas that have been added with the Add-ons.XML method so, any utility that needs to scan the Scenery Library completely, should first read all the areas in the scenery.cfg file, then add the ones found in the Scenery_Addons.XML to have a complete list.

Okay. Thanks. And is that the priority order which P3D uses, with the last entries as highest, and layer numbers withing each one (r if omitted, just the order listed?).

This answers some questions about things I don't understand in the SDK Help. It's all getting too complicated for my 74-year old brain! I grew up programming valve computers! Like Abacus's compare to todays stuff, where, as if the hardware wasn't complicated enough, everyone insists on adding more and more complex file and library structures on top of it all. Ugh.

Pete

 


Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post
26 minutes ago, Pete Dowson said:

Perhaps the early betas of P3D4 set them so? But they've certainly not been replaced. But, true, I do not delete these things each time i do an update.

I think this might be possible, since I seem to have noticed this later during the Beta process, so it's possible they switched to Unicode some time during the Beta.

Note that, P3D V4 will be perfectly fine with a scenery.cfg encoded in Ansi! It works in either way, but that's also why it's very easy to fall for it, don't notice, and assume every old utility will surely work, when in fact it might not.

Try this:

- Move your existing scenery.cfg in C:\ProgramData\Lockheed Martin\Prepar3d v4 to a safe place, so the sim won't find it at the next start, and so it will recreate it from scratch.

- Open the newly created scenery.cfg with an editor, preferably an hex editor, so you know without any doubts what you are looking at, and you'll see it's definitely Unicode, with the FFFE BOM mark at the start, indicating Little Endian, and 2 bytes per character, which indicates UTF-16.

If you want a quick fix, you might want to reuse our method, which of course requires users having installed at least one FSDT product, and just read this file:

%PROGRAMDATA%\Virtuali\Couatl\prepar3dv4\scenery.cfg

Which contains our own version of the scenery.cfg, which will list ALL scenery areas, regardless if they are located in the scenery_addons.xml, or if they were in the main scenery.cfg of the sim, all in a single list, encoded in plain old Ansi, and ready to be used...the Addon Manager will keep the list always current, checking the md5 of both the main scenery.cfg and the scenery_addons.xml, and updating this one only if one of them changes.Note that, there will be several copies of it, for each installed simulator:

%PROGRAMDATA%\Virtuali\Couatl\fsx\scenery.cfg

%PROGRAMDATA%\Virtuali\Couatl\fsxse\scenery.cfg

%PROGRAMDATA%\Virtuali\Couatl\prepar3d\scenery.cfg

%PROGRAMDATA%\Virtuali\Couatl\prepar3dv2\scenery.cfg

%PROGRAMDATA%\Virtuali\Couatl\prepar3dv3\scenery.cfg

%PROGRAMDATA%\Virtuali\Couatl\prepar3dv4\scenery.cfg

Of course, under P3D V1 and V2 and FSX, this would be basically a copy of the original scenery.cfg, while on V3 and V4, will contain also the areas added in the new way.

It might just be easier to code to use this file if it's there, and use the normal scenery.cfg, if it's not.

Share this post


Link to post

Elaine from LM pointed me to this thread after I posted the same issue in the P3D forum the OP posted in this thread.

I gotta say after reading this thread so far, I can't remember seeing such a user UN-friendly fiasco in my 3 decades of flight simming.  Who on earth thought that a user wouldn't have to STILL prioritize their Scenery Library entries?  And that making the user do a MANUAL edit of EACH addon's XML file would be the way to do it in P3Dv4?  For EVERY Scenery Library entry?  That is what WOULD have to be done if Virtuali is saying they used the RECOMMENDED way to install addons.  If that is true, and if EVERY addon developer did it that way, then ALL addons in the Scenery Library would require a manual XML edit to re-prioritize their layer number EVERY TIME a new scenery was added to the Scenery Library.

I'm not sure how any of this can be (quote) "...the official and suggested way of installing any addon into the sim...(it is a) vastly superior method, which has quite a bit of advantages so, once you'realize them, you won't ever want to go back to the dark ages of the old ways...".

How is changing a "Push a button to prioritize a Scenery Library entry" to "Oh, hey...just manually edit all of the XML files for your Scenery Library entries" NOT a Return to the Dark Ages???  The "old ways" were a lot easier than now.  :laugh:

 

PS - BTW, the new FSDT and Flightbeam P3Dv4 installers?  They not only did all of the above to my P3Dv4 installation, but when I followed the "suggestion" to use them to "update" my P3Dv3 installation, they did the SAME things to all the airports in my P3Dv3 install.  I can't move the airports around in the P3Dv3 Scenery Library anymore because none of the GUI buttons work THERE for them anymore either.  DUH!  :cool:

  • Upvote 1

Rick Ryan

Share this post


Link to post

Is it not possible to just copy the entries from the V3 scenery.cfg to the V4 scenery.cfg and save it under the UTF-16?


Regards,

Chris

--

13900K, Gigabyte Geforce RTX 4090, 32GB DDR5 RAM, Asus Rog Swift PG348Q G-SYNC 1440p monitor, Varjo Aero/Pico 4 VR

Share this post


Link to post
17 hours ago, virtuali said:

If you want a quick fix, you might want to reuse our method, which of course requires users having installed at least one FSDT product, and just read this file:

%PROGRAMDATA%\Virtuali\Couatl\prepar3dv4\scenery.cfg

Which contains our own version of the scenery.cfg, which will list ALL scenery areas, regardless if they are located in the scenery_addons.xml, or if they were in the main scenery.cfg of the sim, all in a single list, encoded in plain old Ansi, and ready to be used...the Addon Manager will keep the list always current, checking the md5 of both the main scenery.cfg and the scenery_addons.xml, and updating this one only if one of them changes.Note that, there will be several copies of it, for each installed simulator

Very nice! How about I buy that chunk of code from you to build into my (free) MakeRunways? :-)

Or of course I could tell everyone they MUST buy an FSDT product! ;-)

Thanks!

Pete

 


Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post

Just to add my 2P, my scenery.cfg, installed last night and no add-ons installed, is definitely unicode
1st 16-bit word = FFFE
2nd 16-bit word = 5B00 - thats the opening [

126 Entries

 

Quote

Is it not possible to just copy the entries from the V3 scenery.cfg to the V4 scenery.cfg and save it under the UTF-16?

Surely, you will just lose the flexibility of clearing down/reinstalling P3D without losing your add-on scenery

I think its worth persevering as this sounds a very good idea for the long run :)

Cheers
Keith


...

Share this post


Link to post
6 hours ago, FalconAF said:

PS - BTW, the new FSDT and Flightbeam P3Dv4 installers?  They not only did all of the above to my P3Dv4 installation, but when I followed the "suggestion" to use them to "update" my P3Dv3 installation, they did the SAME things to all the airports in my P3Dv3 install.  I can't move the airports around in the P3Dv3 Scenery Library anymore because none of the GUI buttons work THERE for them anymore either.  DUH!  :cool:

As I already explained to you in the FSDT forum, your issue is not with the system. You said yourself that you used the Scenery Configuration Editor 3rd party utility.

And I bet you do, since you have such complex requirements for your own idea of organizing your scenery, that no UI in the sim would ever be adequate for you. What you want to do REQUIRES a 3rd party utility.

This means, all your issues don't have anything to do with FSDT or LM: your only issue is that your favorite scenery configuration utility hasn't been updated to support this system. even if it's the officially suggested one in the LM SDK, and it has been like that since V3, and it came to full realization in 3.3. So, it's not that utility developers didn't had time to adapt. 

Because, of course, it's not that the system doesn't provide with custom layering, custom naming. It obviously does, just it doesn't use the clunky and obsolete method of the .INI-style centralized scenery.cfg.

So, the whole issue will entirely disappear, as long someone would do a proper P3D-aware Scenery Configurator, which all the options you need, that supports this new system, with scenery areas that can be added from multiple locations.

Share this post


Link to post

LMAO!  Sorry, but if I used the logic in your post above, NOBODY should have a "need" to alter the priority layer of their scenery library.  So just remove the whole Scenery Library GUI interface in the sim altogether.  That will teach us all. :laugh:

 

  • Upvote 1

Rick Ryan

Share this post


Link to post
1 hour ago, FalconAF said:

LMAO!  Sorry, but if I used the logic in your post above, NOBODY should have a "need" to alter the priority layer of their scenery library.  So just remove the whole Scenery Library GUI interface in the sim altogether.  That will teach us all. :laugh:

 

You still don't get it.

As I've clearly explained, I don't question the need to have the ability to rearrange the Scenery Library, which is why I said it would be nice if P3D V4 allowed to do it even for sceneries added with the new add-on.xml method. And I also asked LM in their developers forum, if there were any special reason why it cannot be done from the UI, and if they might consider adding the ability in the future.

But this doesn't have anything to do to your rant because, according to your own description of your rearranging habits, your needs WAY exceed what was always been possible with the normal UI offered by the sim, so you MUST use an external utility to do what said you need to do, because the normal UI won't cut it anyway. And in fact, this is exactly what you said yourself, you DO use a 3rd party scenery customization editor.

Which brings to the real issue. If your favorite scenery configuration editor DID support the proper P3D installation system, and allowed you to work exactly like you used to, this entire discussion would be totally useless, because you wouldn't even care if the sim didn't had an UI to begin with, if you could use a much more powerful dedicate tool.

So, again, the real issue is not that P3D doesn't allow to rearrange the Scenery Library entirely, or that this system is bad *because* of that, the real issue is that your Scenery Configuration Tool still doesn't support the method of adding content officially suggested in the P3D SDK, starting with 3. If it did, we wouldn't had this conversation.

  • Upvote 1

Share this post


Link to post

I didn't install any addon in V4 so far. I also first wanted to understand the new (or not so new) conventions a little better. After reading this topic things get clearer and i also see benefits of single xml files and so on.

But, definitely i hope for simstarterNG to be updated and give me the chance of rearranging or editing addons in a nice GUI.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...