Jump to content
Sign in to follow this  
captain420

How to manually add scenery/addons into P3D v4 the right way

Recommended Posts

8 hours ago, B777ER said:

Wow, lot of work just to add some scenery. Currently in P3DV3 I have all my Taxi2gate and LatinVFR scenery installed outside the main  P3D folder and linked back via the scenery.cfg file. When I have e upgraded P3D in the past I have a backup copy of my scenery.cfg file. After a new install of P3D I simply go to that backup file and copy/paste the scenery entries into the new scenery.cfg. Is there ANY reason I cannot do this same method for P3D v4? 

Eric,

I just pointed the P3DV4 scenery library to some my installs in P3DV3.4 that did not have a dedicated P3DV4 installer. It let me see what would work and what does not without running an installer.

Greg


Greg Morin

Commercial ASMEL Instrument CFI

Beta Tester i Blue Yonder, Flightbeam and Milviz

 

Share this post


Link to post
Share on other sites
49 minutes ago, MarkW said:

@Lorby_SI, I wonder if you could explain in more simple term what this tool does.  Perhaps an example will help.

I have tried to install several P3Dv3 airports into v4 by just pointing the installer to v4.  I then added the scenery using the P3D Scenery manager but they did not show up or crashed the sim.  So what will your app do once I have installed the scenery or am I going about this all wrong to start with?  I see some people are installing sceneries to other locations outside of the sim, which makes sense but I thought lots of these sceneries have effects etc. that need to go into the correct folder ?  

Hi Mark,

My tool is not only about scenery. If you want to use it, is entirely a matter of taste. A users manual is uncluded in the download, please read it before using it.

For example, there are at least four different ways how to add scenery to this simulator:

1. Copy the relevant BGL files into a scenery folder that already exists, for example the defaul scenery folder in the simulator main directory

2. Save the BGL files into the usual structure "MyScenery\Scenery" + "\MyScenery\Texture" anywhere on your computer and reference it by using the simulators Scenery manager to add it to the scenery.cfg config file (or manually edit scenery.cfg)

3. Using the same install structure as 2, add the scenery to add-ons.cfg (in the same folder where scenery.cfg is). There is a command line example in the SDK how to do that. For this to work you need an additional file, the add-on.xml, describing where the addon itself is installed

4. New with P3D V4 is the option to create only the add-on.xml and drop it into a specific folder, and P3D will automatically read it on startup and display the scenery (still using install option 2.)

My tool manages all the addons across all these 4 options. That means it not only handles scenery, but every type of addon. Options 3 and 4 work for every type of content (aircraft, gauges, sounds, textures, effects, scaleforms, scripts - everything). You just point the organizer at the folder that you want to reference and it will create the necessary XML files for you. The only thing it does not do is to add scenery to the scenery.cfg - that would be beside the point IMHO.

The issue as I see it currently is, that people are installing scenery and other addons that were not made for this version of the sim. As the folder structure is still largely the same, the installers mostly work, and you may even get a result in the sim. But injecting "old" content causes content errors, loss of performance and stutters, if there is enough of incompatible stuff that the sim has to deal with (handling errors is more expensive than just doing the job). Turn on content error logging and see for yourself.

Although the methods 3 and 4 are geared towards developers, I can only recommend to everyone to not install anything into the main simulator folders and not to alter the config files. By keeping content away from the sim you can get rid of it again very easily, besides the fact that it will survive a complete simulator reinstall.

Best regards

 


LORBY-SI

Share this post


Link to post
Share on other sites
9 hours ago, B777ER said:

Wow, lot of work just to add some scenery. Currently in P3DV3 I have all my Taxi2gate and LatinVFR scenery installed outside the main  P3D folder and linked back via the scenery.cfg file. When I have e upgraded P3D in the past I have a backup copy of my scenery.cfg file. After a new install of P3D I simply go to that backup file and copy/paste the scenery entries into the new scenery.cfg. Is there ANY reason I cannot do this same method for P3D v4? 

No, there is no reason.

If you follow the recommendation of the manufacturer or not is up to you.

