[RESOLVED] Add-ons in the SDK...

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

[RESOLVED] Add-ons in the SDK...

Postby aeronauta » Fri Jun 24, 2016 10:39 am

This is a quote from my own post that has not been resolved , I would like a review by LM, Rob had a suggestion but did not work...

viewtopic.php?f=6311&t=119617

Please help.

Rob thank you for your reply..., here is what I do:
in C:\Users\aero\Documents\Prepar3D v3 Add-ons I have 3 folders
DLL_XML, EXE_XML and Warren (DLL_XML and EXE_XML work fine).
inside Warren I have add-on.xml with this data

<SimBase.Document Type="AddOnXml" version="3,3" id="add-on">
<AddOn.Name>YWRN</AddOn.Name>
<AddOn.Description>Warren NSW</AddOn.Description>
<AddOn.Component>
<Category>Scenery</Category>
<Path>F:\FLIGHT SIMULATOR FILES\AIRPORTS\Warren\Warren</Path>
<Name>CH_YWRN</Name>
</AddOn.Component>
<AddOn.Component>
<Category>Texture</Category>
<Path>F:\FLIGHT SIMULATOR FILES\AIRPORTS\Warren\Warren</Path>
<Type>WORLD</Type>
</AddOn.Component>
</SimBase.Document>

in F:\FLIGHT SIMULATOR FILES\AIRPORTS\Warren\Warren I have two folders , scenery and texture which contain the .bgl in scenery and the texture files in texture

Start the SIM and get a window asking enable YWRN?...answer yes.
select scenaryio YWRN and the scenery is not there. look in options >add ons and see the three addons as per the
C:\Users\aero\Documents\Prepar3D v3 Add-ons folder and they are all ticked. Close the SIM, look in C:\Users\aero\AppData\Roaming\Lockheed Martin\Prepar3D v3\add-ons.cfg and see..

[Package.0]
PATH=C:\Users\aero\Documents\Prepar3D v3 Add-ons\DLL_XML
ACTIVE=true
REQUIRED=false
[Package.1]
PATH=C:\Users\aero\Documents\Prepar3D v3 Add-ons\EXE_XML
ACTIVE=true
REQUIRED=false
[Package.2]
PATH=C:\Users\aero\Documents\Prepar3D v3 Add-ons\Warren
ACTIVE=true
REQUIRED=false

in C:\ProgramData\Lockheed Martin\Prepar3D v3\add-ons.cfg there is nothing.
In the ContentErrorLog.txt there is nothing related to this ( have some DODOSim entries)

I have an entry for this scenery in the scenery library (disabled ) if I enable it the scenery it displays OK (indicating there is no problem with the files).

I am on Win10 latest Update, P3D V3.3.5.17625

An extra question , how do we set the active and required options in the add-on.xml??

And a request , it would be good if the add ons menu option behaved as the Scenery UI , tick or untick and the exit resolves the request as opposed to having to close the SIM to resolve it. (maybe not for exe and dll)

Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Re: Add-ons in the SDK...

Postby aeronauta » Sat Jun 25, 2016 11:10 pm

This is an example add-on.xml from the SDK...

<SimBase.Document Type="AddOnXml" version="3,3" id="add-on">
<AddOn.Name>MyAddOn</AddOn.Name>
<AddOn.Description>My Add-on developed by My Company.</AddOn.Description>
<AddOn.Component>
<Category>SimObjects</Category>
<Path>Content\SimObjects\Airplanes</Path>
</AddOn.Component>
<AddOn.Component>
<Category>Scenarios</Category>
<Path>Content\Scenarios</Path>
</AddOn.Component>
<AddOn.Component>
<Category>Scenery</Category>
<Path>Content\Scenery\Scenery01</Path>
<Name>Scenery01</Name>
</AddOn.Component>
<AddOn.Component>
<Category>Scenery</Category>
<Path>Content\Scenery\Scenery02</Path>
<Name>Scenery02</Name>
</AddOn.Component>
<AddOn.Component>
<Category>DLL</Category>
<Path>MyFirstDll.dll</Path>
<DLLType>PDK</DLLType>
</AddOn.Component>
<AddOn.Component>
<Category>DLL</Category>
<Path>MySecond.dll</Path>
<DLLStartName>MyStartFunc</DLLStartName>
<DLLStopName>MyStopFunc</DLLStopName>
</AddOn.Component>
<AddOn.Component>
<Category>Texture</Category>
<Path>Textures/Global</Path>
<Type>GLOBAL</Type>
</AddOn.Component>
</SimBase.Document>

