captain420

need help with my addon.xml file

Recommended Posts

I am trying to move over some of my old airports from P3D v3 over to P3D v4. I made a directory just for my P3D addons called E:\P3D Addons.

I have looked at many addon.xml files to get an idea of how they're setup. But they seem inconsistent. Some have the texture category and some don't, some have effects category and others dont. So which one is correct?

For example, My airport has 2 main folders: Scenery And Textures, and they are located in E:\P3D Addons\KIAH\

and I have copied over the files from my P3D v3 Effects folder to P3D v4's. Do I also need to add the category Effects into my addon.xml file as well?

Share this post


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

Posted (edited)
9 minutes ago, captain420 said:

I am trying to move over some of my old airports from P3D v3 over to P3D v4. I made a directory just for my P3D addons called E:\P3D Addons.

I have looked at many addon.xml files to get an idea of how they're setup. But they seem inconsistent. Some have the texture category and some don't, some have effects category and others dont. So which one is correct?

For example, My airport has 2 main folders: Scenery And Textures, and they are located in E:\P3D Addons\KIAH\

and I have copied over the files from my P3D v3 Effects folder to P3D v4's. Do I also need to add the category Effects into my addon.xml file as well?

Hi,

as per the specification, scenery is added as a "scenery area" - just like it has always been added to the scenery.cfg. That means, the correct path to add is the top folder that includes \scenery and \texture - this is added as the AddonComponent category "Scenery". The AddonComponent of category "Texture" should only be used if you want those textures to be available globally - this is best used for texture replacements, like FScene, FTXGlobal or Rex textures. 

If you would split the scenery area in two, and add \scenery and \texture as separate AddonComponents, you could get into trouble with the textures overwriting others that have the same name. The simulator doesn't know and doesn't care that you think that those two belong together.

Effects: this is only necessary if you keep your effects in a separate folder. If you have already copied them into the P3D Effects folder, having an additional AddonComponent for them is completely superfluous . They are already referenced by the effects.cfg file.

Generally speaking, you don't have to move around the scenery, effects, whatever files at all. You can just create the addon.xml file and point it at the directories where your sceneries (aircraft, objects, texture replacements....) are already present for P3D V3.

A bit of advice: don't try writing those XML files manually. Use a tool for that.

Best regards

Edited by Lorby_SI

Share this post


Link to post

Thanks for the clarification.

Share this post


Link to post
Posted (edited)
3 minutes ago, captain420 said:

Thanks for the clarification.

Another important note: don't create an add-on.xml for every single content (scenery, aircraft, whatever) that you want to add. You can add multiple AddonComponents of any category to the same add-on.xml. So it is advisable to organize them a little bit. For example, one add-on.xml for each continent or country that you have addons for, one add-on.xml for each aircraft developer etc. Whatever you feel comfortable with, just keep the number of XML files low (so you don't lose track of them - and keep the sheer number of lookup paths to a sensible minimum).

Best regards

Edited by Lorby_SI
  • Like 1

Share this post


Link to post

I didn't know you can have a single add-on.xml for multiple sceneries or addons. I thought each one had to have its own. This method is confusing and I need to wrap my head around it to get a better understanding of how it works. Could someone post an example add-on.xml that combines multiple addons or sceneries. I would like to see how it's formatted.

Share this post


Link to post
2 minutes ago, captain420 said:

I didn't know you can have a single add-on.xml for multiple sceneries or addons. I thought each one had to have its own. This method is confusing and I need to wrap my head around it to get a better understanding of how it works. Could someone post an example add-on.xml that combines multiple addons or sceneries. I would like to see how it's formatted.

Hello Aaron,

to save you from all this I have created the free P4AO addon organizer, mentioned above. It will create the XML files for you.

The addon.xml files have the same purpose and work exactly like the cfg files, they just have a different format. The simulator doesn't have hard coded content folders any more, in C:\ProgramData\Lockheed Martin\Prepar3d V.. there have been .cfg files for every type of content since at least V3, some of them even earlier. The XMLs are just the logical extension, to keep the user away from the cfgs.

Best regards

Share this post


Link to post
Posted (edited)
26 minutes ago, captain420 said:

This method is confusing

This method enables you to have several different simulator flavors side-by-side with only one single sim installation. Every(!) type of content can be kept separately and referenced with add-on.xml files. An example: you could use three different ground texture replacement products side-by-side, each being referenced by a different XML file. So by activating one and deactivating the other two you can just switch between the three different ground texture sets. No files have ever to be copied into your simulator directory, worst case overwriting others and ultimately being lost when a reinstall becomes necessary.

Btw. confusion: maybe it helps (for scenery) if you keep telling yourself that those XML files are nothing more than a couple of additional scenery.cfgs. Because that really is all that they are.

Best regards

Edited by Lorby_SI

Share this post


Link to post

Thanks for the info, will look into it! 🙂

Share this post


Link to post
1 minute ago, captain420 said:

Thanks for the info, will look into it! 🙂

Just to add, as to "why use a tool?". The next roadblock that you will inevitably hit is scenery layering (="giving one scenery a higher priority than another"). Trying to do that manually is a veritable nightmare if you have more than a couple of sceneries. And there is no other way currently, because you can't edit external, add-on.xml based, sceneries with the scenery library dialog in P3D (!) (move up down, enable/disable - none of that is possible). This is certainly an oversight by LM and they will implement this eventually, but for all versions 3.0 to 4.2 using a separate tool is necessary.

Best regards

Share this post


Link to post

Love me some XML add-ons files. Hating how some add-on developers have not embraced them yet. Looking at you Milviz and Flight1.

Love me some Oliver and Lorby!!

 

Share this post


Link to post
1 hour ago, captain420 said:

 I have copied over the files from my P3D v3 Effects folder to P3D v4's

Copying effects directly from v3 in the v4 version, is a bad and dangerous idea, hope for you that you have first backuping before mixing the effects files.... because if p3dv4 encountered a 32bits programming effect... you may have probably a CTD.

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