For me it is a matter of principle.

  • LM describes in the SDK how to add content, and this is the method how it is done. What that tells the developer is: "Stay away from the config files".
  • As an end user you have no business altering the config files. They might change, they might disappear, they might have a different encoding, a different meaning with every update of the base software. That is why we put config files into hidden folders and don't provide documentation about what all the options do.
  • The method of adding content to an application through automatically discovered (XML) files is very common in the real software world. This is just how things are done

Again to me personally, this is a huge step into the direction of making P3D a professional piece of software. All this fiddling and hacking and tweaking may be a hobby in itself, but if you really need this platform as a professional customer, then this is not what you want to do. Time is money.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites

Thanks for the detailed explanation Oliver.  I will try it out but I think you are 100% correct that we should stop trying to shoehorn v3 software into v4 and just wait for the compatible installers from the original developers.


Mark W   CYYZ      

My Simhttps://goo.gl/photos/oic45LSoaHKEgU8E9

My Concorde Tutorial Videos available here:  https://www.youtube.com/user/UPS1000
 

 

Share this post


Link to post
Share on other sites
31 minutes ago, MarkW said:

Thanks for the detailed explanation Oliver.  I will try it out but I think you are 100% correct that we should stop trying to shoehorn v3 software into v4 and just wait for the compatible installers from the original developers.

Hi Mark,

not only compatible installers, there is more to it. We should make sure that the products have been updated to V4 specification, using the V4 SDK. Otherwise the number of threads of "bad performance" and "stutters - help" will grow again. Just out of curiosity, turn on the content error logging in P3D (first page of the settings) and take a look into the resulting file in "Documents/Prepar3D V4 Files". Everything that you see in there causes a tiny problem. Enough tiny problems result in bigger problems. Etc.

Best
Oliver


LORBY-SI

Share this post


Link to post
Share on other sites
14 hours ago, Lorby_SI said:

Hi Dan,

no, this is in the add-on.xml. If I add the top folder of a scenery as a "Scenery" addon component (like we did with scenery.cfg) but leave out the name, then the above error will appear in the content log - and the scenery will not show.

Best regards

Interesting.  Every scenery component for which I have omitted a Name element does appear in the scene and is referenced in the programdata\scenery_add-ons.xml, which lists all addon scenery components.  True, it's not in the Scenery Library UI but it's still there nonetheless.  I wonder why the Name would be mandatory in your configuration but not mine. True, the content error is listed but regardless the scenery appears.  I suspect that the content error list is being verbose, and not every error is a significant error, as was the case with P3Dv3 error reports.

I've asked LM in their forum to comment on if it is optional or mandatory:

Quote: The SDK is pretty clear in that a Name element is optional for scenery components; however, the ContentErrors.txt report will identity every scenery component with a missing Name as "TITLE argument is mandatory." Which is it? I am aware that if the name is missing then the component is not listed in the Scenery Library UI, but I am under the impression that the unnamed component is still active because it exists in the scenery_add-ons.xml. Why the content error?


Dan Downs KCRP

Share this post


Link to post
Share on other sites
18 minutes ago, downscc said:

Interesting.  Every scenery component for which I have omitted a Name element does appear in the scene and is referenced in the programdata\scenery_add-ons.xml, which lists all addon scenery components.  True, it's not in the Scenery Library UI but it's still there nonetheless.  I wonder why the Name would be mandatory in your configuration but not mine. True, the content error is listed but regardless the scenery appears.  I suspect that the content error list is being verbose, and not every error is a significant error, as was the case with P3Dv3 error reports.

I've asked LM in their forum to comment on if it is optional or mandatory:

Quote: The SDK is pretty clear in that a Name element is optional for scenery components; however, the ContentErrors.txt report will identity every scenery component with a missing Name as "TITLE argument is mandatory." Which is it? I am aware that if the name is missing then the component is not listed in the Scenery Library UI, but I am under the impression that the unnamed component is still active because it exists in the scenery_add-ons.xml. Why the content error?

Hi Dan,

there must be something else. I have tested it now for the third time with the same result. I have linked Aerosoft LIEO and Megascenery Italy through two different add-on.xml. With a name tag, they work fine, if I remove the name, then they are both gone. I am always linking the top folder, the one containing the subdirectories "Scenery" and "Texture" because that way I can get both in one single sweep.

TBH, the way that you describe it makes me feel uncomfortable, that sounds like a bug. Scenery that is invisible in the library just doesn't feel right to me. Besides, I would always want to make an application happy that is complaining in an error log. I have no idea what other issues may be related to an error message (which took effort to code), so I try to avoid them.
Which is why I made the title/name mandatory in my addon organizer app

Best
Oliver

 


LORBY-SI

Share this post


Link to post
Share on other sites
3 minutes ago, Lorby_SI said:

there must be something else. I have tested it now for the third time with the same result.

I can confirm the behavior Oliver is seeing - the first add-on.xml file I created for scenery prompted me to be imported but the scenery itself never showed up either in the sim or in the scenery library. After adding the name tag based on the advice in this thread, the scenery was both visible in the sim and in the scenery library.

(shrug)

Interesting that it works for some but not others. Perhaps it is a good topic to raise with Lockheed.

Share this post


Link to post
Share on other sites
1 hour ago, Lorby_SI said:

there must be something else. I have tested it now for the third time with the same result. I have linked Aerosoft LIEO and Megascenery Italy through two different add-on.xml. With a name tag, they work fine, if I remove the name, then they are both gone. I am always linking the top folder, the one containing the subdirectories "Scenery" and "Texture" because that way I can get both in one single sweep.

I thought about trying to just "link" the top folder, with subfolders scenery and texture, and now will certainly try that.  This could be a key difference then because I follow the method used by FSDT/FB where by each scenery and texture folder is a separate addon.component.  This is implied in the SDK but it is not explicit in any sense.  For the same reason, I have questions about how to reference a SimObjects folder such as the one FlyTampa creates for boats.  FlyTampa creates a SimObjects\Boats directory with a number of subdirectories for each type of boat and I wonder the correct way to reference that in the add-ons.xml.  The Category is SimObjects, but is the path SimObjects or SimObjects\boats, or even a separate component for each type of boat?  I don't know yet.

At least I have a general idea of why the link may work with or without a name:  It depends on if you like the top folder or the individual scenery and texture folders. It is interesting.


Dan Downs KCRP

Share this post


Link to post
Share on other sites

ok, I have a question - some scenery addons specify user should copy certain files into the World/Scenery folder.

Under the add-on.xml method, I don't see any way to specify a specific folder. What is the layer of the W/S folder and when docs say install INTO that folder, would that mean it's a layer above or a layer below/

What brings this up is the AI BOat traffic says to put all the xxtraffic.bgl files into the World/Scenery folder.

Thanx

Vic


 

RIG#1 - 7700K 5.0g ROG X270F 3600 15-15-15 - EVGA RTX 3090 1000W PSU 1- 850G EVO SSD, 2-256G OCZ SSD, 1TB,HAF942-H100 Water W1064Pro
40" 4K Monitor 3840x2160 - AS16, ASCA, GEP3D, UTX, Toposim, ORBX Regions, TrackIR
RIG#2 - 3770K 4.7g Asus Z77 1600 7-8-7 GTX1080ti DH14 850W 2-1TB WD HDD,1tb VRap, Armor+ W10 Pro 2 - HannsG 28" Monitors
 

Share this post


Link to post
Share on other sites
9 hours ago, downscc said:

I thought about trying to just "link" the top folder, with subfolders scenery and texture, and now will certainly try that.  This could be a key difference then because I follow the method used by FSDT/FB where by each scenery and texture folder is a separate addon.component.  This is implied in the SDK but it is not explicit in any sense.  For the same reason, I have questions about how to reference a SimObjects folder such as the one FlyTampa creates for boats.  FlyTampa creates a SimObjects\Boats directory with a number of subdirectories for each type of boat and I wonder the correct way to reference that in the add-ons.xml.  The Category is SimObjects, but is the path SimObjects or SimObjects\boats, or even a separate component for each type of boat?  I don't know yet.

At least I have a general idea of why the link may work with or without a name:  It depends on if you like the top folder or the individual scenery and texture folders. It is interesting.

