vPilot Model Matching in P3D4


In het vorige artikel is er beschreven hoe je vPilot installeert en hoe je handmatig andere aircraft modellen kan configureren, zodat je de collega-piloten kunt zien met hun eigen aircraft. Veel handiger is natuurlijk wanneer je dat in een bestand krijgt aangeleverd. Om de aircraft die je met VATSIM als AI model gebruikt te kunnen onderscheiden, volgen we de zelfde handelwijze als bij het installeren van een IvAo-MTL.

  1. Wat je ook gebruikt voor VATSIM als database voor de AI modellen, de basisinhoud is altijd een map met de naam van het AI-Aircraft plus een bestand aircraft.cfg en een bestand [naam_aircraft].air
  2. Ook zitten en in de map AI-Aircraft een of meerdere submappen voor modellen resp textures.
  3. Vergelijk even de situatie IvAo > VATSIM
  4. De voorbereidingen:
    1. Open de map ..\Simobjects en maak een submap VATSIM_MTL aan. In deze map komen de aircraft met de mappen inhoud zoals hierboiven beschreven
    2. Open nu het bestand C:\ProgramData\Lockheed Martin\Prepar3D v4\simobjects.cfg en kopieer:
      [Entry.9]
      Title=Default Countermeasures
      Path=SimObjects\Countermeasures
      Required=True
      Active=True
    3. en plak deze onder [Entry.9]
    4. Hernoem deze kopie bij Entry.x en pas het pad aan als
      [Entry.10] //  of bij jou een ander getal dat volgt op een vorige Entry.x
      Title=VATSIM_MTL
      Path=SimObjects\VATSIM_MTL
      Required=True
      Active=True
    5. Bewaar het bestand.
  5. Volgende stap: Je hebt de verkregen aircraft modellen voor het vliegen met VATSIM geplaatst in de map … \Simobjects\VATSIM_MTL\ …
    1.  Ga nu naar  het item vPilot/ Model Matching / Custom rules en
    2. Kies hier Add Custom Rule Set(s)
    3. Ga na het openen van het verkennerscherm naar de map… \VATSIM_MTL en
    4. kies het bestand AI Matching Rules Generated.vmr of een overeenkomstig bestand dat jou de xml versie levert. (Het is handig wanneer je de matching.xml bestanden daar opslaat).
    5. Ga nu naar vPilot/Model Matching en kies Rescan.
    6. Voila:
      Het resultaat van je handelen vind je ook terug in het scherm van vPilot. Aangezien er in de IvAo_MTL slechts 8 modellen geïdentificeerd zijn, kan je deze dus beter uitzetten.
    7. Tot slot nog een handigheidje: vlieg je niet met IvAO of niet met VATSIM, hernoem dan de mapnaam in … \Simobjects\ en zet een een $-teken voor ($VATSIM_MTL en/of $IVAO_MTL). Op deze wijze worden de aircraft niet geladen omdat de simobjects.cfg de map niet kan vinden.
       
    8. vPilot_2017-11-15_12-48-49

Airplanes explained (Version 1)



You can translate this page in any language! Look in the footer widget Google Translate


Before we dive into the aircraft.cfg, we will refresh your memory with the standard layout of  an airplane folder.

  • Press Windows 10 -Start,
  • Select File Explorer,
  • Select the installation folder of your sim, i.e. : F:\P3D4\SimObjects\Airplanes and there select the folder DeHavilland_Beaver_DHC2.
  • This is what you [could] see >>

In a standard airplane folder you will find the folders:

  • model
  • panel
  • sound
  • soundai
  • Texture
  • Texture.0
  • Texture.1 (up to Texture.n or Texture.named)
  • the file aircraft.cfg
  • the related .air file: in this case DeHavilland_Beaver_DHC2.air

Note: In each ‘flyable’ aircraft you must have a panel folder and sound folder, else this aircraft is only used for AI traffic. Without panel folder, the aircraft will not show in the (P3D4) Select Vehicle screen.

TIP: if you want to make this aircraft 'flyable' just copy|paste the related panel folder and sound folder from your FSX sim to this location. Works in most cases for stock aircraft.

TIP: if you have a mirad of planes, do a pre selection in the search field, in the right upper corner of Select Vehicle screen.

REMEMBER: Search box, VEHICLE TITLE, VEHICLE TYPE, PUBLISHER and MANUFACTURER

The File aircraft.cfg

REMEMBER: Before you start hacking around in cfg files, make a copy of the original one ... I only tell you once ...

What you should know before editing an aircraft.cfg or any text file:

  • Use the text editor program Notepad++ to make move, add or changes in cfg or txt files. Reason for not using Windows Notepad (works anyway) is that you don’t have line numbers as a reference. Download Notepad++ here: https://notepad-plus-plus.org/
  • An aircraft.cfg file is just a plain text file with ‘statement lines’ to be executed by the sim.
  • A statement can have ‘a comment out’  by placing  a semicolon or double-forward slashes before a line.
  • Make a description of important changes in the top of the text-file also showing the source, your contact name and dates, etc. i.e.:
    • //Date: yyy-mm-dd | Compatibility changes for Prepar3Dv4 version by [yourname@mail.com]
  • About Sections: in an aircraft.cfg you will see [sections] between [square brackets] as i.e. [fltsim.o]
  • The last statement line in a section is closed with a ‘hard return’ thus creating a space line.
  • If you want to separate sections visually, create a (79) character line as below.
    //----------------------------------------------------------------------------
  • When changing a file, do not make a mess of it … and don’t forget to save changes during your work in progress.
  • Adding more liveries to the airplane folder: read the chapter Add a Texture below.
TIP: create a last line in the aircraft.cfg named //EOF nnn where nnn equals this last line number. Reason: comparison with previous aircraft.cfg

TIP: if you want to compare 2 aircraft.cfg's from the same airplane, use WINMERGE. Download this program here: http://winmerge.org/?lang=en

In the standard layout of an aircraft.cfg you will read [Sections] in the following sequence:
Further information, if there is, can be found using the available  [Section]-hyperlink.

  • [fltsim.0] up to [fltsim.n]  >> must start with [fltsim.0] when counting
  • [General]
  • [CameraDefinition.0] up to [CameraDefinition.n]
  • [CameraDefinition.001] up to [CameraDefinition.nnn]
  • [WEIGHT_AND_BALANCE]
  • [airplane_geometry]
  • [Reference Speeds]
  • [flight_tuning]
  • [GeneralEngineData]
  • [piston_engine]
  • [propeller]
  • [electrical]
  • [contact_points]
  • [brakes]
  • [hydraulic_system]
  • [fuel]
  • [Views]
  • [flaps.0]
  • [Radios]
  • [keyboard_response]
  • [direction_indicators]
  • [attitude_indicators]
  • [turn_indicators]
  • [airspeed_indicators]
  • [vacuum_system]
  • [pneumatic_system]
  • [pitot_static]
  • [LIGHTS]
  • [EFFECTS]
  • [exits]
  • [autopilot]
  • [forcefeedback]
  • [stall_warning]
  • [deice_system]

The Airplanes folder.

This is the first screen that opens when you start P3D4. This screen contains the 4 main file parts to create a “scenario”. Here you choose the aircraft, the airport / location, determine the weather and season settings and time of day. Once you want to choose another vehicle with [Change Vehicle …], the screen changes with an overview of the currently loaded vehicles and with 5 columns indicating:
• VEHICLE TITLE
• VEHICLE TYPE
• PUBLISHER
• MANUFACTURER
• FAVORITE
You can group the summary or sort the columns by pressing the header.

Make it easy for you to mark the airplanes that fly the best with a yellow star in the FAVORITE column and then highlight Show Only Favorites.

The [Hide Details] button hides or shows the
• DESCRIPTION,
• AIR TRAFFIC CONTROL and
• PERFORMANCE

This data is derived from the aircraft.cfg file that is present in any folder of an aircraft. In the first scenario screen, change to VEHICLE TITLE Beech Baron 58 Paint1
Then open the folder of this default aircraft: F: \ P3D4 \ SimObjects \ Airplanes \ beech_baron_58
Note: The disk name F: \ and the folder name P3D4 may be different.


Base data of an aircraft.

Open the folder of the chosen aircraft. The basic data of an aircraft are in the aircraft.cfg
Line 1: Each individual model has a section beginning with [fltsim.n], where .n represents the model number that is defined by a figure.
Line 2: Each model has a “title”. The content of the text “title =” must be unique, otherwise the model will not be displayed.
Line 3: Specifies the filename of the “.air” file of the aircraft.
Line 4.5, 6 and 7: Any variation on the model, panel, sound or texture indicated by the aircraft under [fltsim.n] can be found in the folder structure, for example, tetxture.g1000 at [fltsim.3].
Line 8 and 9 refer to the contents of the htm file. This information is read in the kneeboard.
Line 10: is the default Tail Number; (can be overwritten)

