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.
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.)
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:
title
atc_model
icao_type_designator
ui_type
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.
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.
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.
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?
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: