Get installed aircraft list (titles for AI insertion)

Is there any legit way to get list of installed aircraft titles (liveries) by SimConnect/WASM, or at least JS script? Files crawling is not an option because some (all for Xbox) aircraft CFGs may be encrypted.
Pilot should have a list of installed liveries available so he can choose aircraft he likes, then WASM script insert AI airplane by SimConnect_AICreateNonATCAircraft.

Only solutions I see right now - temporarily store selected aircraft history in the WASM module memory, and send data to the external database. But both are not perfect.

2 Likes

It will be particularly useful to get also ICAO ID, ICAO category, number and type of engines for each aircraft. This could be really useful for cross-platform multiplayer clients (such as JoinFS, for example.)

You should create an idea for this. We would also love to have access to the full list of aircraft the user has installed!

1 Like

You will get a new function named SimConnect_EnumerateSimObjectsAndLiveries in the mid-December patch. :wink:

Best regards,

Eric / Asobo

8 Likes

That is great, thank you.

PLEASE also include non-flyable SimObjects <3

Hi Eric, thanks for this addition, it’ll be very helpful for network clients such as vPilot for VATSIM.

Would you be able to elaborate on which properties of the sim object containers will be returned?

When vPilot scans the packages to find all models, it parses any located aircraft.cfg files and builds model matching rules based on these properties:

  1. title
  2. atc_model
  3. icao_type_designator
  4. ui_type
  5. atc_parking_codes

These properties are used to make a best-guess-effort at figuring out which ICAO aircraft type code and optionally which ICAO airline code the model represents, in order to determine if the model can be used to create an aircraft object to represent another aircraft encountered while flying on VATSIM.

If these properties could be returned by this new function, that would mean vPilot would no longer have to scan the packages, which in turn means that vPilot would no longer need to locate the packages folder by parsing the userCfg.opt file, nor would it need to keep track of the file locations, byte sizes, and datestamps, in order to detect when new models are added or models are removed. In short, the code could be much cleaner and more robust.

Thanks again!

-Ross

1 Like

This is fantastic news, thanks Eric. Can you confirm this will return all available aircraft, not just ones that might be locally cached?

For those wondering, yes, this made it into today’s update although the SDK docs don’t reflect it yet (at least as far as I could find). There is a new sample that shows how it works though.

I updated my test app to use the new API, if anyone wants to see a managed code implementation of it you can check out at msfs2024-vmr-generator/src/ViewModels/ModelMatching/GetLiveriesCommand.cs at main · neilenns/msfs2024-vmr-generator · GitHub.

Unfortunately the API is… underwhelming. All you get back is the AircraftTitle and LiveryName for the actual aircraft in the sim. You don’t get any of the additional information that @BTVPilot mentioned above would be useful. And, sadly, there’s nothing available for the thousands of liveries Asobo has access to for their AI aircraft.

Which is precisely what this function is supposed to provide.
Additional information may be made available later on through a different function - but this one is called “EnumerateSimObjectsAndLiveries” for a reason.

Best regards,

Eric / Asobo

To be fair, there is an enum and you can use it to enumerate ANIMAL, BOAT, and GROUND as well. I don’t have that in my sample since those aren’t the items I’m interested in.

Should I start a new thread with the request to enumerate and create the AI livery aircraft? And one for the additional livery info that was previously visible in aircraft.cfg that @BTVPilot mentioned but isn’t included in the new API?

Thanks!

I retracted my statement then. Thank you for the clarification!

Played with this some more, it does appear some of the AI liveries are returned, although not nearly as many as I expected based on the previews shown before the sim released.

I spent some time trying to clean up the livery names to get airline and type codes since the API doesn’t return those and it’s doable but the data is messy. Here’s my mapping table just for Alaska Airlines liveries:

  { "AsoboAirline": "ALASKA", "IcaoAirline": "ASA" },
  { "AsoboAirline": "ALASKAAIRLINES", "IcaoAirline": "ASA" },
  { "AsoboAirline": "ALASKAN", "IcaoAirline": "ASA" },
  { "AsoboAirline": "ALASKANAIRLINES", "IcaoAirline": "ASA" },

Edit: Code is posted here if anyone wants it: GitHub - neilenns/msfs2024-vmr-generator: Creates a VATSIM model matching file for MSFS2024 aircraft and livery. The relevant code is in src/ViewModels/ModelMatching/GetLiveriesCommand.cs and Models/Livery.cs.