attached_objects.cfg
The attached_objects.cfg
file is an aircraft file that is used in the Attachments and Presets Config folders for a modular aircraft. The file is used to link one or more attached objects to an aircraft. 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.
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 |
[MERGE_MODEL.N]
The [MERGE_MODEL.N]
section is used to specify the details of any glTF files that you want to attach to the modular SimObject. This will take the model data from the glTF 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:
Parameter | Description | Type | Required |
---|---|---|---|
merge_file |
This gives the full VFS path to the glTF file to merge. | String | Yes |
merge_to_model |
Here you specify the alias of the instance to attach the model to. Note that if the attached_object.cfg file calling this parameter is in an attachment, then this parameter can be omitted (it will be ignored if included). If the attached_object.cfg belongs to a common object or an object preset, then it must be included as the target model instance is ambiguous. |
String | Yes |
[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:
Parameter | Description | Type | Required |
---|---|---|---|
attachment |
The full path to the model XML file, starting with the SimAttachment folder root. For example:
If this parameter is used, then you do not need the |
String | No |
attachment_root |
This is the SimAttachment folder root path, without the XML file. For example:
This parameter should be used in conjunction with the |
String | No |
attachment_file |
This is the SimAttachment XML file, without the path. For example:
This parameter should be used in conjunction with the |
String | No |
attach_to_model |
This parameter defines which model the SimAttachment is to be attached to. Can only be one of the following:
|
String | Yes |
attach_to_model_minsize |
The SimAttachment will be attached to LODs that have a minSize of at least this value Default value is 10. |
Float | No |
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 |
attach_offset |
if the 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 |
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. Default value is 0, 0, 0. |
List of 3 Floats |
No |
attach_scale |
This is used to scale the SimAttachment model when attached. Default value is 1. |
Float | No |
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:
Default value is "". |
String | No |
always_execute_associate_js |
When set to 1 (TRUE), this will force the SimAttachment to run any JS used by the attachment when it is hidden in the simulation. Default value is 0 (FALSE). |
Boolean | No |
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 |
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 | String | Yes |
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:
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 |
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
For example:
Note that this list registers the parameters in the same list as the |
String/Float | No |
vpainting_parameter.N |
This parameter can be used to create a list of dynamic parameters which will override any value of the
For example:
Note that this list registers the parameters in the same list as the |
String/Float | No |
cfg_parameter.N |
This is a string that will be substituted into a parameter, overwriting the
See the section on Merging CFG Dynamic Parameters for more information. |
String | No |