# CFG Files General Information There are multiple [configuration (CFG) files](../../devmode/editors/project-editor/file-formats/cfg-files/) which are used by various types of modular SimObject within Microsoft Flight Simulator 2024. Depending on the SimObject being created, some of these files will be *optional* and others will be *mandatory*. The list below shows **all** the available CFG files, irrespective of the kind of SimObject that is using them. To know which files any particular SimObject should use, please see the page for that specific object.   - [ai.cfg](ai.cfg/) - [aircraft.cfg](aircraft.cfg/) - [attached\_objects.cfg](attached_objects.cfg/) - [attachment.cfg](attachment.cfg/) - [cameras.cfg](cameras.cfg/) - [cockpit.cfg](cockpit.cfg/) - [effects.cfg](effects.cfg/) - [engines.cfg](engines.cfg/) - [flight\_model.cfg](flight_model.cfg/) - [flight\_performance.cfg](flight_performance.cfg/) - [gameplay.cfg](gameplay-cfg/) - [livery.cfg](livery.cfg/) - [model.cfg](../models/model.cfg/) - [navigation\_graph.cfg](navigation_graph.cfg/) - [panel.cfg](panel.cfg/) - [reference\_points.cfg](reference_points.cfg/) - [sim.cfg](sim.cfg/) - [systems.cfg](systems.cfg/) - [texture.cfg](../textures/texture.cfg/)   How these files are used and where they should be placed within the package is outlined in the following section: - [Modular SimObjects](../modular-simobjects/modular-simobjects/) {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} These pages show the parameters as written to the various CFG files required for the different SimObjects. However, you should not be editing these files by hand and should instead be using the [The SimObject Editor](../../devmode/editors/simobject-editor/the-simobject-editor/) to generate the files and ensure that the package structure is correct. {{< /callout >}}     ### General Sections And Parameters In addition to the sections and parameters listed on the file pages above, all CFG files can have the sections and parameters listed below.     #### [Version] The `[Version]` section provides version information for the configuration file and it should be added to *all* CFG files. In Microsoft Flight Simulator 2024, major versions should *always* be at least equal to 1.   Note that this section information is **mandatory** and should always be included.   {{< table-wrapper >}} | Parameter | Description | Type | Required | |---------------------------------|---------------------------------------------------------------|---------|:--------:| | `major` | Major CFG file version number, values must be greater than 0. | Integer | Yes | | `minor` | Minor CFG file version number, values must be greater than 0. | Integer | Yes | {{< /table-wrapper >}}     #### [MODULAR_MERGE] The `[MODULAR_MERGE]` section is an optional section that can be added to almost all CFG files found in the **Config** folder of [Presets](../modular-simobjects/modular-simobject-project-structure/#presets) (and *only* in Presets), except for the `attached_objects.cfg`. This section can contain the following parameters:   Parameter Description Type Required `auto` When set to TRUE (1) this tells the package builder that the CFG file should be auto merged. When set to FALSE (0), then an additional step will be taken in the merge process to merge specific parameters only, based on the `AttachmentRebind#` suffix. Default value is TRUE (1). Boolean No   Note that in general, this section will only be included when the aircraft editor adds it because the file itself does not exist, or when you wish to override specific parameters from different attachments.   For more information on the way merging will work when set to auto-merge or manual-merge, please see the following page: - [Modular Aircraft Merging](../modular-simobjects/modular-simobject-merging/)     #### [DynamicParameters] The `[DynamicParameters]` section is an optional section that can be added to *all* mergeable CFG files (*except* the [`attached_objects.cfg`](attached_objects.cfg/) but *including* the [`panel.cfg`](panel.cfg/)) in the [Attachments](../modular-simobjects/modular-simobject-project-structure/#attachments) folders. This section can contain the following parameters:   Parameter Description Type Required `param.N` This is a string that will be substituted into a parameter. This string is a comma separated list of items which *always* starts with the parameter identifier, and then 1 or more values that will be used wherever the parameter is used. For example: param.0 = "aircraft\_weight,2550" In the appropriate CFG section you then reference the dynamic parameter like so: max\_gross\_weight = \[aircraft\_weight\] The dynamic parameter can then be modified in the `attached_objects.cfg` file using the `cfg_parameter.N` parameter to set a different value to the attachment base depending on the SimAttachment being referenced: \[SIM\_ATTACHMENT.0\] cfg\_parameter.0 = "aircraft\_weight,2825" In this way you can dynamically alter the value of a parameter depending on the attachment. String No   For more information on the way merging dynamic parameters works, please see the following section: - [Modular SimObject Merging](../modular-simobjects/modular-simobject-merging/)     ### 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`) ``` codeblock atc_type = Cessna htail_area = 39.0000 wing_winglets_flag = 1 ```   - ##### List A list of values, sometimes of mixed types (`string`, then a `float`, then an `integer`, etc...) ``` codeblock 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 ```   - ##### 1D Curve A list of (`x,y`) coupled values, that typically describe a 1D curve with linear interpolation \(y = f(x)\). ``` codeblock 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 ```   - ##### 2D Table A list of (`x1:y1:z1,...,xn:yn:zn`) values, used to generate a 2D table with bi-linear interpolation \( z = f(x,y)\). **NOTE**: This type of table - while still used in Microsoft Flight Simulator 2024 - is only used for some parameters from previous versions of the simulation. The more modern version shown below is the format used by all new parameters. ``` codeblock 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 ```   - ##### *n*D Table This is a modular table format where column *header* parameters are defined first - with each set of parameter values being separated by a colon `:` - and these are then separated from the table *contents* using two colons `::`. An example would be the `CL_table_by_AoA` parameter in the [`flight_performance.cfg`](flight_performance.cfg/): ``` codeblock CL_table_by_AoA = -5.0, 0.0, 5.0, 10.0, 15.0, 20.0, 25.0 :: -0.22777, 0.29988, 0.75617, 1.08905, 1.28149, 1.34411, 1.40615 ``` To better understand this format, here are three generic examples with a visualisation of the table in a more "human readable" format, which uses additional colours to more clearly separate the elements:   - **1D Table** ``` codeblock Table_1D = 0, 0.3, 0.6, 0.8, 1 :: 60, 70, 80, 90, 100 ``` {{< image-center src="images/5_Content_Config/CFGs/cfg_1_table_1d.png" alt="1D Table Example" >}} - **2D Table** ``` codeblock Table_2D = 0.1, 0.4, 0.6 : 0, 0.3, 0.6, 0.8, 1 :: 60, 70, 80, 90, 100 : 58, 68, 78, 88, 98 : 56, 66, 76, 86, 96 ``` {{< image-center src="images/5_Content_Config/CFGs/cfg_2_table_2d.png" alt="2D Table Example" >}} - **3D Table** ``` codeblock Table_3D = 5, 10 : 0.1, 0.4, 0.6 : 0, 0.3, 0.6, 0.8, 1 :: 60, 70, 80, 90, 100 : 58, 68, 78, 88, 98 : 56, 66, 76, 86, 96 : 35, 40, 45, 50, 55 : 34, 39, 44, 49, 54 : 33, 38, 43, 48, 53 ``` {{< image-center src="images/5_Content_Config/CFGs/cfg_3_table_3d.png" alt="3D Table Example" >}}   - ##### Hash Map A map of `key:value` pairs separated by a `#` symbol, where the value can be anything (float, string, a list, etc...). This is used in various places like the [`flight_model.cfg`](flight_model.cfg/) for the `[FUEL_SYSTEM]` or the [`systems.cfg`](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     ### Parameter And Section Lists 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 should append a number to the parameter name, like this (from the [`texture.cfg`](../textures/texture.cfg/) file): ``` codeblock [fltsim] fallback.1 = scenery\texture fallback.2 = Asobo_AirRace\texture ``` In this way, it's still a single parameter per line, but Microsoft Flight Simulator 2024 understands 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`](aircraft.cfg/) file): ``` codeblock [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="" ... ```     ### Comments 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: ``` codeblock ;===================== WORLD ===================== [SERVICES] FUELTRUCK = 0 BAGGAGE_LOADER = 0 CATERING_TRUCK = 0 ``` Here the comment is used to denote that the sections following it are all related to the world. Note that comments do not have to be on a new line, and can be added anywhere, as long as they are preceded with the semi-colon: ``` codeblock [EFFECTS] wake = fx_wake, 0 ;default value - CHANGE! water = fx_spray, 0 ;default value - CHANGE! dirt = fx_tchdrt, 0 ;default value - CHANGE! concrete = fx_sparks, 0 ;default value - CHANGE! touchdown = fx_tchdwn_s, 1 ``` In the above example, comments have been added to 4 lines to remind the user that the marked lines are default values and should be changed.