Jump to content

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.

Share this post


Link to post
Posted (edited)

 

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

Share this post


Link to post
Posted (edited)
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

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?

Share this post


Link to post
Posted (edited)
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

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post
Posted (edited)
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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...