This model matching now comes default in FSLTL, in the file called FSLTL_Rules.vmr. So you shouldn't need this if you only use FSLTL, unless you want more customisation like airline groups and excluding certain liveries.
This model matching tool is a python file that will generate a vmr that matches to the closest size while accounting for the manufacturer, whether the aircraft has a new engine option or not and the aircraft family and the model matching will use whichever models you want to use.
Are you tired of having special liveries appear so often that they lose their specialness?
Well using this model matching, you can adjust how often you want to see each livery.
In my experience with other model matching tools, I've found them very lackluster, like when matching an aircraft type getting a whole range of different aircraft sizes to go with it. For example, when matching a 777, getting aircraft all the way from a 767 to an A380. Another disappointing thing was seeing special liveries way too often. That is why I wanted to create a tool that would fix these issues as well as just creating the most accurate model matching tool available. This tool will match the aircraft type to the closest size available, as well as taking into account the manufacturer, new engine option and the family of the aircraft.
If you want to see an example of this in action, look at the screenshot above that shows Etihad's model matching (keep in mind I'm only using FSLTL models there).
This Model Matching works with FSLTL and I'm 99% sure it works with AIG (I tested some AIG models but I didn't have time to test all, if an AIG model doesn't work, just comment below which model and I'll try to fix it)
Instructions:
This tool is very easy to use, just download the zip file included, extract it and you'll find ModelMatching.py. Be advised, you will need Python to run this file which, if you don't already have it, you can download here: https://www.python.org/downloads/ Either place the file in your FSLTL Airplanes directory (fsltl-traffic-base\SimObjects\Airplanes) or AIG directory (SimObjects\Airplanes) (see pic 2 above) or select edit with IDLE when right clicking on the file (see pic 3 above) and copy and paste which ever directories you are using into the ModelsDirectory variable. Make sure you have the directory surrounded by apostrophes and either place an r in front of the directory and first apostrophe: ModelsDirectories = [r'C:\Users\User\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages\Community\fsltl-traffic-base\SimObjects\Airplanes', r'C:\Flight Simulator\AIG_AIManager_1.1\aig-aitraffic-oci-beta\SimObjects\Airplanes']
or replace all backslashes in the directory with forward slashes: ModelsDirectories = ['C:/Users/User/AppData/Local/Packages/Microsoft.FlightSimulator_8wekyb3d8bbwe/LocalCache/Packages/Community/fsltl-traffic-base/SimObjects/Airplanes', 'C:/Flight Simulator/AIG_AIManager_1.1/aig-aitraffic-oci-beta/SimObjects/Airplanes'] or it will not work. Then you can run the file in IDLE or double click on the file, this will create a vmr file wherever the ModelMatching.py file is located.
Extra Customisation:
Making Certain Liveries Appear Less Often:
For extra customisation, including making certain liveries appear less often or excluding liveries, just open the file included in the zip called ModelChanges.txt, place this in the same location as ModelMatching.py, or alternatively copy the directory of ModelChanges.txt into the ModelChangesDirectories variable in the python file, again this will have to have apostrophes around it and either have an r in front of the first apostrophe: ModelChangesDirectories = [r'C:\Flight Simulator\ModelMatching\ModelChanges.txt'] or you will have to replace all the backslashes with forward slashes: ModelChangesDirectories = ['C:/FlightSimulator/ModelMatching/ModelChanges.txt']
To customise a certain model, first you will need to find the title of the model, do this by going to wherever that model is located and opening up the aircraft.cfg file. Locate where it says title and copy and paste this whole line into ModelChanges.txt. Next, to change how often this model will appear, you need to decide on a fraction for how often this model will appear. For example I want to change how often the Qantas 100 787 livery will appear, I navigate to the model location, fsltl-traffic-base\SimObjects\Airplanes\FSLTL_B789_QFA_100 (see pic 4 above), I open up the aircraft.cfg file and see the title as this: title = "FSLTL_B789_GE_QFA_100" ; Variation name. (see pic 5 above) I copy and paste this into ModelChanges.txt. Now since Qantas only has one 100 years Boeing 787-9 livery and since there are 11 Boeing 787-9s in its fleet at the moment, the fraction we get is 1/11. So underneath that title we just put random = 1/11. Now we should only be seeing that model every 1 out of 11 times.
Excluding:
Now say we had a stub livery from FSLTL we didn't want in our vmr, and for whatever reason it's an A321 Egyptair STUB livery, we find that location: fsltl-traffic-base\SimObjects\Airplanes\FSLTL_A321, we open up the aircraft.cfg file and find that title: title = "FSLTL_A321_MSR-Egyptair-STUB" ; Variation name. We paste this into the ModelChanges.txt and underneath it we simply type exclude = true, this will make sure it isn't included in our vmr file.
(See pic 6 above)
You can also set the variable ExcludeStubs to either True or False, if you want to exclude the STUB models that are included with FSLTL, these models are basically all white models that haven't been painted for a certain airline yet. ExcludeStubs is set to True by default.
You can also make these random and exclude changes in the aircraft.cfg files for the models, but I wouldn't recommend it as they might get removed when the models get updated.
Airline Groups:
Another thing you can do is put in airline groups, this is for when VATSIM users make the mistake of putting in the IATA code instead of the ICAO code in their callsign when they connect, for example AA instead of AAL for American Airlines. Airline groups are also for sub airlines of the main airline, usually regional airlines, for example Qantas QFA has QLK, QJE and NWK. I already have some airline groups in the ModelMatching.py file, if you want to add your own you can do so in the python file or by adding them to the ModelChanges.txt file. For an example of adding airline groups to the python file see pic 7 above. Adding an airline group to the txt file is done like so: AirlineGroup = ZZZ, ZZ, for example say we were adding the Qantas airline group: AirlineGroup = QFA, QF, QJE, QLK, NWK (See pic 8 above) Adding them to the txt file may be better just in case I update the python file, however if I do update the python file, it would be really easy to copy your added airline groups and paste them into the updated python file.
Aircraft Types:
You can also add extra aircraft types, this is for if I somehow haven't added an aircraft type from AIG (I definitely have all types from FSLTL) or if you want more coverage for model matching when a VATSIM user is using a pretty odd aircraft. I already have most aircraft types added in the ModelMatching.py file, so if you want to add more you can do so in the python file or in the ModelChanges.txt file. You can do this in the ModelMatching.py file like so: VariableName = Airplane('TypeCode', Size, 'Manufacturer', EngineType, WideBody, neoExists, neo, 'Family'). So for example when adding an A321: A321 = Airplane('A321', 154.687, 'Airbus', 'jet', False, True, False, 'A320'). (See pic 9 above) I’ve set 154.687 as the size here because that is the number I get when I multiply the length of the aircraft by the cabin width, I've done this with all other aircraft. I've set the EngineType here to 'jet' because it has jet engines rather than prop engines. I've set WideBody to False because it is a narrow-body. I’ve also set neoExists to true because the A321neo exists, neo stands for new engine option, so if adding a Boeing 737-900, for example, you would also set neoExists to true because the Boeing 737 MAX 9 exists. And I’ve set neo to False because we’re adding the A321ceo here, not the neo. Lastly, I’ve set the family to ‘A320’ because the A321 is part of the A320 family.
Adding aircraft types to the ModelChanges.txt file is similar but not the same, as you set all the variables on different lines. The first line has to be the the type code, so we put
TypeCode = ‘TypeCode’
The next line is size, we put Size = Size
Next is the manufacturer, we put Manufacturer = Manufacturer
Next is the engine type, we put EngineType = EngineType
Next is wide-body, we put WideBody = WideBody
And next is neoExists, we put neoExists = neoExists
After this is neo, we put neo = neo
And finally it’s the aircraft family, we put family = family
So if adding a Boeing 767-300 for example, this is how it would look:
TypeCode = B763
Size = 259.128
Manufacturer = Boeing
EngineType = jet
WideBody = True
neoExists = False
neo = False
Family = B767
(See pic 10 above)
Adding them to the txt file may be better just in case I update the python file, however if I do update the python file, it would be really easy to copy your added aircraft types and paste them into the updated python file.
After you have finished customisation you can just run the python file and it will generate a vmr file at the python file's location.
SameFamily and SameType variables:
With both variables equal to False, it will model match to the closest aircraft.
With SameFamily equal to True, it will model match to the closest model within the same aircraft family. For example A321 to A320, but not A320 to B738.
With SameType equal to True, it will only model match to the exact same type of aircraft, if that model type doesn't exist, it will choose the blank model for that aircraft type (if using FSLTL).
I'm getting an error about character mapping when I try to run the .py:
Traceback (most recent call last):
File "G:\Games\MFS\Community\fsltl-traffic-base\ModelMatching.py", line 342, in <module>
for line in AircraftFile:
File "C:\Users\TerminalRat\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4908: character maps to <undefined>
11 months ago
Hmm, that's an interesting error, have you set the ModelsDirectories variable to the 'fsltl-traffic-base\SimObjects\Airplanes' directory?
11 months ago
Ballistic237
TerminalRat
You'll have to forgive me if I'm just being completely oblivious to the instructions, but I did the following using the bulk installed models from AIG (freeware only):
1.) Extracted .rar to produce the .py file
2.) Placed .py file in the AIG Directory (SimObjects -> Airplanes)
3.) Ran the .py, produces .VMR file.
4.) Attempt to add to rule set, met with following error (below)
The following error occurred while attempting to load the selected rule set:
There is an error in XML document (2568, 608)
...
I'm guessing a line somewhere is not properly structured or something? Let me know what other information you think you might need. Thanks for the awesome .vmr creator!
11 months ago
Ooooh sorry about that, let's try to get that fixed.
I've just sent you a dm and if a fix is needed I'll upload it here after we figure it out.
11 months ago
Ballistic237
Timberolic
At FSLTL we use a python script as part of our build process to generate the VMR file - if you ever want to come and help improve that script with the dev team - let me know on the discord server 😊
1 years ago
Just sent a message on the discord server :)
1 years ago
Ballistic237
whakamolenz
If I understand correctly, you can change de wingspan of any aircraft to match the parking spots. In FS2004 I was able to do that when editing my airports. Actually in MSFS 2020 at CYUL airport, there is only one parking spot for heavy plane. If I change the wingspan of AI aircraft, they will be able to park elsewhere than this only parking spot ? I had a look at the pictures and even if I understand the basic of this utiliy, a video tutorial would be much more appreciated.
1 years ago
Sorry, this model matching is for online services like VATSIM, I'm not sure if you can change the wingspan of AI aircraft so that they spawn at specific gates. Also I'm in the process of making a video tutorial :)
1 years ago
Ballistic237
AVCORP