nzfsim.org LogoAdamski_NZAirshow Travel

P3D Utilities

Some useful P3D utilities.


Installing add-on aircraft outside P3Dv3/v4 root

This method is particularly useful for installing older add-ons that may try to install old versions of gauges, sound or effects files in your default P3D locations. It's also the method recommended by LM, but only a few developers give you the option to do it this way (eg: A2A, Ant's). The beauty of this method is that:

  • Core P3D files/folders remain untouched.
  • Aircraft can easily be temporarily enabled/disabled via the P3D (top menu) Options/Add-ons.
  • Core/shared P3D files (in Effects, Sound or Gauges) are not overwritten by [possibly] older/incompatible versions.
  • Add-on aircraft can be cleanly uninstalled - without leaving redundant files and without removing files that may be shared with other aircraft.

It's a three-step process - much harder to explain and document than actually use:

  1. 3 min: Re-create the usual add-on folder structure in a folder outside of P3D root, then copy the aircraft contents into it.
  2. 1 min: Create and/or edit the XML file ("add-on.xml") that tells P3D what's included (and where to find it).
  3. 1 min: Add an entry in P3D's "add-ons.cfg".

A fully documented example with a pre-created file/folder structure can be found here: P3D_Alternative_Install.zip

The procedure may look daunting because each step is described here in detail - but it's really not that bad in practice! Once you've done one or two, you'll find it simple and quick - typically around 5 minutes.

P3Dv3/v4 Alternative Aircraft Add-ons Install Method - Full Instructions

STEP 1: Create the folder structure

  1. Create a base-level folder to hold all your aircraft add-ons (Addon_Aircraft in this example). This can live anywhere - even on a separate drive. I have P3D on an SSD drive, so have kept the add-ons folder on that drive for speed. Also, purely for convenience, I've created it in the "Lockheed Martin" folder, at the same level as my P3D root:

    My P3Dv3 root is:H:\Program Files\Lockheed Martin\Prepar3D v4

    My add-ons folder is:H:\Program Files\Lockheed Martin\Addon_Aircraft

  2. Inside this base-level folder (Addon_Aircraft), place a fresh COPY of the blank/dummy folder "_New" that's included in the archive P3D_Alternative_Install.zip. This contains all the setup files and skeleton folder structure. eg:
    H:\Program Files\Lockheed Martin\Addon_Aircraft\_New

    The _New folder should contain the following folders:
    Content
    Content\Effects
    Content\Effects\texture
    Content\Gauges
    Content\SimObjects
    Content\SimObjects\Airplanes
    Content\Sound

    At root level in _New, you should also have three files:
    add-on.xml
    addon_addnew.bat
    addon_delete.bat

  3. Rename the freshly copied _New folder to the name of your add-on aircraft, eg:
    H:\Program Files\Lockheed Martin\Addon_Aircraft\Aircreation_Ultralight

  4. Create a temporary folder somewhere to hold your extracted aircraft files.

  5. Extract the incoming add-on aircraft archive to the temporary folder or, if it has an installer, point it to the temporary folder.

  6. Manually copy the files into the corresponding folders in the "Content" folder (overwriting any existing folders) eg:
    H:\Program Files\Lockheed Martin\Addon_Aircraft\Aircreation_Ultralight\Content

    The "Content" folder becomes, in effect, the root P3D folder.

    NOTE: Though every add-on aircraft will have a "SimObjects" folder, not every aircraft will use all of the additional sub-folders ("Effects", "Gauges" or "Sound"), so it does no harm to have the complete structure there - they only get processed if they appear in add-on.xml. In this Trike example - apart from what's in Simobjects, there's only the one additional file (in Gauges: "Handheld_Radio.cab").

  7. Check all the files are correctly placed.
  8. In the aircraft.cfg file, check that all the textures have corresponding entries and that the *.air file is correctly referenced. Also worth checking, are references in panel.cfg for correct gauges/locations - and maybe also sound.cfg in case it points to an old location for a default FSX aircraft.
  9. P3Dv4 seems to expect an interior (VC) .mdl file as well as the usual exterior .mdl. If your legacy aircraft happens not to have this .mdl file, then it probably won't work in P3Dv4.

Confusingly, we have two files with similar filenames:
add-on.xml - a copy of which lives inside each newly created add-on folder (see STEP 2) and
add-ons.cfg - a P3D config file in C:\ProgramData\Lockheed Martin\Prepar3D v4 (see STEP 3).

STEP 2: Edit the XML file

IMPORTANT: XML and .cfg files in P3Dv4 need to be created/saved in UTF-8 format. Make sure your text editor supports this format (the excellent/free Notepad++ does).

  1. XML file: add-on.xml

    A copy of the XML file is found in the "_New" folder (that you should have copied and renamed):
    H:\Program Files\Lockheed Martin\Addon_Aircraft\Aircreation_Ultralight\add-on.xml

    Edit the file manually and use the Online XML Generator (below) if it helps.

    NOTE: Not every section (Sound, Gauges etc.) is required in every case - it will depend on whether the respective folders exist in the original aircraft archive. So, for the Ultralight, we will end up with just this:

    <?xml version="1.0" encoding="utf-8"?>
    <SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
       <AddOn.Name>Aircreation_582SL</AddOn.Name>
       <AddOn.Description>Aircreation_582SL: from FSX default.</AddOn.Description>
       <AddOn.Component>
          <Category>SimObjects</Category>
          <Path>Content\SimObjects\Airplanes</Path>
       </AddOn.Component>
       <AddOn.Component>
       <Category>Gauges</Category>
          <Path>Content\Gauges</Path>
       </AddOn.Component>
    </SimBase.Document>

To help with creating a correctly formatted add-on.xml file (and to avoid typos), use the generator below:


Online add-on.xml Generator

Enter your aircraft add-on name and description - and whether your install includes additional sections:

Add-on Aircraft Name:

Add-on Aircraft Description:

Effects folder?YES    No

Sound folder?YES    No

Gauges folder?YES    No

 

NOTES:

  1. Aircraft Name becomes the TITLE in P3D/Options/Addons and used when adding or removing entries in add-ons.cfg.

    If using the uninstall batch file, the name entered (when prompted) has to be identical or the entry deletion will fail.

  2. Aircraft Description appears as DESCRIPTION in the same P3D options drop-down, alongside TITLE.

Copy & paste (replace) the text below into the add-on.xml file in the newly created/renamed aircraft add-on folder.

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
   <AddOn.Name>Aircraft name here</AddOn.Name>
   <AddOn.Description>A short description here.</AddOn.Description>
   <AddOn.Component>
      <Category>SimObjects</Category>
      <Path>Content\SimObjects\Airplanes</Path>
   </AddOn.Component>
   <AddOn.Component>
      <Category>Effects</Category>
      <Path>Content\Effects</Path>
   </AddOn.Component>
   <AddOn.Component>
      <Category>Sound</Category>
      <Path>Content\Sound</Path>
   </AddOn.Component>
   <AddOn.Component>
      <Category>Gauges</Category>
      <Path>Content\Gauges</Path>
   </AddOn.Component>
</SimBase.Document>

STEP 3: Create (or edit) the CFG file

  1. Manual method (or skip to Batch File Method step 12):

    If it doesn't already exist, create the file add-ons.cfg (in UTF-8 format) in the following location:
    C:\ProgramData\Lockheed Martin\Prepar3D v4\add-ons.cfg

    The file is in the following format (using the Ultralight as an example):

    [Package.0]
    PATH=H:\Program Files\Lockheed Martin\Addon_Aircraft\Aircreation_Ultralight
    TITLE=Aircreation_582SL
    ACTIVE=true
    REQUIRED=false

    [Package.1]
    etc. ...

    As in aircraft.cfg files, entries are incremental, starting with [Package.0].

  2. Edit the PATH line to reflect your base-level\Aircraft Add-ons folder plus the incoming new aircraft location (see [1]).
  3. Edit the TITLE line and save.

Using the BATCH file to ADD a new aircraft

Rather than editing the add-ons.cfg file manually, you can execute addon_addnew.bat - *YOU MUST RUN THIS FILE FROM INSIDE YOUR NEWLY CREATED ADD-ON AIRCRAFT FOLDER* eg:
H:\Program Files\Lockheed Martin\Addon_Aircraft\Aircreation_Ultralight\addon_addnew.bat

  1. Make sure P3D is NOT RUNNING.
  2. Run addon_addnew.bat ("Run as Administrator" if you're not running with full admin rights). The batch file:
    • Picks up the current folder location (for "PATH").
    • Prompts you for an aircraft name (for "TITLE").
    • Reads your P3Dv4 path from the registry and executes Prepar3D.exe with some parameters to write the information to your add-ons.cfg (automatically renumbering the packages).

UNINSTALLING an existing add-on (if installed by the method above)

Rather than editing the add-on.cfg file manually, you can execute addon_delete.bat. This file can be run from anywhere.

  1. Make sure P3D is NOT RUNNING.
  2. Run addon_delete.bat (with "Run as Administrator"). The batch file:
    • Prompts for an aircraft name (for "TITLE").
    • Reads your P3Dv4 path from the registry and executes Prepar3D.exe with some parameters to delete the entry from your add-ons.cfg (automatically renumbering the packages).
    • The add-on will no longer be used by P3D and you can delete the aircraft addon folder from inside the Addon_Aircraft folder if you wish.

NOTES

Add-ons will become available on the next P3D startup (remember to close P3D before adding or deleting aircraft).

TROUBLESHOOTING

1: Aircraft doesn't show in P3D Vehicles selection:

  • Check that it's showing in P3D Options/Add-ons (and is enabled), then check the folder structure and filenames.
  • Check your add-on.xml file for errors. After the initial XML declaration, all XML tags should be properly nested and paired off.
  • Check that your aircraft has an interior .mdl file as well as the usual exterior .mdl.

2: Aircraft has no exterior model and won't load:

  • P3Dv4 requires both interior and exterior models. Check in Content\SimObjects\Airplanes\xxx\model. If your legacy aircraft has only the one xxxx.mdl file, it simply will not work.
Update