## *.cfg FILES

*.cfg files are configuration files that end in "cfg". You can find examples of these whiles in most packages, for example in aircraft you have the Aircraft Configuration File and for cameras you have the Camera Configuration File.

When looking at a *.cfg file, you'll see that it's comprised of one or more [section]s, and within each [section] you can define one or more parameters. Sections start with the [section] header and end when a new [section] header is reached, or when the end of the document is reached. The parameters within a section will always be formatted in the same way:

<parameter_name> = <parameter_value>

Below is an exert from the aircraft.cfg file so you can get an idea of this basic structure:

[VERSION]
major = 1
minor = 0
[GENERAL]
atc_type = "MyManufacturer"
atc_model = "Simple"
Category =  "airplane"
performance = ""


Also note that the file should be saved using a specific encoding as explained here:

### Data Types

Each parameter within a *.cfg file can hold one or more values depending on the type of parameter it is. Below we list the available data-types for you to use in a parameter definition along with examples of each one:

• ##### Single
A single value ( float, integer, string)
atc_type = Cessna
htail_area = 39.0000
wing_winglets_flag = 1

• ##### 1D table
A list of values, sometimes of different nature (string, then a float, then an integer, etc...)
point.7 = 2, -42.000, 0.000, 10.000, 1800, 0, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 7
station_load.13 = 50, -24.600, 0.000, -5.000, Cargo Pod, 4
reference_datum_position = 16.200, 0.000, 0.000


• ##### 2D table
A list of (x,y) coupled values, that typically describe a 1D curve (y=f(x))
lift_coef_aoa_table = -3.142000:0.000000, -2.356000:0.500000, -1.571000:0.000000, -0.334000:-1.078000, -0.072000:0.000000, 0.000000:0.358000, 0.227000:1.478000, 0.262000:1.540000, 0.297000:1.478000, 0.332000:1.078000, 1.571000:0.000000, 2.356000:-0.500000, 3.142000:0.000000
engine_mechanical_efficiency_table =  0.0:0.77, 700.0:0.77, 2000.0:0.67, 2200.0:0.54, 2700.0:0.54

• ##### nD table
A list of (x1:x2:x3,...,xn:i) values, used - for example - for engines and propeller abaqus in the aircraft.cfg.
prop_efficiency_table = 0.0:0.00:0.20:0.40:0.60:0.80:1.00:1.20:1.40:1.60:1.80:2.00:2.20, 15.0:0.15:0.40:0.71:0.86:0.72:0.50:0.34:0.23:0.15:0.11:0.08:0.06, 20.0:0.10:0.30:0.67:0.81:0.80:0.74:0.55:0.42:0.30:0.19:0.12:0.09, 25.0:0.08:0.23:0.49:0.72:0.82:0.87:0.82:0.60:0.41:0.28:0.18:0.13
n2_to_n1_table = 0.000000:0.000000:0.900000, 0.000000:0.000000:0.000000, 10.000000:2.000000:9.200000, 20.000000:7.000000:14.600000, 30.000000:10.200000:20.000000, 40.000000:15.100000:24.700001, 50.000000:20.100000:32.000000, 60.000000:28.000000:41.799999, 70.000000:38.000000:53.200001, 80.000000:52.000000:67.500000, 90.000000:70.000000:80.800003, 100.000000:89.400002:100.800003, 110.000000:112.000000:120.000000

• ##### Hash Map
A map of key:value pairs separated by a # symbol, where the value can be anything (float, string, a 1D table, etc...). This is used in various places like the flight_model.cfg for the [FUEL_SYSTEM] or the systems.cfg. Below is an example of a [LIGHT] definition from the systems.cfg file:

lightdef.26 = Type:12#Index:1#LocalPosition:-1.1,-0.65,14#LocalRotation:-10,0,0#EffectFile:LIGHT_ASOBO_GlareshieldShort#PotentiometerIndex:0

### Lists In *.cfg Files

You can only ever have a single parameter definition at a time within a *.cfg file, so if you need to create a parameter list, you'd append a number to the parameter name, like this (from the texture.cfg file):

[fltsim]
fallback.1 = scenery\texture
fallback.2 = Asobo_AirRace\texture

In this way, it's still a single parameter per line, but we've told Microsoft Flight Simulator that both parameters pertain to a list with multiple values.

Section headers can also be lists and follow the same structure, for example (from the aircraft.cfg file):

[FLTSIM.1]
Title="Long-EZ Sundancer"
Model=""
Panel=""
...
[FLTSIM.2]
Title="Long-EZ Thunderbirds"
Model=""
Panel=""
...
[FLTSIM.3]
Title="Long-EZ White With Blue Stripes"
Model=""
Panel=""
...

It's often useful to have comments within a *.cfg file to tell you what something is for, or maybe to remind you to edit it later or whatever. Comments can easily be added into a *.cfg file using a semi-colon ";". For example:

;===================== WORLD =====================
[SERVICES]
FUELTRUCK = 0
CATERING_TRUCK = 0
[EFFECTS]
touchdown = fx_tchdwn_s, 1