plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!


tml avatar image
tml asked DA40CGDFQ answered

Exact .cfg file format? Could we have line continuations, please?

Although "everybody knows" the syntax of .cfg files (they are good old .ini files), the devil is in the details. There are multiple variants of the .ini format. Just read the Varying features section on the Wikipedia page. Could we please have an exact specification of the format as used by MSFS? (Or is the plan to switch to JSON soon anyway?)

Apparently there is no line continuation possibility. Having a such feature in the file format would be very nice. Just think how much easier it would be to edit this:

mach_hi_corrected_commanded_ne_table = \
     0.90   :   1.0 :  22.57,\
     0.00   :  62.0 :  82.50,\
     0.42   :  77.0 :  95.40,\
     0.51   :  80.2 :  98.50,\
     0.61   :  84.8 : 101.10,\
     0.70   :  89.1 : 103.10,\
     0.79   :  92.2 : 105.70,\
     0.93   :  96.0 : 108.06,\
     1.00   :  98.2 : 108.06

than this:

mach_hi_corrected_commanded_ne_table = 0.90:1.0:22.57,0.00:62.0:82.50,0.42:77.0:95.40,0.51:80.2:98.50,0.61:84.8:101.10,0.70:89.1:103.10,0.79:92.2:105.70,0.93:96.0:108.06,1.00:98.2:108.06

Don't you think? (This is just the table in question from some existing aircraft, slightly edited to have less pointlessly precise values.)

Sure, with unlimited resources the simulator's Dev Mode would have a graphical tool to manipulate actual underlying curves, instead of you having to tinker with numerical tables intended to describe such curves, but I am not holding my breath.

Also, any developer with some scripting experience will eventually get bored and come up with some workflow where the .cfg files they write are passed through some suitable preprocessor or filter, and that then enables them to write tables like that on multiple lines with nicely aligned columns.

Personally I use the venerable m4 macro processor for this at the moment. (Using a full-fledged macro processor has the additional benefit that you can use macros for instance to turn measurements in inches or metric units, taken from an aircraft's specifications or drawings, into the feet that MSFS wants.) But it is a bit sad that all serious aircraft developers need to duplicate the effort.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Nocturne avatar image
Nocturne answered Cammac commented

At the moment we don't want to say what the specific specification for the CFG file format is, as we are currently planning on reworking it to make it a bit more "user friendly", so anything published will then be subject to change. Once this rework has been implemented and tested, we will add the specification details into the documentation.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

DA40CGDFQ avatar image
DA40CGDFQ answered

Is there any progress on this "feature" request? Now that the table sizes for most cfg parameters are large ie > 7 now 13, 14 and possible 45 it would be nice to have a continuation character.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.