Lorby_SI

Installing add ons in V4

Recommended Posts

Now a few hours into the V4 development stream. I have to say, that the method of installing addon packages into the Documents folder and P3D looking them up automatically is really awesome! No need to fiddle with any of the config files or to copy content into central folders. Unless of course that is the point of your addon, like automated gauge installers, addons altering the aircraft.cfg etc. Those should take care to check the encoding.

btw. an addon package allows for absolute paths too, so a scenery or aircraft developer could let the user choose the installation path at will while still retaining the add-on.xml file in the proper place. Prepar3D will then discover the addon automatically (it will be interesting to see how this will affect load times, if you really have A LOT of addons in there).

Any user can create such an add-on.xml himself too, thus avoiding to screw up the scenery.cfg. I think that this calls for a new type of scenery addon manager app...

<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
    <AddOn.Name>MySceneries</AddOn.Name>
    <AddOn.Description>My sceneries that are already installed.</AddOn.Description>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>G:\OldSceneries\MyOldScenery01</Path>
        <Name>Scenery01</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>G:\OldSceneries\MyOldScenery02</Path>
        <Name>Scenery02</Name>
    </AddOn.Component>
</SimBase.Document>

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

-> SDK -> Add-ons -> Add-on Packages

Best regards

Share this post


Link to post
Help AVSIM continue to serve you!
Please donate today!

7 hours ago, Lorby_SI said:

I have to say, that the method of installing addon packages into the Documents folder and P3D looking them up automatically is really awesome!

Yes it is, now if we can just get 3rd party content providers to start using it and stop doing the FSX way.  :)

Cheers, Rob.

Share this post


Link to post
1 minute ago, Rob Ainscough said:

Yes it is, now if we can just get 3rd party content providers to start using it and stop doing the FSX way.  :)

Cheers, Rob.

That's just fine if there is sufficient space on the root hard drive's ..\Documents folder. What about those users who don't have available space on their root drive?

Share this post


Link to post
17 minutes ago, n4gix said:

That's just fine if there is sufficient space on the root hard drive's ..\Documents folder. What about those users who don't have available space on their root drive?

Not sure I understand, you can use absolute references in the Add-On.xml so content can reside anywhere.  Obtain absolute references from the installer per user choice.

Cheers, Rob.

  • Upvote 1

Share this post


Link to post
2 minutes ago, Rob Ainscough said:

Not sure I understand, you can use absolute references in the Add-On.xml so content can reside anywhere.

Thanks, Rob. I guess I should invest some time in reading the SDK/PDK for v4.x now. :laugh:

I will have to add that it is certainly making our "Universal Installer" scripts much more complex though. :emu_melk:

Share this post


Link to post
11 minutes ago, n4gix said:

Thanks, Rob. I guess I should invest some time in reading the SDK/PDK for v4.x now. :laugh:

I will have to add that it is certainly making our "Universal Installer" scripts much more complex though. :emu_melk:

I am dealing with a lot of flack around the net because many people have the same impression - that the add-ons are INSTALLED in the documents folder. Just the add-on.xml - no big deal.

Vic

Share this post


Link to post
8 hours ago, Lorby_SI said:

Now a few hours into the V4 development stream. I have to say, that the method of installing addon packages into the Documents folder and P3D looking them up automatically is really awesome! No need to fiddle with any of the config files or to copy content into central folders. Unless of course that is the point of your addon, like automated gauge installers, addons altering the aircraft.cfg etc. Those should take care to check the encoding.

btw. an addon package allows for absolute paths too, so a scenery or aircraft developer could let the user choose the installation path at will while still retaining the add-on.xml file in the proper place. Prepar3D will then discover the addon automatically (it will be interesting to see how this will affect load times, if you really have A LOT of addons in there).

Any user can create such an add-on.xml himself too, thus avoiding to screw up the scenery.cfg. I think that this calls for a new type of scenery addon manager app...


<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
    <AddOn.Name>MySceneries</AddOn.Name>
    <AddOn.Description>My sceneries that are already installed.</AddOn.Description>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>G:\OldSceneries\MyOldScenery01</Path>
        <Name>Scenery01</Name>
    </AddOn.Component>
    <AddOn.Component>
        <Category>Scenery</Category>
        <Path>G:\OldSceneries\MyOldScenery02</Path>
        <Name>Scenery02</Name>
    </AddOn.Component>
</SimBase.Document>

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

-> SDK -> Add-ons -> Add-on Packages

Best regards