This is in version 3.3 +hotfix.

Jorge

PS I am expecting a reply from LM , unless you have done this and found the right way please wait.Most of my AC and scenery is added using the command line , but V3.3.5.. is changing the process.

ps ps from the SDK

Distributing Add-ons
There are multiple supported methods of distributing add-ons to users. The recommended method is to distribute an Add-on Package and either place it in a directory where Prepar3D can automatically discover it or install the package directly using Command Line. The other supported method is to add each individual add-on component to add-on configuration files by using Command Line.
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

User avatar
Rob McCarthy
Lockheed Martin
Posts: 2502
Joined: Wed Aug 24, 2011 1:37 pm

Re: Add-ons in the SDK...

Postby Rob McCarthy » Tue Jun 28, 2016 1:22 pm

Hi Jorge,

Sorry for the delay. You mentioned that this scenery is also in your Scenery Library? Is the scenery installed by some other method besides through the add-on.xml? If the scenery is only being installed using the add-on.xml then it should appear in the Add-ons UI but not in the Scenery Library. Try removing the scenery so it does not display in the Scenery Library and only use the add-on.xml to install it. Disabling the items from the library may be preventing it from rendering in the app in all cases.
Rob McCarthy
Prepar3D® Core Lead

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Re: Add-ons in the SDK...

Postby aeronauta » Tue Jun 28, 2016 11:44 pm