Hi Dan,

when I updated my own products and made my tool I was reading the specification too - but I interpreted it differently. P3D is obviously capable of recursion in one step. So if the individual folders of the boats with the sim.cfgs in them are saved in "SimObjects\Boats", then this is what you link in the add-on.xml. P3D will automatically discover the models using the same method it always did, it just needs the root folder. This is the same for scenery.

Which brings me to the conclusion that the add-on.xml method is just a wrapper around the existing logic, the process reads the add-on.xml and injects the paths that it found into the "normal" routine that is parsing those folders. Makes sense too, why would LM implement two different methods.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites
7 hours ago, vgbaron said:

ok, I have a question - some scenery addons specify user should copy certain files into the World/Scenery folder.

Under the add-on.xml method, I don't see any way to specify a specific folder. What is the layer of the W/S folder and when docs say install INTO that folder, would that mean it's a layer above or a layer below/

What brings this up is the AI BOat traffic says to put all the xxtraffic.bgl files into the World/Scenery folder.

Thanx

Vic

Hi Vic,

I have created a separate folder for all those files "My Base Scenery" and linked it at layer "2".  This loads it right before all the default scenery areas are read.

If a layer number is identical in add-on.xml and scenery.cfg, then the add-on.xml has higher priority At least that is what it looks like when I check the scenery library in the P3D dialog - and this is what my Addon Organizer shows. Could be wrong though.
I am just applying the finishing touches to the next version. It will gain a package tree view and the option to import an existing scenery.cfg as an additional add-on.xml component.

Best regards

 


LORBY-SI

Share this post


Link to post
Share on other sites

AH - that makes sense. I'll give that a try.  BTW, created an addon and installed it - decided I didn't want it so using the tool, I deleted it. I also deleted the folder from the documents add on folder. After next run of p3d I got content error about missing add on. Tracked ot down to the fact that the name of the addon I deleted had not een deleted from the p3d addon cfg file. Deleted it from there and all is wel.

Vic


 

RIG#1 - 7700K 5.0g ROG X270F 3600 15-15-15 - EVGA RTX 3090 1000W PSU 1- 850G EVO SSD, 2-256G OCZ SSD, 1TB,HAF942-H100 Water W1064Pro
40" 4K Monitor 3840x2160 - AS16, ASCA, GEP3D, UTX, Toposim, ORBX Regions, TrackIR
RIG#2 - 3770K 4.7g Asus Z77 1600 7-8-7 GTX1080ti DH14 850W 2-1TB WD HDD,1tb VRap, Armor+ W10 Pro 2 - HannsG 28" Monitors
 

Share this post


Link to post
Share on other sites
1 hour ago, vgbaron said:

AH - that makes sense. I'll give that a try.  BTW, created an addon and installed it - decided I didn't want it so using the tool, I deleted it. I also deleted the folder from the documents add on folder. After next run of p3d I got content error about missing add on. Tracked ot down to the fact that the name of the addon I deleted had not een deleted from the p3d addon cfg file. Deleted it from there and all is wel.

Vic

Hi Vic,

many thanks for the bug report. Unfortunately the assigned package is not cleaned out from the config object. Noted for the next version.

Best
Oliver


LORBY-SI

Share this post


Link to post
Share on other sites
11 hours ago, downscc said:

each scenery and texture folder is a separate addon.component.  This is implied in the SDK but it is not explicit in any sense. 

Hi Dan,

in the SDK->World->Terrain->Terrain Overview, chapter "Place the new files in Prepar3D" it still describes a "Scenery area" as being the element that is added to the scenery library (which is probably why they have their tags named "[Area..."). And an "area" consists of both "Scenery" and "Texture" subfolders, so I thought it natural, that this is what they mean by the component Category "Scenery". Category "Texture" content could be anything, textures for aircraft or objects too - it is just a lookup reference after all. But a "Scenery" in the classic sense IMHO should be visible as a scenery area in the library, otherwise it is just hidden content that you might not be aware of. And I think that it complicates layering, unless you would use my tool or similar external help.

Best
Oliver


LORBY-SI

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
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...