Jump to content
Sign in to follow this  
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


LORBY-SI

Share this post


Link to post
Guest
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?


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Guest
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.

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:


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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


 

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


Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas16 3600 DDR4; RTX3090; AutoFPS; FG mod

Beta tester for: UK2000; JustFlight; VoxATC; FSReborn; //42

xaP1VAU.png

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! :(


Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas16 3600 DDR4; RTX3090; AutoFPS; FG mod

Beta tester for: UK2000; JustFlight; VoxATC; FSReborn; //42

xaP1VAU.png

Share this post


Link to post
Guest
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.

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


Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas16 3600 DDR4; RTX3090; AutoFPS; FG mod

Beta tester for: UK2000; JustFlight; VoxATC; FSReborn; //42

xaP1VAU.png

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

 


LORBY-SI

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


Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas16 3600 DDR4; RTX3090; AutoFPS; FG mod

Beta tester for: UK2000; JustFlight; VoxATC; FSReborn; //42

xaP1VAU.png

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

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