Format aircraft.cfg functionality

Essential flight simulator tools, by Martin Gossmann
http://www.owlsnest.eu
Post Reply
User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Format aircraft.cfg functionality

Post 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
Attachments
Aircraft.cfg
(19.95 KiB) Downloaded 25 times
Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

User avatar
hschuit
MAIW Conversion Team
MAIW Conversion Team
Posts: 427
Joined: 20 Jul 2011, 07:25
Version: P3D
Location: Near EHSB

Re: Format aircraft.cfg functionality

Post by hschuit »

How do you calculate the amount of spaces preceding the comments? There are more spaces inserted than needed I think.

Henk.

User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Format aircraft.cfg functionality

Post by gsnde »

That is a value that you can define yourself in the settings, Henk.

From mobile hence short

Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

User avatar
hschuit
MAIW Conversion Team
MAIW Conversion Team
Posts: 427
Joined: 20 Jul 2011, 07:25
Version: P3D
Location: Near EHSB

Re: Format aircraft.cfg functionality

Post 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)

User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Format aircraft.cfg functionality

Post 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).
Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Format aircraft.cfg functionality

Post 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)
Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

User avatar
petebramley
MAIW Developer
MAIW Developer
Posts: 1280
Joined: 17 Jun 2007, 16:05
Version: P3D
Location: EGBG

Re: Format aircraft.cfg functionality

Post 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 ?
Pete B
Retired and busier than ever !!

User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Format aircraft.cfg functionality

Post 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.
Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

User avatar
bvanhout
MAIW Developer
MAIW Developer
Posts: 156
Joined: 11 Dec 2015, 18:38
Version: P3D
Location: KVLD

Re: Format aircraft.cfg functionality

Post 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

User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Format aircraft.cfg functionality

Post 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
Attachments
AIAE-DeleteKeys.jpg
Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

User avatar
gsnde
MAIW Staff
MAIW Staff
Posts: 3574
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Format aircraft.cfg functionality

Post 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.
Attachments
aiae_sortkeys1.jpg
Cheers,
Martin
________________________________________
ImageThe Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference

Post Reply