Orbitandy

Addon XML method for aircraft?

Recommended Posts

Posted (edited)

After successfully migrating all my sceneries with this nifty tool I’m wondering about my add on aircraft. I suspect it’s possible - how should I proceed?

- Looking at my A2A folder which is already installed outside P3D, I see the associated addon xml in that folder and not where P4AO installs (my documents). Hmm.

- I already have Simobjects, Effects and Sound components in the “other addons” tab which is used for my scenery. Can I create new components with different names like “Aircraft Simobjects” and so on to avoid conflicts? Also, apart from these and a gauges folder are any other folders required?

- Should I make one of each folder and dump all associated files from each aircraft as I go along or should I create a whole structure for each and every aircraft (so each aircraft would  have its own folder with sub folders?

Looking at my P3D gauges folder it’s going to fun discerning what belongs to what...

thanks for any insight.

Edited by Orbitandy

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Posted (edited)

The easiest option by far is to direct the installer to an empty directory and build the add-on.xml from that. Always bear in mind that you may want to uninstall or update(!) an addon - when you move the files, that is impossible (the installer/uninstaller programs don't know where they went)!

The location of the add-on.xml has nothing to do with the location of the assets, that is completely arbitrary. And an add-on.xml doesn't have to be in \Documents\P3D adds either. P4AO uses the autodiscovery folder, so the user has one less decision to make (= where to put the add-on.xml).

I have organized my aircraft by developer. I am just assuming that the installers of one developer will always work in pretty much the same way, so I am just directing them at the same folder. To explain my setup: I have a dedicated 1TB SSD with only Windows 10 and the simulator on it (and ORBX...). For the sceneries I have two additional 1TB SSDs, and for other addons an additional 1TB NVME. To avoid having addons ending up on the main drive, I have symlinked "\Documents\Prepard3D V4 Add-ons" to the NVME. So an installer will not notice that it isn't installing on C:..

As an example, I have a folder for all Carenado aircraft: "H:\Prepar3D v4 Add-ons\Carenado". "H:\Prepar3D v4 Add-ons" is symlinked from "C:\Users\obinder\Documents\Prepar3D v4 Add-ons", that way P3D will search for add-on.xmls there (that was before I became aware of discovery paths). So when the installer asks me where I want to install, I point it at "\Documents\Prepar3D v4 Add-ons\Carenado". All installers create folders that aren't there, so all assets end up in their correct folders automatically. Then I made this add-on.xml:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Carenado</AddOn.Name>
  <AddOn.Description />
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\SimObjects\Airplanes</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Fonts</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Fonts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Texture</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Texture</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Gauges</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Gauges</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scripts</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Scripts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>DLL</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Carenavigraph.dll</Path>
    <Name>Carenavigraph</Name>
  </AddOn.Component>
  <AddOn.Component>
    <Category>DLL</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\CMeteoXml.dll</Path>
  </AddOn.Component>
</SimBase.Document>

Every new Carenado aircraft that I buy, I simply install into the same folder - since the add-on.xml is already in place, there is nothing else to do.

A few things to be aware of are the sounds, scripts and NaviGraph data.
Many advanced aircraft models use gauges to play custom sounds - and those gauges often don't find the corresponding sound files, since they use relative paths from the folder where they are executed - which is the P3D main folder. Same goes for lua scripts and Navigraph data.
Long story short, I copy the Sound, Scripts, Navigraph etc. folders from my custom location above to the corresponding folders in P3D. AFAIK there are plans to make the execution directory of the DLLs the folder where they are located, then this problem would go away. But I am not aware that this has already taken place.

Best regards

Edited by Lorby_SI
  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks for asking and posting this.  I've tried unsuccessfuly to port my iFly outside of the main install directory.  Looks Like I was using the DLL category wrong and not pointing it to the DLL but the directory instead.  Will try this!

Share this post


Link to post
Share on other sites

Thanks very much Oliver, I'll take a look at it when I'm back from my trip.

Share this post


Link to post
Share on other sites
On 5/24/2019 at 11:29 AM, Lorby_SI said:

The easiest option by far is to direct the installer to an empty directory and build the add-on.xml from that. Always bear in mind that you may want to uninstall or update(!) an addon - when you move the files, that is impossible (the installer/uninstaller programs don't know where they went)!

The location of the add-on.xml has nothing to do with the location of the assets, that is completely arbitrary. And an add-on.xml doesn't have to be in \Documents\P3D adds either. P4AO uses the autodiscovery folder, so the user has one less decision to make (= where to put the add-on.xml).

I have organized my aircraft by developer. I am just assuming that the installers of one developer will always work in pretty much the same way, so I am just directing them at the same folder. To explain my setup: I have a dedicated 1TB SSD with only Windows 10 and the simulator on it (and ORBX...). For the sceneries I have two additional 1TB SSDs, and for other addons an additional 1TB NVME. To avoid having addons ending up on the main drive, I have symlinked "\Documents\Prepard3D V4 Add-ons" to the NVME. So an installer will not notice that it isn't installing on C:..

As an example, I have a folder for all Carenado aircraft: "H:\Prepar3D v4 Add-ons\Carenado". "H:\Prepar3D v4 Add-ons" is symlinked from "C:\Users\obinder\Documents\Prepar3D v4 Add-ons", that way P3D will search for add-on.xmls there (that was before I became aware of discovery paths). So when the installer asks me where I want to install, I point it at "\Documents\Prepar3D v4 Add-ons\Carenado". All installers create folders that aren't there, so all assets end up in their correct folders automatically. Then I made this add-on.xml:


<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Carenado</AddOn.Name>
  <AddOn.Description />
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\SimObjects\Airplanes</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Fonts</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Fonts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Texture</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Texture</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Gauges</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Gauges</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scripts</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Scripts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>DLL</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\Carenavigraph.dll</Path>
    <Name>Carenavigraph</Name>
  </AddOn.Component>
  <AddOn.Component>
    <Category>DLL</Category>
    <Path>H:\Prepar3D v4 Add-ons\Carenado\CMeteoXml.dll</Path>
  </AddOn.Component>
</SimBase.Document>

Every new Carenado aircraft that I buy, I simply install into the same folder - since the add-on.xml is already in place, there is nothing else to do.

A few things to be aware of are the sounds, scripts and NaviGraph data.
Many advanced aircraft models use gauges to play custom sounds - and those gauges often don't find the corresponding sound files, since they use relative paths from the folder where they are executed - which is the P3D main folder. Same goes for lua scripts and Navigraph data.
Long story short, I copy the Sound, Scripts, Navigraph etc. folders from my custom location above to the corresponding folders in P3D. AFAIK there are plans to make the execution directory of the DLLs the folder where they are located, then this problem would go away. But I am not aware that this has already taken place.

Best regards

Hi Oliver,

I'm here because I recently tried to install the Carenado PC 12 and got an error of too many installs. I'm still waiting for Carenado to reset the installs. To say I'm word not allowed is an understatement!

I want to avoid any of this nonsense in the future and I would like to install all my Carenado & Alabeo aircraft into their own folder in a new SSD drive that I bought to solve this problem.

I would like to do as you have so intelligently done. Create a P3D v4 addons folder, Carenado folder, & Alabeo folder and install each plane inside the folder. I'm not sure if the installers will let me install outside of P3D v4. Maybe you can share your expertise?

Once I get a plane installed, how do I use the utility to create the addon.xml?

I would like to move the P3d V4 addons folder from My Docs folder in the C drive to my new SSD. New SSD letter is "F"

Thanks for your assistance.

Jose

Share this post


Link to post
Share on other sites
6 hours ago, DJJose said:

I'm not sure if the installers will let me install outside of P3D v4. Maybe you can share your expertise?

Hi,

I never had any problems with just pointing the Carenado installers (I have quite a few) at the desired folder. Make sure that it is always the same one for every plane, like "F:\AircraftAddons\Carenado". After every install, copy the aircrafts' sound files to the Prepar3D main folder "C:\Program Files\Lockheed Martin\Prepar3D v4\Sound\Carenado". Otherwise the custom sounds possibly aren't there.

Quote

Once I get a plane installed, how do I use the utility to create the addon.xml?

You can do that with the "Other Addons" tab, one content category at a time, nothing to it. Note that you only have to do that once. Every plane that you install into the same folder will automatically be referenced by this one addon-xml file.
To make things real easy, just use my add-on.xml that I posted above. Copy and paste the text into Notepad++, replace my "H:\Prepar3D v4 Add-ons\Carenado\" path with your "F:\AircraftAddons\Carenado\", set the Encoding to UTF-8 BOM in the top menu, and save it as "…\Documents\Prepar3D V4 Add-ons\Carenado\add-on.xml". Next time you start the sim it will ask you to activate it.

Best regards

Share this post


Link to post
Share on other sites
42 minutes ago, Lorby_SI said:

Hi,

I never had any problems with just pointing the Carenado installers (I have quite a few) at the desired folder. Make sure that it is always the same one for every plane, like "F:\AircraftAddons\Carenado". After every install, copy the aircrafts' sound files to the Prepar3D main folder "C:\Program Files\Lockheed Martin\Prepar3D v4\Sound\Carenado". Otherwise the custom sounds possibly aren't there.

You can do that with the "Other Addons" tab, one content category at a time, nothing to it. Note that you only have to do that once. Every plane that you install into the same folder will automatically be referenced by this one addon-xml file.
To make things real easy, just use my add-on.xml that I posted above. Copy and paste the text into Notepad++, replace my "H:\Prepar3D v4 Add-ons\Carenado\" path with your "F:\AircraftAddons\Carenado\", set the Encoding to UTF-8 BOM in the top menu, and save it as "…\Documents\Prepar3D V4 Add-ons\Carenado\add-on.xml". Next time you start the sim it will ask you to activate it.

Best regards

I will start with Carenado then do the Alabeo. I'm assuming just change the name.

If I have any questions, I'll start a new thread. I'll try not to take too much of you valuable time.

Thank you very much.

Jose

Share this post


Link to post
Share on other sites
1 hour ago, Lorby_SI said:

Hi,

I never had any problems with just pointing the Carenado installers (I have quite a few) at the desired folder. Make sure that it is always the same one for every plane, like "F:\AircraftAddons\Carenado". After every install, copy the aircrafts' sound files to the Prepar3D main folder "C:\Program Files\Lockheed Martin\Prepar3D v4\Sound\Carenado". Otherwise the custom sounds possibly aren't there.

You can do that with the "Other Addons" tab, one content category at a time, nothing to it. Note that you only have to do that once. Every plane that you install into the same folder will automatically be referenced by this one addon-xml file.
To make things real easy, just use my add-on.xml that I posted above. Copy and paste the text into Notepad++, replace my "H:\Prepar3D v4 Add-ons\Carenado\" path with your "F:\AircraftAddons\Carenado\", set the Encoding to UTF-8 BOM in the top menu, and save it as "…\Documents\Prepar3D V4 Add-ons\Carenado\add-on.xml". Next time you start the sim it will ask you to activate it.

Best regards

Oliver,

Can I combine the Carenado & Alabeo aircraft?

Share this post


Link to post
Share on other sites
12 minutes ago, DJJose said:

Oliver,

Can I combine the Carenado & Alabeo aircraft?

Sure. In the old days, when you installed them into the sim, they were "combined" too, right? For example, I have a folder where I install all freeware planes, regardless of developer.

The principles of how addons work in the sim hasn't changed. An add-on.xml is just a reference file that tells the sim where to look for content - it is basically a convenient combination of several .cfg files, nothing more.

Best regards

  • Like 1

Share this post


Link to post
Share on other sites
50 minutes ago, Lorby_SI said:

Sure. In the old days, when you installed them into the sim, they were "combined" too, right? For example, I have a folder where I install all freeware planes, regardless of developer.

The principles of how addons work in the sim hasn't changed. An add-on.xml is just a reference file that tells the sim where to look for content - it is basically a convenient combination of several .cfg files, nothing more.

Best regards

Amazing! I should have done this a long time ago.

Installed 11 aircraft and so far the ones I've tested work as usual. Created 2 folders Carenado & Alabeo with your xml, but I will probably just move all Alabeo into Carenado folder.

BTW, I'm still waiting for Carenado to free up one more install. The PC12 is worth the wait.

Share this post


Link to post
Share on other sites

Hi Oliver,

Can you please post your A2A AddonXML? I would like to move my A2A airplanes away from my C drive.

Thanks.

Share this post


Link to post
Share on other sites
31 minutes ago, DJJose said:

Hi Oliver,

Can you please post your A2A AddonXML? I would like to move my A2A airplanes away from my C drive.

Thanks.

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>A2A</AddOn.Name>
  <AddOn.Description>Aircraft by A2A Simulations Inc.</AddOn.Description>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Fonts</Category>
    <Path>Fonts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Gauges</Category>
    <Path>Gauges</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scripts</Category>
    <Path>Scripts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>SimObjects\Airplanes</Path>
  </AddOn.Component>
</SimBase.Document>

That file is from A2A themselves, it only has relative paths. If you move the content, prepend the paths with the folder where you moved it. The add-on.xml must stay where it is. <Path>SimObjects\Airplanes</Path> ->  <Path>G:\MyAircraft\MyA2A\SimObjects\Airplanes</Path>

But I can't recommend doing this, it will trip up the A2A updater program. If you want to move a product like that, move the whole folder and use mklink to create a symbolic link instead. I did that with the complete P3D addon folder, moved it to a different drive.

Never just move files of a product that has an installer or updater program. Doing that will break either one, because they don't find "their" files anymore.

Best regards

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, Lorby_SI said:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>A2A</AddOn.Name>
  <AddOn.Description>Aircraft by A2A Simulations Inc.</AddOn.Description>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Fonts</Category>
    <Path>Fonts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Gauges</Category>
    <Path>Gauges</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scripts</Category>
    <Path>Scripts</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>SimObjects\Airplanes</Path>
  </AddOn.Component>
</SimBase.Document>

That file is from A2A themselves, it only has relative paths. If you move the content, prepend the paths with the folder where you moved it. The add-on.xml must stay where it is. <Path>SimObjects\Airplanes</Path> ->  <Path>G:\MyAircraft\MyA2A\SimObjects\Airplanes</Path>

But I can't recommend doing this, it will trip up the A2A updater program. If you want to move a product like that, move the whole folder and use mklink to create a symbolic link instead. I did that with the complete P3D addon folder, moved it to a different drive.

Never just move files of a product that has an installer or updater program. Doing that will break either one, because they don't find "their" files anymore.

Best regards

Awesome idea!

Share this post


Link to post
Share on other sites

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