Jump to content

Sign in to follow this  
SimonC

Help with addon.xml

Recommended Posts

Hello,

been using P4AO for some time now, and currently have all my sceneries in external folder.

So basically, I have Documents\Prepar3D v4 Add-ons and I have, in my case, E:\P3DAddons. Latter containing the files, and former only the add-on.xml files.

References in add-on.xml files are absolute paths, like E:\P3DAddons\...

So, if at some point later I would want to move that folder somewhere else, be it different drive or even folder, how would I go about this?

One thing comes to mind, are system variables. Like %APPDATA%; I could create variable %FSDATA% for E:\P3DAddons. Would that work? Or any other suggestions how to handle this?

Share this post


Link to post
2 hours ago, SimonC said:

Hello,

been using P4AO for some time now, and currently have all my sceneries in external folder.

So basically, I have Documents\Prepar3D v4 Add-ons and I have, in my case, E:\P3DAddons. Latter containing the files, and former only the add-on.xml files.

References in add-on.xml files are absolute paths, like E:\P3DAddons\...

So, if at some point later I would want to move that folder somewhere else, be it different drive or even folder, how would I go about this?

One thing comes to mind, are system variables. Like %APPDATA%; I could create variable %FSDATA% for E:\P3DAddons. Would that work? Or any other suggestions how to handle this?

I’d just recreate the xml files with p4ao after the move. Lorby has been around lately, he may have a more elegant solution.


Rob

Sim rig: Intel Core i9 9900K @ 5GHz, Asus ROG Maximus XI Code, MSI 2080 Ti, GSkill DDR4 32 GB, NZXT Kraken. 

Current sims: P3D v5, MSFS, X-plane 11, Aerofly FS2 and DCS. 

 xdQCeNi.jpg   puHyX98.jpg

"There are three simple rules for making a smooth landing. Unfortunately, no one knows what they are."

Share this post


Link to post
Posted (edited)

Yes, of course I could do that, but it is a long and tedious work, which I would like to avoid, if possible. Manual parsing and replacing paths, or powershell, I am aware there are manual ways, more or less automated.

Btw. I tested the system variable solution, that didn't pan out, neither P3D nor P4AO can read the variables.

I also know I can place add-on.xml into scenery-folder, but that way it won't automatically load when P3D has been reinstalled, I believe.

Edited by SimonC

Share this post


Link to post
1 hour ago, SimonC said:

I also know I can place add-on.xml into scenery-folder, but that way it won't automatically load when P3D has been reinstalled, I believe.

If you go this route, then you would have to manually add the entry into your C:\ProgramData\Lockheed Martin\Prepar3D vX\add-ons.cfg

which is what I'm doing now for certain addons that don't install using P3D's add-on.xml method. If 3rd party devs would just adhere to this method, then that would save us a ton of trouble.


Aaron Vinci

----------------

Intel i9 10900K (no overclock) / Windows 10 Pro 2004 64 bit / 64GB DDR4 3200MHz CL 16RAM / EVGA NVIDIA GTX 1080 FTW 8GB RAM / 1TB NVME SSD (OS Drive) / 2TB SATA SSD / 4TB SATA HDD / 850watt PSU

Share this post


Link to post

You can add additional auto discovery paths, I don't actually use the one in the Documents folder.

For example I have the following where I just drop in the containing folder with its add-on.xml under it.

Spoiler

