Using add-on.xml

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 7:28 am

I've tried to understand how the newer add-on process works by updating the fsAerodata folders to be part of the Add-ons rather than the scenery library.

I updated add-ons.cfg to include;
[Package.0]
Path=D:\Users\Kevin\Documents\Prepar3D v4 Add-ons\fsAerodata
ACTIVE=true
REQUIRED=true
In that location I included an add-on.xml file as follows;
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
    <AddOn.Name>fsAerodata</AddOn.Name>
    <AddOn.Description>Updated Navdata</AddOn.Description>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>Scenery\PROC_SIDs</Path>
        <Name>fsAerodata PROC_SIDs</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>Scenery\PROC</Path>
        <Name>fsAerodata PROC</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>Scenery\Navaids</Path>
        <Name>fsAerodata Navaids</Name>
    </AddOn.Component>
</SimBase.Document>
In sim, in the Add-ons menu I have one entry, showing the correct directory, but showing <no name provided> and <no description provided>

Can anyone point me towards a schoolboy error I might have made here please?
Thanks K!

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 7:49 am

ok, I've really not grasped this - all I'm trying to do is get the sim to automatically recognise my add-on.xml?
I understand now that my add-on.cfg was not what is was supposed to be - the add-on.xml is supposed to create the entries in there, but it's not being recognised?

In "Add-on Instructions for Developers", the sdk says;
In the case where the developer wants to have their add-on automatically discovered, the installation path should instead be: %USERPROFILE%\Documents\Prepar3d v4 Files\add-ons
I've placed my add on folder in that quoted directory. Inside that folder is the file "add-on.xml". It is still not being automatically recognised?

anthony31
Posts: 16
Joined: Sat Mar 31, 2012 10:56 pm

Re: Using add-on.xml

Postby anthony31 » Thu Jun 01, 2017 9:39 am

Here is the code I use to place an aircraft in the add-on folder. It does get automatically picked up by P3D if it is in the add-ons folder in the Documents folder.

Code: Select all

<SimBase.Document Type="AddOnXml" version="3,3" id="add-on"> <AddOn.Name>Ants Eaglet</AddOn.Name> <AddOn.Description>Tecnam Eaglet</AddOn.Description> <AddOn.Component> <Category>SimObjects</Category> <Path>Content\SimObjects\Airplanes</Path> </AddOn.Component> <AddOn.Component> <Category>Effects</Category> <Path>Content\Effects</Path> </AddOn.Component> </SimBase.Document>
You might be having a problem due to your pathways. What is the pathway structure within Scenery\PROC_SIDs? Are these valid scenery files? I think you might need to have a Scenery\PROC_SIDs\Scenery pathway structure for it to work with your Path of Scenery\PROC_SIDs.

User avatar
WarpD
Posts: 1440
Joined: Mon Feb 14, 2011 5:29 am

Re: Using add-on.xml

Postby WarpD » Thu Jun 01, 2017 1:56 pm

You should not have edited the addons.cfg file.
Ed Wilson
Senior Developer
Mindstar Aviation

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 2:32 pm

You should not have edited the addons.cfg file.
Thanks Ed I realised that by my second post. Having returned that cfg file to it's original state I'm still left with the original problem that the add-on.xml file isn't being automatically picked up by P3D4. The irony is I was trying to copy what you did in an earlier post to get it to work! Do you have any suggestions please? Thanks K

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 4:51 pm

Here is the code I use to place an aircraft in the add-on folder. It does get automatically picked up by P3D if it is in the add-ons folder in the Documents folder.

Code: Select all

<SimBase.Document Type="AddOnXml" version="3,3" id="add-on"> <AddOn.Name>Ants Eaglet</AddOn.Name> <AddOn.Description>Tecnam Eaglet</AddOn.Description> <AddOn.Component> <Category>SimObjects</Category> <Path>Content\SimObjects\Airplanes</Path> </AddOn.Component> <AddOn.Component> <Category>Effects</Category> <Path>Content\Effects</Path> </AddOn.Component> </SimBase.Document>
You might be having a problem due to your pathways. What is the pathway structure within Scenery\PROC_SIDs? Are these valid scenery files? I think you might need to have a Scenery\PROC_SIDs\Scenery pathway structure for it to work with your Path of Scenery\PROC_SIDs.
Tried adding the \Scenery bit - it didn't work...

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 4:53 pm

