Military AI Works • Format aircraft.cfg functionality
Page 1 of 1

Format aircraft.cfg functionality

Posted: 25 Sep 2019, 20:37
by gsnde
This is an example of an aircraft.cfg formatted by AIAE.

The cleanup consists of:
  • aligning comments
  • reduces multiple empty lines to one empty line
  • adding missing empty line before sections

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 06:45
by hschuit
How do you calculate the amount of spaces preceding the comments? There are more spaces inserted than needed I think.

Henk.

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 06:58
by gsnde
That is a value that you can define yourself in the settings, Henk.

From mobile hence short


Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 07:15
by hschuit
Martin, thanks. Can you also handle multiple // instances in one line? Here is an example from the SBAI MiG-31 :

full_flaps_stall_speed=106.0 //159.0 //Knots True (KTAS)

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 08:03
by gsnde
Not sure what happens then :smt001

Have you tried? I will need to think about that situation. My guess is it will be treated just as part of the comment (hopefully).

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 08:19
by gsnde
It removes the second comment delimiter (which I think is the right thing to do) and leaves some rogue spaces (which I will try to eleminate in one of the next updates)

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 10:17
by petebramley
Where can I see what order the "Sort flightsim sections" command uses. And can I set it to the order that I prefer ?

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 10:44
by gsnde
Hi Pete.

You can see that nowhere but here... :smt002

It is not configurable. I sorted the keys when writing that piece of code to my liking (what I though would make sense).
Taking your question seriously, I just looked up in the P3D SDK what keys are valid for a [flightsim] section.

For this test I did add all possible keys and then sorted it from AIAE. This is the result.

Code: Select all

[fltsim.0]
title=MAIW_AIG_AI_PC12/45_USAF_318_01-0415
model=blended_winglet P3D
texture=USAF_318_01-0415
sim=AIG_PC12
prop_anim_ratio=-0.6
atc_parking_types=MIL_COMBAT
atc_parking_codes=PC12
atc_model=Test
atc_id=12345
atc_airline=USAF
atc_flight_number=12345
atc_heavy=0
ui_createdby=MAIW & AIG
ui_typerole=Military AI
ui_manufacturer=Pilatus
ui_type=PC-12/U-28A
ui_variation=USAF - 318th SOS, 27th SOW, Cannon AFB, New Mexico. 01-0415. (N415PB)
description=Repaint by Graham King
visual_damage=Test
sound=Test
panel=Test
ExternalSecondarySimVarCount.0=Test
kb_checklists=Test
ExternalSecondarySimData.0=Test
ExternalSecondarySimID.0=Test
kb_reference=Test
atc_id_color=Test
ExternalSecondarySimModule.0=Test
Until the key description things are according to what I envisioned, with the exception of atc_id_color which should have sorted with the other atc keys and which I will correct in the next release.

The remaining keys would look much nicer if sorted alphabetically:

Code: Select all

ExternalSecondarySimData.0=Test
ExternalSecondarySimID.0=Test
ExternalSecondarySimModule.0=Test
ExternalSecondarySimVarCount.0=Test
kb_checklists=Test
kb_reference=Test
panel=Test
sound=Test
visual_damage=Test
Everything else (misspelled or wrong keys or comments are added to the end of the section.

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 14:02
by bvanhout
My 2c worth......

If credits are given in the first few lines under the banner:

//**********************************PLEASE DO NOT REMOVE***********************************

Why is it necessary to clutter the individual entries of the .cfg with things like:

description=
ui_createdby=
ui_typerole=
etc

I would suggest keeping only info that is essential to the aircraft.cfg in the individual entries.

Brian

Re: Format aircraft.cfg functionality

Posted: 26 Sep 2019, 15:41
by gsnde
Several reasons. We want to make it really obvious that we credit each painter for each paint. All our conversion packs therefore have the "Repaint by xxx" in the description field.

The other ui_variables are filled with the aircraft information and the modeler details.

But AIAE has the ability to define which keys one consider as essential. That is in the delete keys section. So you can remove all what you consider as clutter with a literally four click operation easily:


1. Click Menu Tools
2. Click Delete Keys
3. Click Select All
4. Click Delete Keys

Re: Format aircraft.cfg functionality

Posted: 28 Sep 2019, 12:44
by gsnde
With the new AIAE release coming today the key sort order is configurable. You do this in menu 'Settings' --> 'Key sort order..'

On calling the dialog the first time you see the order as I define it as default. Now you can rearrange these keys in the listbox with drag & drop. Click save and your sort order is stored.

The next key sort (Menu 'Tools' --> 'Sort [fltsim.x] sections..' or via right-click menu on the fltsim grid) will be done according to your order definition.

As with all settings - if AIAE crashes, all program settings are reset to default values, so this is true for your sort order as well.