- Thu Jun 01, 2017 8:11 pm
Bradley Grafelman 1242018 wrote:
Ross Carlson 887155 wrote:I need to update vPilot with the new set of locations for v4 before it will be usable.
Out of curiosity... and assuming you've already considered but rejected this option... why doesn't vPilot just ask the user to browse to their installed simulator's location? Sure, digging through the registry for known keys in an attempt to guess the correct location is an excellent convenience, but it seems odd to not let the user simply specify it in the end (especially since the failure to find the location is treated as a fatal error).
Mainly because the install directory isn't all that's needed. The main thing that's needed is the location of the file that contains the list of SimObjectsPaths that vPilot needs to scan. Depending on the simulator, those entries are either contained in the FSX.cfg which is stored in the ApplicationData, or in the case of P3D V1, they are in the main Prepar3D.cfg, or in the case of P3D v2+ they are in a separate file dedicated to that purpose called SimObjects.cfg which is found in the CommonApplicationData folder.
vPilot needs to parse out that list of paths because they can either be relative to the sim install folder, or they can be absolute paths pointing somewhere else on the system. And starting with (I think) P3Dv3, those paths can have an "active" flag, so that a set of models can be installed but not actually loaded by the sim, so vPilot needs to know not to use those models for model matching.
So I could certainly ask the user to specify their install folder, but I would also have to have the user specify the location of the file that contains the SimObjectPath definitions, and that's getting a bit more advanced, given that these files are usually in the hidden AppData or CommonAppData locations.
One possibility would be to automatically scan the AppData and CommonAppData folders to see if there are any subfolders matching a given set of patterns, such as "Microsoft\FSX-SE" or "Lockheed Martin\Prepar3D V*" and present the list of matches for the user to choose from, but that just seems ugly and error prone. I think the best option is to just require that the user have a properly installed sim with the correct registry entries and that's going to work perfectly for 99.99% of the user base. It just has the unfortunate side effect that when LM releases a new major version of P3D, vPilot needs an update in order to find it, because they change their registry keys and folder structure each time, to include the major version number, so that you can have multiple versions installed side-by-side.
One thing this has led me to consider is having the database of known simulator paths downloaded from the vPilot server each time, so that I can just add a new version of a sim without releasing a new build. This would help for P3D major version updates, and also for if the FSX Steam Edition changes its paths.
Matthew Bartels 863645 wrote:Maybe I did something very wrong, but vPilot is working for me in V4. All my AI models on the other hand... not so much
I'm guessing you still have an earlier version of P3D installed, and vPilot is finding that. vPilot doesn't actually validate that the sim you are running is the same one you told vPilot you're running in the settings.
Matthew Bartels 863645 wrote:Can confirm that most FAIB models work, but most of the legacy AIA and TFS models are not working.
What do you mean by "not working" here?