Line 11: ui_manufacturer is an indentification of the “manufacturer”
Line 12: ui_type is an indication of the type of aircraft. It is better to make a selection criterion here as Single Prop, Twin Engine Prop, Twin Engine Jet, etc.
Line 13: ui_variation gives a color indication or otherwise
Line 14: ui_typerole (as mentioned in 12; does not appear in overview)
Line 15: ui_createdby = “Lockheed Martin” is the Publisher
Line 16: description = “With … is informative text
This sequence repeats itself for each model in this aircraft.cfg

Rule 110: performance = “Cruise … is informative text
The information under AIR TRAFFIC CONTROL is per [fltsim.n] in the state.cfg file in C: \ Usersname \ AppData \ Roaming \ Lockheed Martin \ Prepar3D v4 \ SimObjects \ aircraft name.


How to add a new texture.

To add a new texture folder to an existing aircraft, this is how you do it:

  1. Make a backup of the entire folder of the aircraft you are going to handle.
  2. Add the new texture folder to the aircraft folder and rename it with a umber or name.
  3. The folder name should differ from other texture.n folder names.
  4. Open the aircraft.cfg with Notepad ++ and scroll to the line in the file where the [General] section begins.
  5. Enter an entry above this line to create an additional blank line.
  6. Often, a [fltsim.n] section of text file is supplied in a new texture download.
  7. Cut and paste the new [fltsim.n] text here.
  8. Change [fltsim.n] to [fltsim.number= highest number +1].
  9. Enter the line texture = the number of the new texture folder name (texture.name or texture.number).
  10. Make an empty line before and after each [fltsim.n] section.
  11. Save the file, start sim and check.

  • SAMPLE
  • [fltsim.3]
  • title=Beech Baron 58 w G1000 << unique title
  • sim=Beech_Baron_58 << same .air file in use
  • model=g1000 << using another model folder model.g1000
  • panel=g1000 << using another panel folder panel.g1000
  • sound= << using the default sound folder
  • texture=g1000 << using another texture.g1000 folder
  • kb_checklists=Beech_Baron_58_check
  • kb_reference=Beech_Baron_58_ref
  • atc_id=N71FS
  • ui_manufacturer=”Beechcraft”
  • ui_type=”Baron 58 G1000″
  • ui_variation=”Glass Cockpit”
  • ui_typerole=”Twin Engine Prop”
  • ui_createdby=”Lockheed Martin”
  • description=”With the ……

Including clues or excluding line statements

You can include textual clues in cfg files without being read as an instruction. Use two forward slashes or a semicolon. Example:
[WEIGHT_AND_BALANCE]
max_gross_weight = 5524 // (pounds)
; Moments of Inertia


About model, panels, sound, soundai and texture.

Each aircraft has a folder containing one or more sub folders model, panel, sound, soundai and texture.  In each sub folder like: model, model.name, panel, panel.name, sound, soundai, texture or texture.name, there are files including a .cfg file or there is no contents except only a .cfg file.

The instruction in a cfg file indicates what needs to be done to show (or hear) the model, panel, sound, or texture when no executable files are present in sub folders.  If for some reason, we cannot read information, a fallback to another existing location is foreseen.

If there are any executable files, then the corresponding cfg file contains the instructions that these files serve for.  An example of a reference for a soundai.cfg for Commercial airliner is shown next to it. Here we use the soundai files of a CRJ700 for the Commercial airliner aircraft as an alias.

In model.cfg:
[models]
normal = Beech_Baron_58.mdl
interior = Beech_Baron_58_interior.mdl

In texture.cfg
[fltsim]
fallback.1 = .. \ texture
fallback.2 = .. \ .. \ .. \ .. \ Scenery \ Global \ Texture
fallback.3 = .. \ .. \ .. \ .. \ .. \ .. \ Scenery \ Global \ Texture
fallback.4 = .. \ .. \ .. \ .. \ .. \ .. \ Content \ Scenery \ Global \ Texture

In a sound.cfg
[fltsim]
alias = beech_baron_58 \ sound \

// Date: 170924-Airplanes explained-Version 1

Next Version: t.b.d.