[DiscoveryPath.0]
Path=H:\Addons_P3D\04.Scenery\Orbx\Cities\p3dv4
Title=Orbx Cities
Active=TRUE
[DiscoveryPath.1]
Path=H:\Addons_P3D\04.Scenery\Orbx\Airports\p3dv4
Title=Orbx Airports
Active=TRUE
[DiscoveryPath.2]
Path=H:\Addons_P3D\04.Scenery\Orbx\Regions\p3dv4
Title=Orbx Regions
Active=TRUE
[DiscoveryPath.3]
Path=H:\Addons_P3D\04.Scenery\Orbx\Global\p3dv4
Title=Orbx Global
Active=TRUE
[DiscoveryPath.4]
Path=H:\Addons_P3D\01.Aircraft\Ants_Aeroplanes
Title=Ants Aeroplanes
Active=TRUE
[DiscoveryPath.5]
Path=H:\Addons_P3D\01.Aircraft\Aeroplane Heaven
Title=Aeroplane Heaven
Active=TRUE
[DiscoveryPath.6]
Path=H:\Addons_P3D\01.Aircraft\Iris_Simulations
Title=Iris Simulations
Active=TRUE
[DiscoveryPath.7]
Path=H:\Addons_P3D\01.Aircraft\Alabeo
Title=Alabeo
Active=TRUE
[DiscoveryPath.8]
Path=H:\Addons_P3D\01.Aircraft\Carenado
Title=Carenado
Active=TRUE
[DiscoveryPath.9]
Path=H:\Addons_P3D\01.Aircraft\Flight-Replicas
Title=Flight Replicas
Active=TRUE
[DiscoveryPath.10]
Path=H:\Addons_P3D\01.Aircraft\Golden Age Simulations
Title=Golden Age Simulations
Active=TRUE
[DiscoveryPath.11]
Path=H:\Addons_P3D\01.Aircraft\IndiaFoxtEcho
Title=IndiaFoxtEcho
Active=TRUE
[DiscoveryPath.12]
Path=H:\Addons_P3D\01.Aircraft\A2A
Title=A2A
Active=TRUE
[DiscoveryPath.13]
Path=H:\Addons_P3D\03.Utility
Title=Utility
Active=TRUE
[DiscoveryPath.14]
Path=H:\Addons_P3D\02.AI
Title=A.I.
Active=TRUE
[DiscoveryPath.15]
Path=H:\Addons_P3D\04.Scenery\Flight Sim Jewels
Title=Flight Sim Jewels
Active=TRUE
[DiscoveryPath.16]
Path=H:\Addons_P3D\04.Scenery\TerraEmergenceProject
Title=TerraEmergenceProject
Active=TRUE
[DiscoveryPath.17]
Path=H:\Addons_P3D\01.Aircraft\RealAir
Title=Real Air
Active=TRUE
[DiscoveryPath.18]
Path=H:\Addons_P3D\01.Aircraft\QualityWings
Title=Quality Wings
Active=TRUE
[DiscoveryPath.19]
Path=H:\Addons_P3D\01.Aircraft\Misc
Title=Misc Aircraft
Active=TRUE
[DiscoveryPath.20]
Path=H:\Addons_P3D\04.Scenery\Aerosoft
Title=Aerosoft
Active=TRUE
[DiscoveryPath.21]
Path=H:\Addons_P3D\01.Aircraft\Milviz
Title=Milviz Aircraft
Active=TRUE

Then sim starts sees the new addon and away we go.

I also use the Lorby tool to manage.

 


Ryzen 2700X clocked to 4.2 Ghz, 32 GB ram, Samsung 1 x 1 TB NVMe 970 and 2 x 1 TB SSD 850 Pro raided, Nvida 1070 Ti clocked to 2 Ghz

P3D 4.5.13, Orbx Global, Vector and more, lotsa planes too.

Catch my vids on Oz Sim Pilot, catch my screen pics @ Screenshots and Artwork

Share this post


Link to post

What is the purpose with having multiple Discovery Paths? What are they used for?


Aaron Vinci

----------------

Intel i9 10900K (no overclock) / Windows 10 Pro 2004 64 bit / 64GB DDR4 3200MHz CL 16RAM / EVGA NVIDIA GTX 1080 FTW 8GB RAM / 1TB NVME SSD (OS Drive) / 2TB SATA SSD / 4TB SATA HDD / 850watt PSU

Share this post


Link to post

Discovery paths, if I understand correctly, have to be added each time new sim installs, no?

I reckon this is what you are talking about: https://www.prepar3d.com/SDKv4/sdk/add-ons/add-on_configuration_files.html

Yeah, one way would be maintaining a batch file that just adds all addons. Still an additional step.

5 hours ago, captain420 said:

What is the purpose with having multiple Discovery Paths? What are they used for?

If I understand it correctly, you can add add-on.xml from another paths, like having the xml file in the addon folder, avoiding having absolute paths, but only "." or "/effects" (just examples), then you can use discovery paths. FlyTampa does it for instance. It's OK, but again, it's not an auto-discovery.

One solution would be, being able to change the default discovery path from .\Documents to whatever you want. That way you could have both add-on.xml in a subfolder of the auto-discovery path, and in the xml relative paths only. Can it be done?

Share this post


Link to post

Ooooooooh... found it. It is right there in Lorby's tool. You can change the current addon discovery path, or add new. Cool. That solves my problem!

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.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    28%
    $7,035.00 of $25,000.00 Donate Now
×
×
  • Create New...