Jump to content
Sign in to follow this  
mslim

xml vs junction link?

Recommended Posts

I've only had intermittent luck moving addon aircraft from my P3D root drive to another drive.

It's likely user error rather than an inherent problem with the system. Is there any downside to using a junction link instead of an xml file to "point" P3D to an alternate location?

I've used this system in FSX without a hitch.

 

 

Share this post


Link to post

I abuse symbolic link a lot and didn't see any problem to me. But xml is a better way for management, with Lorby-SI's add-on Organizer you can easily enable/disable one. But I didn't use that very much....

  • Like 1

Share this post


Link to post

I use a junction point where needed.

For example, the Milviz freebees (which I'm totally enjoying and spending considerable time with) have an issue with sound files not being found when installed as an add-on.xml, and I do try to install all my aircraft to a specific addons "Discovery" path (H:\Addons_P3D\01.Aircraft).

So rather than having to go through and spend time trying to resolve the sound probs (which may not be easily or even achievable given their custom sound dll), what I do is a hybrid type of install, where a Junction point is used for \SimObjects\Airplanes\<name of aircraft>

And an add-on.xml is used for the Effects folder etc.

The files reside in my "H:\Addons_P3D\01.Aircraft" path with P3D able to see them, and of course I make a text file covering what is used to install for reference.

 

  • Like 1

Ryzen 5800X clocked to 4.7 Ghz (SMT off), 32 GB ram, Samsung 1 x 1 TB NVMe 970, 2 x 1 TB SSD 850 Pro raided, Asus Tuf 3080Ti

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

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

Share this post


Link to post

Yes it's MilViz freebies that are giving me problems.

Rogen if you could post an example of your addon.xml file for Effects or Sound it would be helpful for me to emulate.

Do you create a special folder in the P3D root drive for these files to reside? Is that what the "H:\Addons_P3D\01.Aircraft" path is about? Is the H drive (in your case) where your addon Aircraft reside? What purpose does the "\0.1" serve?

 

 

Share this post


Link to post
4 hours ago, mslim said:

Yes it's MilViz freebies that are giving me problems.

Rogen if you could post an example of your addon.xml file for Effects or Sound it would be helpful for me to emulate.

Do you create a special folder in the P3D root drive for these files to reside? Is that what the "H:\Addons_P3D\01.Aircraft" path is about? Is the H drive (in your case) where your addon Aircraft reside? What purpose does the "\0.1" serve?

Ok, lotsa questions, lets see what we can achive.

First a little background to cover some of those questions.

My "H:\Addons_P3D\" is a path on a H: drive (NVMe M.2) where the intent is to place addons via the use of an add-on.xml file where they will be automatically "Discovered" by P3D.

The root folder itself has a series of subfolders based on category, for example the below are the directories where the numbering is simply to provide ordering in Windows File Explorer.

  • 01.Aircraft
  • 02.AI
  • 03.Utility
  • 04.Scenery
  • 05.SimObjects
  • 10.Wip

Those paths and paths within are defined in the  P3D add-ons.cfg as discovery paths, where a discovery path is a path P3D will search for add-on.xml files to import, note the high numbers in the snip, I actually have 28 discovery paths configured whereas a default P3D install will typically have one.

[DiscoveryPath.15]
Path=H:\Addons_P3D\03.Utility
Title=Utility
Active=TRUE
[DiscoveryPath.16]
Path=H:\Addons_P3D\02.AI
Title=A.I.
Active=TRUE

But back to 01.Aircraft, this has further folders beneath to catagorise the developer of the aircraft, into which I place the actual aircraft root folder e.g. Carenado, A2A, AeroSoft, Ants, Milviz, Realair, you don't actually have to go down to this sort of lower folder level, it's just something I do which I've been thinking of simplifying by just using a prefix for the developer on each aircraft's folder name like "Milviz_FG-1D_Corsair", or "Carenado_Pilatus_PC12' so that the aircraft will be grouped by folder name in Windows File Explorer.

To create and manage a Discovery path your best bet is Lorby_SI's "Addon Organiser for Prepar3D", the tool will also enable you to easily perform a full backup of P3D config files as a zip file.

Let's tutorial using the Milviz FG-1D Corsair as this aircraft has a little gotcha to be aware of.

Using "Addon Organiser for Prepar3D" first perfom a full backup of your config files, I'm not going to go into how to use the product itself as is has a useful guide included, and it has its forum here on AVSIM.

Next up create a folder path like "[drive]:\Addons\01.Aircraft" where [drive] is a drive letter of choice.

Using "Addon Organiser for Prepar3D" add a discovery path for "[drive]:\Addons\01.Aircraft".

Pre-create your target folder for install as "Milviz_FG-1D_Corsair". You'll now have a path of "[drive]:\Addons\01.Aircraft\Milviz_FG-1D_Corsair".

Install the Corsair to "[drive]:\Addons\01.Aircraft\Milviz_FG-1D_Corsair" instead of P3D.

When installed you'll see there are three folders within "Milviz_FG-1D_Corsair".

  • Effects
  • SimObjects
  • Sound

Now we create an add-on.xml, notepad++ is the tool you'll need to use (Google it if need be) as the xml needs to be saved in a particular format, the below link has the format info.

https://www.avsim.com/forums/topic/550578-incorrect-character-encoding-in-add-onscfg-file/?do=findComment&comment=3984466

I've also linked to the P3D SDK doco page for further add-on config reference.

https://www.prepar3d.com/SDKv5/sdk/add-ons/add-on_packages.html

I've included my add-on.xml text in the spoiler below where the gotcha this aircraft has is the SimObjects path in the xml being "SimObjects\Misc" as the aircraft includes an extra for rockets, bombs and droptanks.

Note I've not added the SimObjects\Airplanes path to the xml as we'll be adding that particular path via a junction point (symbolic link).

Spoiler

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Milviz FG-1D Corsair</AddOn.Name>
  <AddOn.Description>Milviz FG-1D Corsair</AddOn.Description>
  <AddOn.Component>
  <Category>SimObjects</Category>
    <Path>SimObjects\Misc</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Sound</Category>
    <Path>Sound</Path>
  </AddOn.Component>
</SimBase.Document>

So now we have our discovery path, aircraft path, and under the path there are three folders and an add-on.xml, which means we are nearly there.

Now we create our symbolic link.

Open a CMD using "RunAs" administrator and using the below script line (suitably modified for your own paths) paste into the CMD and run. All going well there will be notification of the sucessful link creation.

mklink /J "[drive]:\Lockheed Martin\Prepar3D v4\SimObjects\Airplanes\Milviz_FG-1D" "[drive]:\Addons_P3D\01.Aircraft\Milviz_FG-1D_Corsair\SimObjects\Airplanes\Milviz_FG1D".

That's it, you should be ready to fly and begin enjoying the great Milviz  FG-1D Corsair freebee 🙂

Incidently I found a easily fixed bug in the Corsair, I like it when a developr's release includes practically nothing to fix, although if there was one thing I'd ask it's an option to enable the pilot's mirrors.

Error Fixes:
error=Duplicate Section Name
File: H:\Addons_P3D\01.Aircraft\Milviz\Milviz_FG-1D_Corsair\SimObjects\Airplanes\Milviz_FG1D\aircraft.cfg
Section: direction_indicators

Removed the first instance at lines 421 & 422 as the second instance lines are the same values with commenting.

FIRST:
[direction_indicators]
direction_indicator.0 = 1, 0

SECOND:
[direction_indicators] // 0=None, 1=Vac Gyro, 2=Elec Gyro, 3=EM Slave Compass, 4=Slave to other ind
direction_indicator.0 = 1, 0

Cheers

This pic shows the Rockets and Bombs mounted which are managed via the Shift+1 in sim key combo.

spacer.png

spacer.png

spacer.png

 

Edited by Rogen
Added link to SDK doco
  • Like 1

Ryzen 5800X clocked to 4.7 Ghz (SMT off), 32 GB ram, Samsung 1 x 1 TB NVMe 970, 2 x 1 TB SSD 850 Pro raided, Asus Tuf 3080Ti

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

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

Share this post


Link to post

Thanks for patience and excellent tutorial Rogen.😃 I am aware of the addons.cfg but I really didn't understand how it worked. I've downloaded the Lorby app.

Beautiful Corsair BTW.

Edited by mslim

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