Jump to content
Sign in to follow this  
captain420

Install Taxi2Gate VHHH via add-on.xml method

Recommended Posts

Does anyone here have this airport installed via the add-on.xml method? Could you please show me how it's done. There are still certain devs who insist install into the sim's root folder. I wish FlyTampa, Taxi2gate, Drzewiecki, etc. would conform to the add-on.xml method which Flightbeam, FSDT and Imaginesim follows! They make it extremely easy.

image.png

Edited by captain420

ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post

Using the P4AO tool to do it, but you can of course write the add-on.xml yourself too.

It gets tricky when the installer doesn't let you choose a path and uses the P3D registry keys pointing at your sim. Short of editing those keys (which must under all circumstances be undone afterwards!) you are out of luck in this case (unless you don't care about breaking the uninstaller and move the DD folders manually)

Best regards

Edited by Lorby_SI
  • Like 1

LORBY-SI

Share this post


Link to post

Thanks, the thing with Taxi2Gate VHHH is that it includes 2 sceneries within 1 if that makes any sense. For example Inside the Taxi2gate main VHHH scenery folder there are 2 sceneries. One is for the airport itself, and the other is the terrain. Not sure how I would write the add-on.xml in this specific scenario.

image.png


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post
9 minutes ago, captain420 said:

Not sure how I would write the add-on.xml in this specific scenario.

Simple. There are three components in it, two of category Scenery and one of category Effects. And I would use absolute paths and save ONLY the add-on.xml file into the autodiscovery path, "\Documents\Prepar3D V5 add-ons\T2G VHHH\add-on.xml". If you keep it in the remote location, use the P3D CLI to add the package. You should never edit the add-ons.cfg file(s) manually.

You can have any number of components in an add-on.xml (= addon package). You could add all your airports to the same package if you wanted to. I would suggest not to create a single package for every airport. Group them by geography or developer, keep the number of packages low.

When writing XML files, be mindful of syntax and character encoding. There is a lot more to these files than meets the eye: https://www.w3.org/TR/xml/

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>T2G VHHH</AddOn.Name>
  <AddOn.Description />
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>D:\P3D Addons\TAXI2GATE - VHHH v2\VHHH-TERRAIN</Path>
    <Name>T2G VHHH Terrain</Name>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>D:\P3D Addons\TAXI2GATE - VHHH v2\VHHH</Path>
    <Name>T2G VHHH</Name>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>D:\P3D Addons\TAXI2GATE - VHHH v2\Effects</Path>
    <Name>T2G VHHH Effects</Name>
  </AddOn.Component>
</SimBase.Document>

I really recommend using P4AO instead... I initially wrote it for my own use when I got tired of typing XML files...

Best regards

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
2 minutes ago, Lorby_SI said:

use the P3D CLI to add the package. You should never edit the add-ons.cfg file(s) manually.

Could you show me an example how to do this? I've been manually adding them by editing the add-ons.cfg using notepad++ and seem to have no problems.

and thanks for the above example, that helps me understand and visualize it a lot better now!


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post
7 minutes ago, captain420 said:

and seem to have no problems

Didn't you just open a thread about the file getting screwed up? It is managed by the sim, and it has a special character encoding. Editing it manually can destroy the entire file. And you are certainly aware that there are two of those files?

Anyway, saving the add-on.xml files into the autodiscovery path makes it unnecessary to edit either of the add-ons.cfgs (by CLI or manually). The simulator will find those packages automatically. This method will also avoid grievances should the ProgramData\...\add-ons.cfg be deleted or corrupted (it can't be rebuilt automatically).

P3D CLI is described in the "Learning Center.chm", which is in your main simulator directory. Take a look at this chapter:

"Learning Center -> Software Development Kit (SDK) -> Add-ons -> Add-on Configuration"

Best regards

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post

In the example above for vhhh, how would you manually set the layer order? Some sceneries have multiple folders, how would you handle that?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post
20 minutes ago, captain420 said:

In the example above for vhhh, how would you manually set the layer order? Some sceneries have multiple folders, how would you handle that?

Components in an add-on.xml don't need layers. They are arranged as they appear in the file (= if you need them arranged the other way around, the Components trade places in the XML file) and added to the library in the sequence that the simulator reads the packages.

For advanced layering you need a tool. Or add <Layer> tags manually. Which seems like a massive task to me if you are trying to keep this consistent across the whole library (=without duplicates or conflicts)

 

Just to complete the part about the add-ons.cfg files: the one in Appdata\Roaming cannot be edited, the simulator uses it to store the packages that it finds on the default autodiscovery path. Only the one in \ProgramData\ can be edited (CLI or manually). But when it is lost, the contents are lost too, while the sim will always rebuild the one in AppData\Roaming from the packages on the autodiscovery path (= if you add packages that are not saved there, those are lost as well)

Best regards

 

Edited by Lorby_SI
  • Like 1

LORBY-SI

Share this post


Link to post

Aaron, just get Lorby's free Addon Organizer. It will give you the option of installing it as an xml entry, and do it all for you. I was only able to get VHHH to work as an xml scenery anyway.

  • Like 1

Avsim member since 2002. 1000+ posts on old account.

Share this post


Link to post

I added T2g VHHH v2 manually to the scenery.cfg. Took about a minute and is super simple to do. I still prefer it myself over the xml addon, at least I know where everything is.

 


i7-13700KF, 32gb DDR4 3200,  RTX 4080, Win 11, MSFS

Share this post


Link to post

A word of caution - I discovered when I was trying to transition airports from the scenery.cfg to add-on.xml method that not all of the files for the airport are in the scenery and texture folders for the airport.  For example, FlyTampa Tampa normally installs into a FlyTampa\Tampa folder in the Prepar3D folder. However, it also installs a few files in the Effects folder and the texture folder under it.  If you move the FlyTampa\Tampa folder outside the Prepar3D folder and create an add-on xml file for it, the airport will still work.  However, if you then delete your Prepar3D folder as part of an upgrade or other event, the effects files will get lost.  I don't know if the missing files will cause the sim to crash, but there probably would be some issue, even if a minor one.

Also, just because a developer uses an add-on.xml file to point to the scenery and texture folder for the airport, it doesn't mean that they don't also install files into other folders in the Prepare3D folder that could get lost.  Drzewiecki Design sceneries seem to do this.  (They use an add-on.xml file to reference the scenery and texture folder which is installed into the Prepar3D folder by default, and they also add additional files elsewhere in the Prepar3D folder.)

I think Lockheed Martin's goal was to allow 3rd party airports to install into a single folder that contains every file neccessary for the airport, but only a few developers truly do this. FSDG, for example, is one that seems to do it right.  When I installed their newer sceneries, they created an Effects folder outside the sim folder which is also referenced in their add-on.xml file. That way their effects files won't get lost if the Prepar3D folder is removed.  If all developers used the add-on.xml file to the fullest like this, we truly could just wipe the entire P3D folder when it was time to upgrade.

FYI - I've been using SoftPerfect's File Access Monitor to track what files get installed by 3rd party developers.  It's a little cumbersome to use, but it's free.  It gave me enough information to realize that trying to maintain a P3D folder with nothing by core files in it was going to be too hard, so I stopped worrying about it.  It will tank your performance, so don't leave the service running when you run the sim.

  • Like 1
  • Upvote 1

Scott Easley

Share this post


Link to post
6 hours ago, seasley said:

For example, FlyTampa Tampa normally installs into a FlyTampa\Tampa folder in the Prepar3D folder. However, it also installs a few files in the Effects folder and the texture folder under it.

Do you happen to know the files that gets installed into the Effects folder so that we can move them out? It's really frustrating that 3rd party devs still do this.

 

8 hours ago, Coneman said:

Aaron, just get Lorby's free Addon Organizer. It will give you the option of installing it as an xml entry, and do it all for you.

Is that the same as P4AO and is it fully compatible with P3D v5?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post

I have fake P3DV4/V5 (basically empty and not registered) installations on an another computer. I install all new sceneries there, it allows me to see what the installer does and then I move everything into a single directory on my main flying system. SODE files need to be moved separately of course. I then register the scenery with the Lorby Add On organizer.

This works 99 % of the time, some installers won't work as not all value(s) for P3D are in the registry and I have not found the energy yet to go digging for them. Aerosoft sceneries are an exception, but they install nicely into their own directory anyway.

And BTW here is my add-on.cfg for VHHH:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>HongKong</AddOn.Name>
  <AddOn.Description>HongKong</AddOn.Description>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>F:\Addon Scenery V5\Hong Kong\VHHH - Chep Lap Kok\Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>F:\Addon Scenery V5\Hong Kong\Hong Kong and Shenzen - RWS</Path>
    <Name>Hong Kong and Shenzen - RWS</Name>
    <Layer>321</Layer>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>F:\Addon Scenery V5\Hong Kong\VHHH - Chep Lap Kok\VHHH - Chep Lap Kok TERRAIN</Path>
    <Name>VHHH - Chep Lap Kok TERRAIN</Name>
    <Layer>322</Layer>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>F:\Addon Scenery V5\Hong Kong\VHHH - Chep Lap Kok\VHHH - Chep Lap Kok Airport</Path>
    <Name>VHHH - Chep Lap Kok Airport</Name>
    <Layer>323</Layer>
  </AddOn.Component>
</SimBase.Document>

Edited by A340Bangla
inserted add-on.cfg
  • Like 1

Erhard

I9 11900k RTX 3080 TI 3 x 55" LED TV 4K, 2 more PCs for displays and hardware connection Prosim A320

Share this post


Link to post
26 minutes ago, A340Bangla said:

I have fake P3DV4/V5 (basically empty and not registered) installations on an another computer. I install all new sceneries there, it allows me to see what the installer does and then I move everything into a single directory on my main flying system.

This seems like a good way to handle the situation! Could you tell me how you created the fake P3D installation? Do you just create folders or did you have to do anything additional such as adding stuff to the Window's registry as well?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

Share this post


Link to post
28 minutes ago, A340Bangla said:

And BTW here is my add-on.cfg for VHHH:

Which VHHH are you using? This doesn't look like Taxi2Gate. I see a Shenzen scenery is also included in yours. Does this bring buildings into Shenzen?


ASUS ROG Maximus Hero XII ▪︎ Intel i9-10900K ▪︎ NVIDIA RTX 3090 FE ▪︎ 64GB Corsair Vengeance RGB Pro ▪︎ Windows 10 Pro (21H1) ▪︎ Samsung 970 EVO Pro 1TB NVME SSD (OS Drive) ▪︎ Samsung 860 EVO 2TB SATA SSD ▪︎ Seagate 4TB SATA HDD ▪︎ Corsair RMx 850W PSU

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