# attached_objects.cfg {{< image-center src="images/2_DevMode/simobject_editor/cfg/cfg_tab_11_attachedobjects.png" alt="The Attached_Objects.cfg File Tab In The SimObject Editor" >}} The `attached_objects.cfg` is an *optional* file for all *modular* SimObjects, but should never be used for non-modular SimObjects. This file is used in the [Attachments](../../modular-simobjects/modular-simobject-project-structure/#attachments) and [Presets](../../modular-simobjects/modular-simobject-project-structure/#presets) Config folders for a modular SimObject and is used to link one or more attached objects to the object. Below you can find information on the different sections used in the `attached_objects.cfg` file as well as what parameters and values are expected within them. ### [Version] The `[Version]` section provides version information for the configuration file. 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 "300px" "" "100px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="major" />}}`major` | Major CFG file version number, values must be greater than 0. | Integer | Yes | | {{< anchor id="minor" />}}`minor` | Minor CFG file version number, values must be greater than 0. | Integer | Yes | {{< /table-wrapper >}} ### [MERGE_MODEL.*N*] The `[MERGE_MODEL.N]` section is used to specify the details of any {{< glossterm >}}gltf{{< /glossterm >}} files that you want to attach to the modular SimObject. This will take the model data from the {{< glossterm >}}gltf{{< /glossterm >}} file that you specify and "merge" them with the model of the SimObject that has the `attached_objects.cfg` file. You can have multiple merge model sections, and they should be incrementally indexed, starting from 0. Within each `MERGE_MODEL.N` section, you can use the following parameters: {{< table-wrapper "300px" "" "100px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="merge_file" />}}`merge_file` | This gives the full {{< glossterm >}}vfs{{< /glossterm >}} path to the {{< glossterm >}}gltf{{< /glossterm >}} file to merge. | String | Yes | | {{< anchor id="merge_to_model" />}}`merge_to_model` | Here you specify which part of the model is being merged into, either:{{< params/smallfont-list >}} - "interior" - "exterior"{{< /params/smallfont-list >}}Note that if the `attached_objects.cfg` file calling this parameter is in an *attachment*, then this parameter can be omitted (it will be ignored if included). If the `attached_objects.cfg` belongs to a *common* object or an object *preset*, then it must be included as the target model instance is ambiguous. | String | Yes | {{< /table-wrapper >}} ### [SIM_ATTACHMENT.*N*] The `[SIM_ATTACHMENT.N]` section is used to specify the details of a single attached object. You can have multiple SimAttachment sections, and they should be incrementally indexed, starting from 0. Within each `SIM_ATTACHMENT.N` section, you can use the following parameters: {{< table-wrapper "300px" "" "100px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="attachment" />}}`attachment` | The full path to the model XML file, starting with the SimAttachment folder *root*. For example:`attachment = "SimObjects/Airplanes/C208B/attachments/asobo/Airframe/model/airframe.xml"`If this parameter is used, then you do not need the [`attachment_root`](../#attachment_root) or [`attachment_file`](../#attachment_file) parameters. | String | No | | {{< anchor id="attachment_root" />}}`attachment_root` | This is the SimAttachment folder *root* path, *without* the XML file. For example:`attachment_root = "SimObjects/Airplanes/C208B/attachments/asobo/Airframe/"`This parameter should be used in conjunction with the [`attachment_file`](../#attachment_file) parameter to define the full path and file to use for the SimAttachment being selected. Clicking this will open the SimAttachment Explorer where you can select the attachment to use, either from the package itself or from a list of [Included Attachments](../../modular-simobjects/simattachments/included-attachments/included-attachments/).![The SimAttachment Explorer Window](images/2_DevMode/simobject_editor/cfg/cfg_tab_11_attachmentexplorer.png) | String | No | | {{< anchor id="attachment_file" />}}`attachment_file` | This is the SimAttachment XML file, *without* the path. For example:`attachment_file = "model/airframe.xml"`This parameter should be used in conjunction with the [`attachment_root`](../#attachment_root) parameter to define the full path and file to use for the SimAttachment being selected. | String | No | | {{< anchor id="attachment_guid" />}}`attachment_guid` | This is the {{< glossterm >}}GUID{{< /glossterm >}} of the model to attach, as defined in the guid attribute of the `` element in the model XML file. For example:`attachment_guid = "{0ed766ea-84b2-44eb-8655-22cbd4a79a9f}"`Note that if this is supplied then there should be no `attachment_root` nor `attachment_file` definition, and if those *are* supplied then they take precedence over this parameter. | String | No | | {{< anchor id="attach_to_model" />}}`attach_to_model` | This parameter defines which model the SimAttachment is to be attached to. Can only be one of the following:{{< params/smallfont-list >}} - "interior" - "exterior"{{< /params/smallfont-list >}} | String | Yes | | {{< anchor id="attach_to_model_minsize" />}}`attach_to_model_minsize` | The SimAttachment will be attached to {{< glossterm >}}LOD{{< /glossterm >}}s that have a minSize of at least this value.Default value is 10. | Float | No | | {{< anchor id="attach_to_node" />}}`attach_to_node` | This optional parameter is used to give a name of a model node to attach the SimAttachment to.Default value is = "". | String | No | | {{< anchor id="attach_offset" />}}`attach_offset` | if the [`attach_to_node`](../#attach_to_node) parameter has been defined, then this will add an offset relative to the node. If that parameter has not been defined, then this will be an offset relative to the Datum Reference Point. Note that this can be edited directly in the simulation when Live Edition is enabled.The parameter requires 3 values for the X, Y and Z axis offsets (in meters) from the node/datum position.Default value is 0, 0, 0. | List of 3 Floats | No | | {{< anchor id="attach_pbh" />}}`attach_pbh` | This parameter sets the angle of the SimAttachment. It requires 3 values for the pitch, bank, and heading, and all values are in degrees. Note that this can be edited directly in the simulation when Live Edition is enabled.Default value is 0, 0, 0. | List of 3 Floats | No | | {{< anchor id="attach_scale" />}}`attach_scale` | This is used to scale the SimAttachment model when attached. Note that this can be edited directly in the simulation when Live Edition is enabled.Default value is 1. | Float | No | | {{< anchor id="texture" />}}`texture` | This can be used to define an additional texture folder. The text given here is the texture folder suffix. For example, if you have an additional texture folder called "texture.red", then this parameter would be as follows:`texture = "red"`Default value is "". | String | No | | {{< anchor id="alias" />}}`alias` | The alias is a unique ID string that will be used to merge configuration files and to identify a SimAttachment by *name* instead of by *index*. For more information, please see here: [Modular Aircraft Merging](../../modular-simobjects/modular-simobject-merging/) | String | Yes | | {{< anchor id="always_execute_model_behavior" />}}`always_execute_model_behavior` | When set to 1 (TRUE), this will force the SimAttachment to execute any Model Behaviour logic used by the attachment when it is *hidden* in the simulation.Default value is 0 (FALSE). | Boolean | No | | {{< anchor id="behavior_parameter.N" />}}`behavior_parameter.N` | This parameter can be used to create a list of dynamic parameters which will be available for use in the attachment model behaviors, where *N* starts at 0 and must increment by 1. For example:{{< params/smallfont-list >}}`behavior_parameter.0 = "GEAR_NAME,'LeftWingWheel'_m"``behavior_parameter.1 = "OBSERVATION_TT_TITLE,LEFT_TIRE"``behavior_parameter.2 = "WHEEL_PART_ID,WING_LEFT_WHEEL"`{{< /params/smallfont-list >}}Defined parameters will override any default value that was assigned in the behavior.**IMPORTANT!** When defining parameters here, you should **not** include spaces after the comma, since these will be considered part of the parameter definition. | String/Float | No | | {{< anchor id="vcockpit_parameter.N" />}}`vcockpit_parameter.N` | This parameter can be used to create a list of dynamic parameters which will override any value (or part of a value) used in the `gaugeNN` / `htmlgaugeNN` parameter was assigned in the `panel.cfg` file. The value for the parameter is a string, and within the string you give two pieces of data, separated by a comma:{{< params/smallfont-list >}} - The parameter name - The parameter value{{< /params/smallfont-list >}}For example:{{< params/smallfont-list >}}- for the `attached_objects.cfg``vcockpit_parameter.0 = "VCockpit01_htmlgauge00_file, NavSystems/WTG1000/PFD/WTG1000_PFD.html"`- for the `panel.cfg``htmlgauge00 = [VCockpit01_htmlgauge00_file], 0, 0, 1024, 768`{{< /params/smallfont-list >}}Note that this list registers the parameters in the same list as the [`vpainting_parameter.N`](#vpainting_parameter.N), and if there are two parameters the same in the list, then the VCockpit one will be used. | String/Float | No | | {{< anchor id="vpainting_parameter.N" />}}`vpainting_parameter.N` | This parameter can be used to create a list of dynamic parameters which will override any value of the `paintingNN` parameter assigned in the `panel.cfg` file. The value for the parameter is a string, and within the string you give two pieces of data, separated by a comma:{{< params/smallfont-list >}} - The parameter name - The parameter value{{< /params/smallfont-list >}}For example:For example:{{< params/smallfont-list >}}- for the `attached_objects.cfg``vpainting_parameter.0 = "VPainting01_painting00_params, ?font_color = #F5F5F5"`- for the `panel.cfg``painting00 = Registration/Registration.html?[VPainting01_painting00_params], 0, 0, 256, 64`{{< /params/smallfont-list >}}Note that this list registers the parameters in the same list as the [`vcockpit_parameter.N`](#vcockpit_parameter.N), and if there are two parameters the same in the list, then the VCockpit one will be used. | String/Float | No | | {{< anchor id="cfg_parameter.N" />}}`cfg_parameter.N` | This is a string that will be substituted into a parameter, overwriting the `param.N` value from the base file. This string is a comma separated list of items which always starts with the "alias" for the string, and should be counted from 0. For example:`cfg_parameter.0 = "center_wheel_position,-2.5, 0, -4.25"`See the section on [Merging CFG Dynamic Parameters](../../modular-simobjects/modular-simobject-merging/#merging-cfg-dynamic-parameters) for more information. | String | No | {{< /table-wrapper >}}