Jump to content
Sign in to follow this  
Stephen Simpson

The XML Method

Recommended Posts

Hi folks,

I have a few add ons which dont use the XML method and was wondering how to force these into XML.

I have watched Matt Davies tutorial on it but I am still stumped a bit.

Any assistance would be appreciated as I would like to port everything over to seperate drives using XML before upgrading to 4.5.

Thanks

Steve.


Stephen Simpson

Systems: Flight System: AMDRyzen7 7800X3D, 32GB DDR, RTX4090,Windows 11.

Utilities System: I7 8700K 4.8Ghz,32GB 3000 DDR4 RAM,1x1TB SSD,Geforce GTX1080ti 11GB,Windows 11.

Share this post


Link to post

 

19 minutes ago, Stephen Simpson said:

Hi folks,

I have a few add ons which dont use the XML method and was wondering how to force these into XML.

I have watched Matt Davies tutorial on it but I am still stumped a bit.

Any assistance would be appreciated as I would like to port everything over to seperate drives using XML before upgrading to 4.5.

Thanks

Steve.

Lorby makes it easy. And it's free.
Scroll down a bit.
Lorby Prepar3D V4 Addon Organizer

Edited by BillS511

 

 

Share this post


Link to post

If you are not familiar I would try Lorby tool that can help.

technically you to tell to P3d where to find all folder to load upon lunch.

The problem rise when you have those file that needs to go in the scenery\world  folder of P3d such as flatten or texture.

such us ICAO_ALT.bgl

check this for info

http://www.prepar3d.com/SDKv4/LearningCenter.php

check Add-on Packages in the SDK

in the current position, you need to create a folder with the scenery name usually Icao etc.

C:\Users\Armour\Documents\Prepar3D v4 Add-on

this is an example of a text file that needs to be named add-on.xml on that folder created before.

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Scenery</AddOn.Name>
  <AddOn.Description>Sim Scenery</AddOn.Description>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>E:\xxxxx\xxxxx\scenery_LC</Path>
    <Name>scenery_LC</Name>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>E:\xxxxx\xxxxx\Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Texture</Category>
    <Path>E:\xxxxx\xxxxx\texture</Path>
    <Type>WORLD</Type>
  </AddOn.Component>
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>E:\xxxxx\xxxxx\AIShips</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>E:\xxxxx\xxxxx\world</Path>
    <Name>Scenery-World</Name>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>E:\xxxxx\xxxxx\scenery</Path>
    <Name>Scenery</Name>
  </AddOn.Component>
</SimBase.Document>

Good luck


 

 

Share this post


Link to post

Thanks for the replies folks.  I will take a look and see whats what.

S

 


Stephen Simpson

Systems: Flight System: AMDRyzen7 7800X3D, 32GB DDR, RTX4090,Windows 11.

Utilities System: I7 8700K 4.8Ghz,32GB 3000 DDR4 RAM,1x1TB SSD,Geforce GTX1080ti 11GB,Windows 11.

Share this post


Link to post
1 hour ago, simbio said:

...
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>E:\xxxxx\xxxxx\world</Path>
    <Name>Scenery-World</Name>
  </AddOn.Component>
...

This would probably also need the line

<Type>World</Type>

as the default is "Global"

 

Karl


i9-9900K@5,0   |  32GB 3200  |  2080TI  |  4K 55"  |  MSFS | P3D V5

Share this post


Link to post
1 hour ago, kaha said:

<AddOn.Component>
    <Category>Scenery</Category>

….

This would probably also need the line

<Type>World</Type>

as the default is "Global"

 

Karl

Sorry, but no. <Type> can only be used with textures.

Quote

The type identifier string determines what kind of path the entry refers to. At this moment, only texture components support this feature.

C:\Program Files\Lockheed Martin\Prepar3D v4\Learning Center.chm -> Software Development Kit (SDK) -> Add-ons -> Add-on Packages

describes all that there is to know.

And because there has been a lot of confusion about this, a few more hints:

  • You don't need a single add-on.xml for every single scenery. One add-on.xml can hold any number of addons
  • add-on.xml files can link any kind of content to the simulator. The package that is loaded last prevails, so you can elegantly add for example a texture or shader replacement that way without having to overwrite core simulator files.
  • If a scenery addon has subfolders \Scenery and \Texture, do not add them as separate components. Just target the top folder of the scenery area, like you always did with entries in the scenery.cfg. 
  • If you write (any) XML files manually, please make sure that they adhere to W3C specification, especially concerning character encoding and case sensitivity. https://www.w3.org/TR/xml/

Best regards

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post

Thx. 

 

What I always wanted to know is if there is a Layer entry for a Scenery in an add-on.xml, let's say 250, what happens if I have so many entries in the scenery.cfg that the topmost ORBX FTX entry is number 400. The new add-on scenery would then be placed below or in between the ORBX entries?


i9-9900K@5,0   |  32GB 3200  |  2080TI  |  4K 55"  |  MSFS | P3D V5

Share this post


Link to post
13 minutes ago, kaha said:

What I always wanted to know is if there is a Layer entry for a Scenery in an add-on.xml, let's say 250, what happens if I have so many entries in the scenery.cfg that the topmost ORBX FTX entry is number 400. The new add-on scenery would then be placed below or in between the ORBX entries?

Different scenery components can have the same layer number, but only in add-on.xmls. If you have 400 entries in the scenery cfg and an additional layer 250 in an add-on.xml, then the scenery from the add-on.xml will be inserted between layer 250 and 251 as seen from the scenery.cfg.

If you are interested in how your scenery library really looks like, take a look at the Scenery Index Report in my P4AO app. This will tell you in what order your scenery files are actually read by the simulator. 

Best regards

Edited by Lorby_SI
  • Upvote 1

LORBY-SI

Share this post


Link to post

Then it could be possible that an add-on.xml scenery gets place below all ORBX entries, which could cause malfunction.

 

And, what if an add-on.xml scenery would need a FTX Central elevation correction? Isn't that a problem too?

Edited by kaha

i9-9900K@5,0   |  32GB 3200  |  2080TI  |  4K 55"  |  MSFS | P3D V5

Share this post


Link to post
7 minutes ago, kaha said:

Then it could be possible that an add-on.xml scenery gets place below all ORBX entries, which could cause malfunction.

 

And, what if an add-on.xml scenery would need a FTX Central elevation correction? Isn't that a problem too?

1. You can always check the scenery library dialog in the simulator if the scenery is where you expect it to be. This is no different to setting a wrong layer in the scenery.cfg itself.

2. No, because the FTX AEC files are the first thing that the simulator reads. As stated above, take a look at the Scenery Index Report. 

Best regards

Edited by Lorby_SI

LORBY-SI

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...