Placed the add-on.xml file here:

C:\Users\Kevin\Documents\Prepar3D v4 Add-ons\FsAerodata\add-on.xml

Still no joy...can anyone tell me what I'm doing wrong here please?

User avatar
WarpD
Posts: 1440
Joined: Mon Feb 14, 2011 5:29 am

Re: Using add-on.xml

Postby WarpD » Thu Jun 01, 2017 6:20 pm

You are using relative paths to the files... unless they are literally in the path that you placed the add-on.xml file as sub-folders... the sim finds nothing.

Replace the relative paths with absolute paths.
Ed Wilson
Senior Developer
Mindstar Aviation

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 8:48 pm

You are using relative paths to the files... unless they are literally in the path that you placed the add-on.xml file as sub-folders... the sim finds nothing.

Replace the relative paths with absolute paths.
I have replaced the relative paths with absolute paths, still with no success :(
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
    <AddOn.Name>FsAerodata</AddOn.Name>
    <AddOn.Description>Updated Navdata</AddOn.Description>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>C:\Users\Kevin\Documents\fsAerodata Files\Navigation Data\P3D\PROC_SIDs</Path>
        <Name>fsAerodata PROC_SIDs</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>C:\Users\Kevin\Documents\fsAerodata Files\Navigation Data\P3D\PROC</Path>
        <Name>fsAerodata PROC</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>C:\Users\Kevin\Documents\fsAerodata Files\Navigation Data\Navaids\Navaids</Path>
        <Name>fsAerodata Navaids</Name>
    </AddOn.Component>
</SimBase.Document>

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 8:50 pm

You are using relative paths to the files... unless they are literally in the path that you placed the add-on.xml file as sub-folders... the sim finds nothing.

Replace the relative paths with absolute paths.
I have replaced the relative paths with absolute paths, still with no success :(
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
    <AddOn.Name>FsAerodata</AddOn.Name>
    <AddOn.Description>Updated Navdata</AddOn.Description>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>C:\Users\Kevin\Documents\fsAerodata Files\Navigation Data\P3D\PROC_SIDs</Path>
        <Name>fsAerodata PROC_SIDs</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>C:\Users\Kevin\Documents\fsAerodata Files\Navigation Data\P3D\PROC</Path>
        <Name>fsAerodata PROC</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>C:\Users\Kevin\Documents\fsAerodata Files\Navigation Data\Navaids\Navaids</Path>
        <Name>fsAerodata Navaids</Name>
    </AddOn.Component>
</SimBase.Document>
I also as a test copied the entire 3 scenery folders to C:\Users\Kevin\Documents\Prepar3D v4 Add-ons\FsAerodata\ so that the relative paths would be accurate, and still the sim didn't autodetect anything?

User avatar
WarpD
Posts: 1440
Joined: Mon Feb 14, 2011 5:29 am

Re: Using add-on.xml

Postby WarpD » Thu Jun 01, 2017 9:51 pm

Ok, I have no idea what is inside the folders you are referencing. Scenery tends to have two folders: Scenery and Texture. So, is that what is inside the folders you're referencing?
Ed Wilson
Senior Developer
Mindstar Aviation

anthony31
Posts: 16
Joined: Sat Mar 31, 2012 10:56 pm

Re: Using add-on.xml

Postby anthony31 » Thu Jun 01, 2017 10:00 pm

I've just tested this with one of my add-on airports.

The folder structure was like this:

Prepar3D v4 Add-ons
--TEST
----add-on.xml
----Ants Hervey Bay
------Scenery
------Texture

This was the add-on.xml

Code: Select all

<SimBase.Document Type="AddOnXml" version="4,0" id="add-on"> <AddOn.Name>Ants Hervey Bay</AddOn.Name> <AddOn.Description>Harvey Bay</AddOn.Description> <AddOn.Component> <Category>Scenery</Category> <Path>Ants Hervey Bay</Path> </AddOn.Component> </SimBase.Document>
Starting P3D v4 it asks if I want to activate the add-on during the startup.

This however is completely and utterly pointless as you still have to add the scenery via the scenery library anyway. I'd recommend doing this instead of messing with add-on.xml as I think this should only be used for adding stuff to the default P3D v4/Scenery folder without overwriting the existing folders (I haven't looked into that too closely). For normal add-on scenery you should be using the scenery library menu system.

EDIT: thought I might actually check what fsaerodata is. I don't know what is in the folders you are trying to link to but I suspect they are not proper scenery folders ( do not contain .bgl files). If they are not then there is no point doing what you are trying. Reading the manual I suspect that fsaerodata makes a backup of the original .bgl files and replaces/updates them with the new data which is then used by the sim.

This is really a question that should be put to fsaerodata.
Last edited by anthony31 on Thu Jun 01, 2017 10:09 pm, edited 1 time in total.

User avatar
kevinfirth
Posts: 166
Joined: Wed May 15, 2013 11:24 am
Location: Kidderminster, UK
Contact:

Re: Using add-on.xml

Postby kevinfirth » Thu Jun 01, 2017 10:00 pm

Ok, I have no idea what is inside the folders you are referencing. Scenery tends to have two folders: Scenery and Texture. So, is that what is inside the folders you're referencing?
Yes just scenery folders with bgl's in them :)

ahuimanu
Posts: 66
Joined: Mon Dec 17, 2012 5:45 am

Re: Using add-on.xml

Postby ahuimanu » Sat Jun 03, 2017 6:13 pm

I've just tested this with one of my add-on airports.

The folder structure was like this:

Prepar3D v4 Add-ons
--TEST
----add-on.xml
----Ants Hervey Bay
------Scenery
------Texture

This was the add-on.xml

Code: Select all

<SimBase.Document Type="AddOnXml" version="4,0" id="add-on"> <AddOn.Name>Ants Hervey Bay</AddOn.Name> <AddOn.Description>Harvey Bay</AddOn.Description> <AddOn.Component> <Category>Scenery</Category> <Path>Ants Hervey Bay</Path> </AddOn.Component> </SimBase.Document>
Starting P3D v4 it asks if I want to activate the add-on during the startup.

This however is completely and utterly pointless as you still have to add the scenery via the scenery library anyway. I'd recommend doing this instead of messing with add-on.xml as I think this should only be used for adding stuff to the default P3D v4/Scenery folder without overwriting the existing folders (I haven't looked into that too closely). For normal add-on scenery you should be using the scenery library menu system.

EDIT: thought I might actually check what fsaerodata is. I don't know what is in the folders you are trying to link to but I suspect they are not proper scenery folders ( do not contain .bgl files). If they are not then there is no point doing what you are trying. Reading the manual I suspect that fsaerodata makes a backup of the original .bgl files and replaces/updates them with the new data which is then used by the sim.

This is really a question that should be put to fsaerodata.
Thanks Anthony, but that's not how FSDreamTeam are using it. I've been trying this too and whats happening with scenery is that an entry is NOT being made in add-ons.cfg, but only in the scenery_add-ons.xml file, which I can't find any documentation on in the sdk docs for v4. Thus, I can't figure out how to enable/disable scenery.

User avatar
WarpD
Posts: 1440
Joined: Mon Feb 14, 2011 5:29 am

Re: Using add-on.xml

Postby WarpD » Mon Jun 05, 2017 1:35 am

Ok, I have no idea what is inside the folders you are referencing. Scenery tends to have two folders: Scenery and Texture. So, is that what is inside the folders you're referencing?
Yes just scenery folders with bgl's in them :)
So the folder PROC_SIDs has multiple Scenery folders in it?
Ed Wilson
Senior Developer
Mindstar Aviation


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 5 guests