no problem Rob, no the scenery is not showing in the scenery Library , that was just a test to ensure the scenery was OK.
It is only showing with a tic in the add ons GUI.( toghether with the 2 other xml"s for dll's and exe's. that work fine)

Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

User avatar
Rob McCarthy
Lockheed Martin
Posts: 2502
Joined: Wed Aug 24, 2011 1:37 pm

Re: Add-ons in the SDK...

Postby Rob McCarthy » Wed Jun 29, 2016 1:39 pm

Are you still seeing this problem if you use relative paths for the scenery and texture files? Instead of having a full path (F:\FLIGHT SIMULATOR FILES...) try moving the scenery and textures into a folder in the same location as the add-on.xml and have it point to the relative location, similar to the sample where a content folder is in the add-on containing all scenery.
Rob McCarthy
Prepar3D® Core Lead

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Re: Add-ons in the SDK...

Postby aeronauta » Thu Jun 30, 2016 8:06 am

Rob, no I changed the xml to

<SimBase.Document Type="AddOnXml" version="3,3" id="add-on">
<AddOn.Name>YWRN</AddOn.Name>
<AddOn.Description>Warren NSW</AddOn.Description>
<AddOn.Component>
<Category>Scenery</Category>
<Path>Warren</Path>
<Name>CH_YWRN</Name>
</AddOn.Component>
<AddOn.Component>
<Category>Texture</Category>
<Path>Warren</Path>
<Type>WORLD</Type>
</AddOn.Component>
</SimBase.Document>

and in the C:\Users\aero\Documents\Prepar3D v3 Add-ons\Warren
I placed the add-on.xml and a folder Warren with a scenery and texture folders inside

before the test I removed the package 2 entry from C:\Users\aero\AppData\Roaming\Lockheed Martin\Prepar3D v3\add-ons.cfg and on SIM start I get the msg window "Enable YWRN add-On? reply yes and P3D starts , select change airport to YWRN and ywrn airport and OK to scenario Setup gui, interesting it start to load terrein and AG and so on , but does not do a database update... and the scenery does not show. Looking at Options >add-ons the entry YWRN is there and ticked. also in C:\Users\aero\AppData\Roaming\Lockheed Martin\Prepar3D v3\add-ons.cfg ,the package .2 entry appears as ..
[Package.2]
PATH=C:\Users\aero\Documents\Prepar3D v3 Add-ons\Warren
ACTIVE=true
REQUIRED=false


Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

User avatar
WarpD
Posts: 1453
Joined: Mon Feb 14, 2011 5:29 am

Re: Add-ons in the SDK...

Postby WarpD » Tue Jul 05, 2016 12:14 pm

aeronauta wrote:and in the C:\Users\aero\Documents\Prepar3D v3 Add-ons\Warren
I placed the add-on.xml and a folder Warren with a scenery and texture folders inside


Get rid of the Warren folder inside the Warren folder and simply have the scenery and texture folders reside in the C:\Users\aero\Documents\Prepar3D v3 Add-ons\Warren along with the XML file.

Also, I caution the use of a user's Documents folder for addon installation.
Ed Wilson
Senior Developer
Mindstar Aviation

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Re: Add-ons in the SDK...

Postby aeronauta » Wed Jul 06, 2016 1:36 am

Thank you Ed , that I also did and no change...

are the suggestions you are making because you got it working ??

Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

User avatar
WarpD
Posts: 1453
Joined: Mon Feb 14, 2011 5:29 am

Re: Add-ons in the SDK...

Postby WarpD » Wed Jul 06, 2016 8:02 pm

I have gotten aircraft and modules to install without issue. I have not attempted to install a scenery. I will see what I can do.
Ed Wilson
Senior Developer
Mindstar Aviation

User avatar
WarpD
Posts: 1453
Joined: Mon Feb 14, 2011 5:29 am

Re: Add-ons in the SDK...

Postby WarpD » Wed Jul 06, 2016 8:30 pm

Ok... I attempted to do something rather simple... add an airport.

First I created an add-on.xml file that contained the following:

Code: Select all

<SimBase.Document Type="AddOnXml" version="3,3" id="add-on">
   <AddOn.Name>KJYO</AddOn.Name>
   <AddOn.Description>Mindstar Aviation's KJYO</AddOn.Description>
   <AddOn.Component>
      <Category>Scenery</Category>
      <Path>KJYO</Path>
      <Name>Mindstar KJYO</Name>
   </AddOn.Component>
</SimBase.Document>

The airport scenery was located in "G:\Program Files (x86)\Mindstar Aviation\Scenery". In there was a folder titled "KJYO" and that folder contained two folders, one "Scenery" and one "Texture". A rather typical airport scenery file layout.

I placed the add-on.xml file in "G:\Program Files (x86)\Mindstar Aviation\Scenery".

I ran the following command line:

Code: Select all

prepar3d "-configure: Category=Add-on Package, Operation=Add, Title=KJYO, Path=G:\Program Files (x86)\Mindstar Aviation\Scenery"


While I can see the addon airport scenery in the Addons dialog inside the sim, the actual scenery is not loaded nor is it recognized as existing. No rebuilding of any indexes or databases.

So I can confirm, this simply does not work for scenery, at least airport scenery.
Ed Wilson
Senior Developer
Mindstar Aviation

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Re: Add-ons in the SDK...

Postby aeronauta » Wed Jul 06, 2016 11:18 pm

Thank you Ed , I could also load .dll's and .exe's with no problem , but all along nothing will get the scenery to display...

Thank you for testing and confirming...

Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

Mike LM
Posts: 1344
Joined: Mon Jul 20, 2015 5:26 pm

Re: Add-ons in the SDK...

Postby Mike LM » Thu Jul 07, 2016 3:12 pm

We are looking into this. I've been able to reproduce this with a different set of add-on scenery, but haven't been able to pinpoint the issue. It most likely has something to do with the airport specific scenery, as scenery outside of an airport seems to work correctly. In the meantime, you should still be able to add the scenery via the scenery library or adding it in the category "Scenery" without using the add-on.xml.

- Mike
Prepar3D® Software Engineer

User avatar
WarpD
Posts: 1453
Joined: Mon Feb 14, 2011 5:29 am

Re: Add-ons in the SDK...

Postby WarpD » Thu Jul 07, 2016 8:14 pm

I tried adding it via the Scenery category command line. While the sim indicated it as installed (saw it in the library list), I didn't see the actual scenery. Was odd. Of course, the old way of adding it to the scenery library works without issue.
Ed Wilson
Senior Developer
Mindstar Aviation

User avatar
aeronauta
Posts: 1524
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Re: Add-ons in the SDK...

Postby aeronauta » Sat Jul 09, 2016 4:39 am

Thank you Mike , yes I can use the old method ,as the scenery entry appears in the scenery.cfg and works OK.

Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR - Nemetz Designs Beta Tester

User avatar
WarpD
Posts: 1453
Joined: Mon Feb 14, 2011 5:29 am

Re: Add-ons in the SDK...

Postby WarpD » Mon Jul 11, 2016 3:24 pm

Odd... I thought I had seen a post regarding having found something?
Ed Wilson
Senior Developer
Mindstar Aviation


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 6 guests