- Messages
- 9
- Country
Long post alert. [TL;DR: The Autogen add-on system seems to be busted in P3D 4.4 and 4.5. I think the issue is related to the fallback mechanisms. There is a work-around using the Autogen Configuration Merger tool (see post #4 below).]
I recently noticed that my autogen-based lights were not displaying at all in P3Dv4. I googled the issue and found several posts, on this forum and elsewhere, from other people seeing a similar problem. Instructions on how to properly integrate add-on autogen definition files are woefully lacking in the SDK, so I have been testing and troubleshooting the issue.
Although multiple concurrent add-on autogen folders can be configured, via at least 2 different integration methods, it would seem that P3D will only pick up a single add-on autogen folder, namely whichever one has the highest order of priority. All other add-on autogen is ignored. My tests indicate that this behaviour is the same in P3D 4.4 and 4.5. The question is, whether this limitation to a single add-on autogen folder is by design or, as I suspect, due to a bug in the P3D fallback prioritisation mechanism.
In order to fully explain what I think is happening, it is important to first clear up a few points relating to:
@Everyone: perhaps someone with LM's ear could escalate the fallback prioritisation issue? (Although I suspect they already know about it, and that this is the same "fallback issue" that is preventing Orbx from setting up their Orbx Central v4 installer to fully utilise the addon.xml method, rather than continuing to bulldoze P3D's default files).
Cheers,
Jeff
I recently noticed that my autogen-based lights were not displaying at all in P3Dv4. I googled the issue and found several posts, on this forum and elsewhere, from other people seeing a similar problem. Instructions on how to properly integrate add-on autogen definition files are woefully lacking in the SDK, so I have been testing and troubleshooting the issue.
Although multiple concurrent add-on autogen folders can be configured, via at least 2 different integration methods, it would seem that P3D will only pick up a single add-on autogen folder, namely whichever one has the highest order of priority. All other add-on autogen is ignored. My tests indicate that this behaviour is the same in P3D 4.4 and 4.5. The question is, whether this limitation to a single add-on autogen folder is by design or, as I suspect, due to a bug in the P3D fallback prioritisation mechanism.
In order to fully explain what I think is happening, it is important to first clear up a few points relating to:
- The file and folder constraints for add-on autogen definition files.
- The 2 different methods available to integrate those add-on autogen files into P3D.
- How the 2 different integration methods work in combination with each other.
- The resulting prioritisation governing add-on autogen files within P3D.
- Regardless of the integration method used, P3D expects the provision of an add-on autogen folder containing autogen files with standardised file names (i.e. "default.xml", "AutogenDescriptions.xml", etc). P3D will ignore autogen files with custom names (e.g. "MyDefault.xml", "MyAutogenDescriptions.xml").
- The add-on folder containing the add-on autogen files can have any name you like, it doesn't need to be named 'Autogen'. (For example, Orbx put theirs in "...\Orbx\p3dv4\Orbx Libraries\ORBX\Scripts\custom.gb_base").
- P3D expects the add-on autogen files to be additive, i.e. they should only include autogen definitions for new autogen classes, or for default P3D autogen classes that are intended to be redefined. There is no need for these files to contain any of the existing default P3D autogen definitions if they are not intended to be overridden.
- An Add-on.xml package including an Add-on Component with 'Category' set to 'Autogen', and 'Path' set to a folder which contains autogen definition files as described above.
- The path can be either absolute, or relative to the add-on.xml file location.
- The path must be to a folder, NOT a specific autogen xml file.
- The package can then be installed in 1 of 3 ways, corresponding to the location of the respective add-on.cfg file, Local, Roaming, or ProgramData (default):
- Local:
- Install the add-on package by running the appropriate P3D configuration command, e.g.:
- Prepar3D.exe "-Configure: Category=Add-on Package, Operation=Add, Title=REVX_LIGHTS, FileLocation=Local, Path=C:\MyAddons\REVX_LIGHTS"
- This will result in a corresponding add-on package entry in the 'Local' add-on.cfg file located at "...\Users\[username]\AppData\Local\Lockheed Martin\Prepar3D v4\add-ons.cfg".
- Install the add-on package by running the appropriate P3D configuration command, e.g.:
- Roaming:
- Install the add-on package by either placing the add-on.xml file in a folder monitored by P3D for auto-discovery, or by running the appropriate P3D configuration command, e.g.:
- Prepar3D.exe "-Configure: Category=Add-on Package, Operation=Add, Title=REVX_LIGHTS, FileLocation=Roaming, Path=C:\MyAddons\REVX_LIGHTS"
- This will result in a corresponding add-on package entry in the 'Roaming' add-on.cfg file located at "...\Users\[username]\AppData\Roaming\Lockheed Martin\Prepar3D v4\add-ons.cfg".
- Install the add-on package by either placing the add-on.xml file in a folder monitored by P3D for auto-discovery, or by running the appropriate P3D configuration command, e.g.:
- ProgramData (Default):
- Install the add-on package with either an add-on manager (e.g. Lorby-Si P4AO), or by running the appropriate P3D configuration command, e.g.:
- Prepar3D.exe "-Configure: Category=Add-on Package, Operation=Add, Title=REVX_LIGHTS, Path=C:\MyAddons\REVX_LIGHTS"
- This will result in a corresponding add-on package entry in the 'ProgramData' add-on.cfg located at "...\ProgramData\Lockheed Martin\Prepar3D v4\add-ons.cfg".
- Install the add-on package with either an add-on manager (e.g. Lorby-Si P4AO), or by running the appropriate P3D configuration command, e.g.:
- Local:
- The overall priority of the Autogen add-on component is governed by 2 factors:
- 1: The location of the add-on.cfg file in which it is installed:
- An add-on component defined in the Local add-on.cfg file will always have a higher priority than those defined in in the Roaming add-on.cfg file.
- An add-on component defined in the Roaming add-on.cfg file will always have a higher priority than those defined in in the ProgramData (Default) add-on.cfg file.
- 2: The corresponding package level within each add-on.cfg file:
- [Package.0] has a higher priority than [Package.1], and so on.
- Note: the scenery layer prioritisation system is separate and has no bearing the prioritisation of other category add-ons (including autogen).
- 1: The location of the add-on.cfg file in which it is installed:
- An autogen.cfg entry can be created by running the appropriate configuration command, e.g.:
- Prepar3D.exe "-Configure: Category=autogen, Operation=Add, Title=REVX_LIGHTS, Path=C:\MyAddons\REVX_LIGHTS\Autogen"
- The path must be set to a folder containing autogen definition files as described as above.
- The path must be to a folder, NOT a specific autogen xml file.
- The path must be absolute.
- This will result in a corresponding autogen entry in the autogen.cfg file located at "...\ProgramData\Lockheed Martin\Prepar3D v4\autogen.cfg".
- The overall autogen priority is governed by the corresponding Entry level in this file, e.g. [Entry.0] has a higher priority than [Entry.1].
- An autogen folder added via an add-on.xml package does not need a corresponding autogen.cfg entry.
- An autogen folder added via a autogen.cfg entry does not need a corresponding add-on.xml package.
- If both integration methods are used concurrently to reference the same add-on autogen folder, then the priority derived from the add-on.xml package reference will override the priority derived from the autogen.cfg reference.
- Only 1 single add-on autogen folder will be picked up by P3D, namely whichever one has the highest overall level of priority as described above. All other add-on autogen folders will be ignored.
- Arno's Autogen Configuration Merger tool does not rectify this issue, as the ACM log indicates that the tool currently skips over add-on.xml Autogen folders, based on the assumption that P3D is already merging them correctly, which it isn't.
- Update: see post #4 below.
@Everyone: perhaps someone with LM's ear could escalate the fallback prioritisation issue? (Although I suspect they already know about it, and that this is the same "fallback issue" that is preventing Orbx from setting up their Orbx Central v4 installer to fully utilise the addon.xml method, rather than continuing to bulldoze P3D's default files).
Cheers,
Jeff
Last edited: