attached_objects.cfg

The Attached_Objects.cfg File Tab In The SimObject Editor

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:

attachment = "SimObjects/Airplanes/C208B/attachments/asobo/Airframe/model/airframe.xml"

If this parameter is used, then you do not need the attachment_root or attachment_file parameters.

String No
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 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.

The SimAttachment Explorer Window

String No
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 parameter to define the full path and file to use for the SimAttachment being selected.

String No
attach_to_model

This parameter defines which model the SimAttachment is to be attached to. Can only be one of the following:

  1. "interior"
  2. "exterior"
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 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.

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:

texture = "red"

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:

behavior_parameter.0 = "GEAR_NAME,'LeftWingWheel'_m"
behavior_parameter.1 = "OBSERVATION_TT_TITLE,LEFT_TIRE"
behavior_parameter.2 = "WHEEL_PART_ID,WING_LEFT_WHEEL"

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 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:

  • The parameter name
  • The parameter value

For example:

// ATTACHED OBJECTS CFG
vcockpit_parameter.0 = "VCockpit01_htmlgauge00_file, NavSystems/WTG1000/PFD/WTG1000_PFD.html"
// PANEL CFG
htmlgauge00 = [VCockpit01_htmlgauge00_file], 0, 0, 1024, 768

Note that this list registers the parameters in the same list as the vpainting_parameter.N, and if there are two parameters the same in the list, then the VCockpit one will be used.

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 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:

  • The parameter name
  • The parameter value

For example:

// ATTACHED OBJECTS CFG
vpainting_parameter.0 = "VPainting01_painting00_params, ?font_color = #F5F5F5"
// PANEL CFG
painting00 = Registration/Registration.html?[VPainting01_painting00_params], 0, 0, 256, 64

Note that this list registers the parameters in the same list as the vcockpit_parameter.N, and if there are two parameters the same in the list, then the VCockpit one will be used.

String/Float No
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 for more information.

String No