Please help! I've been trying to do this and get P3D4 to automatically recognise a scenery package, but no matter where I place my add-on.xml file it isn't recognised :(  Where exactly should it be placed please?  The sdk seems to refer to %USERPROFILE%\Documents\Prepar3d v4 Files\add-ons, and other posts have referred to %USERPROFILE%\Documents\Prepar3D v4 Add-ons

Neither of these seem to work for me though :( 

Share this post


Link to post

Kevin,

Take a look at the V4 SDK documentation.

http://www.prepar3d.com/SDKv4/sdk/add-ons/add-ons_overview.html

The xml file goes in the same folder as the addon's top folder.  Only the file add-ons.cfg goes in one or both of the hidden folders. One version of add-ons.cfg seems to be for LM's use (ProgramData) and the other for the user's use. Both work however.

Jay

Share this post


Link to post
33 minutes ago, jabloomf1230 said:

Kevin,

Take a look at the V4 SDK documentation.

http://www.prepar3d.com/SDKv4/sdk/add-ons/add-ons_overview.html

The xml file goes in the same folder as the addon's top folder.  Only the file add-ons.cfg goes in one or both of the hidden folders. One version of add-ons.cfg seems to be for LM's use (ProgramData) and the other for the user's use. Both work however.

Jay

Jay Ive read the sdk repeatedly and still can't get it right! :(

Share this post


Link to post
1 hour ago, n4gix said:

Thanks, Rob. I guess I should invest some time in reading the SDK/PDK for v4.x now. :laugh:

Well you know I've been begging for LM to convert it to PDF, or ANYTHING other than CHM/HTML.  Such an important set of documents with the worst search feature known in the history of searches ... the CHM format.  LM would have to answer far less questions if they gave us a good document format and it would encourage more folks to read/develop products for P3D.

I've been pressing for such a document since V2.0 (3+ years ago) and I keep pressing today and tomorrow ... such an important document.

Cheers, Rob.

  • Upvote 1

Share this post


Link to post
5 minutes ago, Rob Ainscough said:

Well you know I've been begging for LM to convert it to PDF, or ANYTHING other than CHM/HTML.  Such an important set of documents with the worst search feature known in the history of searches ... the CHM format.  LM would have to answer far less questions if they gave us a good document format and it would encourage more folks to read/develop products for P3D.

I've been pressing for such a document since V2.0 (3+ years ago) and I keep pressing today and tomorrow ... such an important document.

Cheers, Rob.

it would help if it was in some places a little more logical and answered some more entry level questions.. I feel like some parts were written in Chinindian. :p

Share this post


Link to post
1 hour ago, kevinfirth said:

Please help! I've been trying to do this and get P3D4 to automatically recognise a scenery package, but no matter where I place my add-on.xml file it isn't recognised :(  Where exactly should it be placed please?  The sdk seems to refer to %USERPROFILE%\Documents\Prepar3d v4 Files\add-ons, and other posts have referred to %USERPROFILE%\Documents\Prepar3D v4 Add-ons

Neither of these seem to work for me though :( 

Hi Kevin,

Here are two working examples from my first "converted" addons:

C:\Users\obinder\Documents\Prepar3D v4 Add-ons\Lorby-SI FireFighterX_P3D_V4\add-on.xml

C:\Users\obinder\Documents\Prepar3D v4 Add-ons\Lorby-SI WhereAreMyAircraft_P3D_V4\add-on.xml

What could be improved a little bit is if P3D would look into \Prepar3D v4 Add-ons\ recursively, at least one or two steps. So a developer could group his/her addons into subfolders. The way it is now, you have to adhere strictly to the "Prepar3D v4 Add-ons\<subfolder>\add-on.xml" structure.

Best regards

 

Share this post


Link to post
1 hour ago, Lorby_SI said:

Hi Kevin,

Here are two working examples from my first "converted" addons:

C:\Users\obinder\Documents\Prepar3D v4 Add-ons\Lorby-SI FireFighterX_P3D_V4\add-on.xml

C:\Users\obinder\Documents\Prepar3D v4 Add-ons\Lorby-SI WhereAreMyAircraft_P3D_V4\add-on.xml

What could be improved a little bit is if P3D would look into \Prepar3D v4 Add-ons\ recursively, at least one or two steps. So a developer could group his/her addons into subfolders. The way it is now, you have to adhere strictly to the "Prepar3D v4 Add-ons\<subfolder>\add-on.xml" structure.

Best regards

 

My example is: C:\Users\Kevin\Documents\Prepar3D v4 Add-ons\FsAerodata\add-on.xml  , so it should work?

Is there anything else that I need to be thinking about apart from a properly constructed xml file in the right place?  Cheers K

Share this post


Link to post

PM me your add-ons.cfg and add-on.xml file with their folder locations. Maybe I can figure something out.

Share this post


Link to post

Kevin,

 

NM, I just saw your thread on the LM support forum. What you are doing wrong is not explicitly referencing the ..\scenery subfolder in the path statement in your add-on.xml file.  The add-on content method is not like adding an item directly to scenery.cfg, where P3d always assumed that the target has a scenery subfolder. For example in add-on.xml:

g:\Program Files (x86)\Addon Manager\FsDreamTeam\KCLT\Scenery

Now if the add-on also has a texture file, it would be referenced with the \texture subfolder and so on.

Jay

Share this post


Link to post
14 minutes ago, jabloomf1230 said:

Kevin,

 

NM, I just saw your thread on the LM support forum. What you are doing wrong is not explicitly referencing the ..\scenery subfolder in the path statement in your add-on.xml file.  The add-on content method is not like adding an item directly to scenery.cfg, where P3d always assumed that the target has a scenery subfolder. For example in add-on.xml:

g:\Program Files (x86)\Addon Manager\FsDreamTeam\KCLT\Scenery

Now if the add-on also has a texture file, it would be referenced with the \texture subfolder and so on.

Jay

I tried referencing the scenery subfolder in the add-on.xml ...guess what? no joy! :p

Share this post


Link to post

My guess is that you've got some type of subtle typo somewhere in either one or both of the files. This new add-on method can be very frustrating until you get the hang of it and all the options. Let's go back to Plan A and PM me the  most recent versions of your two files as attachments, plus where they are installed.

Share this post


Link to post

Don't want to spoil discussion but does the old fashioned method of using dll.xml and exe.xml still work?

Share this post


Link to post
4 hours ago, jabloomf1230 said:

 What you are doing wrong is not explicitly referencing the ..\scenery subfolder in the path statement in your add-on.xml file. 

...

g:\Program Files (x86)\Addon Manager\FsDreamTeam\KCLT\Scenery

Now if the add-on also has a texture file, it would be referenced with the \texture subfolder and so on.

 

Don't think that's right (but I'm a P3D newbie), I'm having a blast trying out all the sceneries I have installed in FSX by just writing a short xml file, and I've always referenced the folder containing the scenery and texture directories .

I love this system btw.  I've written a small eulogy over on the AI Ships thread :)

 

 

Share this post


Link to post

Anybody tried adding AS EGLL to v4? Seeing missing taxiway/runway surfaces although the terrain folder is below the airport in the library.

Share this post


Link to post
4 hours ago, jabloomf1230 said:

My guess is that you've got some type of subtle typo somewhere in either one or both of the files. This new add-on method can be very frustrating until you get the hang of it and all the options. Let's go back to Plan A and PM me the  most recent versions of your two files as attachments, plus where they are installed.

Thanks Jay but I've got no idea how to use these new damn forums with attachments.  When I create a PM there's an option to "insert existing attachment" but that brings up an empty list.  I've no idea how to add a file to it :(  Bad week for me this isn't it! :p

Share this post


Link to post

With V3 I have my addons devided over 3 SSD's ( total 1200 Gb ) so how am I going to do it now with V4 ?

 

Share this post


Link to post

Where's Estonia Migration Tool when you need them?  I hoping they will become available with an update to V-4

Share this post


Link to post
1 minute ago, joemiller said:

Where's Estonia Migration Tool when you need them?  I hoping they will become available with an update to V-4

You cant use a migration tool to just easily convert from 32 to 64 bit. It is much, much deeper than that. The Estonia tool changed certain FSX paths and structures to work with P3D, often causing errors and corruptions in the process. Converting to 64 bit is a whole nother animal - for example, even Microsoft don't support upgrading from a 32 to a 64 bit Windows. Clean install or nothing. XML gauges may work fine, and be able to be converted using a migration tool, but and .dll, .exe or other executable and dll code will need to be modified and recompiled by the developer.

Think of it this way - can you think of any products that could, for example, "migrate" Microsoft Office 2000 to a 64-bit structure? No. Not gonna happen. Much like a migration tool for 32 > 64 bit FSX / P3D addons.

Share this post


Link to post
12 minutes ago, 77west said:

You cant use a migration tool to just easily convert from 32 to 64 bit. It is much, much deeper than that. The Estonia tool changed certain FSX paths and structures to work with P3D, often causing errors and corruptions in the process. Converting to 64 bit is a whole nother animal - for example, even Microsoft don't support upgrading from a 32 to a 64 bit Windows. Clean install or nothing. XML gauges may work fine, and be able to be converted using a migration tool, but and .dll, .exe or other executable and dll code will need to be modified and recompiled by the developer.

Think of it this way - can you think of any products that could, for example, "migrate" Microsoft Office 2000 to a 64-bit structure? No. Not gonna happen. Much like a migration tool for 32 > 64 bit FSX / P3D addons.

Interesting, Wes. I have installed just a couple of scenery to the Add-on folder within P3D V-4  and they are working fine. But, I'm sure a lot of other addons will not work, as you explained above.  I'm trying to understand what these guys have been discussing on this thread. If we were to follow those steps, could they potentially work in V-4? By creating an XML file?  Is that file created using like note-pad? Or..? Sorry, really blind on this. lol

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