• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS "Component_ID" in behaviors XML

Messages
657
Country
us-illinois
It's been a while since I've posted here asking for advice...Hopefully all of you have been doing great.

For the last couple of days I've been trying to wrap my mind around the new "model behaviors" system in MSFS and, as usual, reading the SDK documentation has left me with more questions than answers. Yeah, yeah, I guess you can say I'm a little behind in this regard...Apparently using the deprecated or "legacy" XML format only gets you so far in MSFS before the new format needs to be invoked.

It seems that each entry in the XML is separated into <Component> sections with an "ID" property, and sometimes a "Node" property as well. From what little I understand so far, it seems as if animation entries are the only type that don't require a node to be specified, since that is assigned through the Babylon animation editor (I am using the Max plugins by the way, not Blender.) Visibility and material tags appear to require a node entry within the XML itself in order to "attach" themselves to an object.

The "ID" property on the other hand doesn't seem to be referenced at all in the 3D model or elsewhere in the XML...Is it just an arbitrary name with no purpose other than separating the XML into categories/groups? I've pasted a snippet from the DA62 yokes below as an example:

XML:
<Component ID="HANDLING_Yokes">
        <UseTemplate Name="ASOBO_HANDLING_Yoke_Template">
            <NODE_ID>HANDLING_Yoke</NODE_ID>
            <NODE_ID2>HANDLING_Yoke_2</NODE_ID2>
            <CREATE_TWO_NODES/>
        </UseTemplate>
        <Component ID="Yoke_1_Visibility" Node="HANDLING_Yoke">
            <UseTemplate Name="ASOBO_GT_Visibility_Code">
                <VISIBILITY_CODE>(L:XMLVAR_YokeHidden1) !</VISIBILITY_CODE>
            </UseTemplate>
        </Component>
        <Component ID="Yoke_2_Visibility" Node="HANDLING_Yoke_2">
            <UseTemplate Name="ASOBO_GT_Visibility_Code">
                <VISIBILITY_CODE>(L:XMLVAR_YokeHidden2) !</VISIBILITY_CODE>
            </UseTemplate>
        </Component>
        <UseTemplate Name="ASOBO_HANDLING_Push_AP_Trim_Disc_Template">
            <TYPE>Elevator</TYPE>
            <NODE_ID>yoke_left_push</NODE_ID>
            <ANIM_NAME>yoke_left_push</ANIM_NAME>
        </UseTemplate>
        <UseTemplate Name="ASOBO_HANDLING_Switch_ElevatorTrim_Template">
            <NODE_ID>yoke_left_switch_trim</NODE_ID>
            <ANIM_NAME>yoke_left_switch_trim</ANIM_NAME>
            <MOMENTARY_MIN_DURATION>0.1</MOMENTARY_MIN_DURATION>
        </UseTemplate>
        <CameraTitle>Pedestal_Fwd</CameraTitle>
    </Component>
 
Yes, Component ID seems to be completely arbitrary.

I think, in theory you could just have one Component ID and stuff everything in there. In practice I like to split parts out into logical groups. For example, all the gauges I will put into one component.

If you are using a good text editor it will allow you to fold the Component ID sections so they take up less space on screen which can make working with the XML easier.

Note: For parts that are parented to another you may need to keep their Component ID within the parent Component ID. I can't remember the exact conditions but I've had problems in the past where a mousezone was attached to an animated part I needed to have the Component for mousezone within the Component for the animated part otherwise it wouldn't work. Just something to be aware of if you ever have a child part that stops working. It might be the Component nesting (or it could be something else).
 
I believe Anthony knows Asobo XML better than anyone else here and also, Component ID can be called by other documents. For example, A gauge may be referenced in the model_interior.xml, the Panel.xml and the Panel.cfg.

It seems that each entry in the XML is separated into <Component> sections with an "ID" property, and sometimes a "Node" property as well. From what little I understand so far, it seems as if animation entries are the only type that don't require a node to be specified, since that is assigned through the Babylon animation editor (I am using the Max plugins by the way, not Blender.) Visibility and material tags appear to require a node entry within the XML itself in order to "attach" themselves to an object.
"Component" is one category of the model.xml, Behaviors, LODs, animations, PartInfo are a few others. All animations require nodes, the node can be mesh or dummy "helper" and the node might not be referred to as "node." In the example

XML:
   <PartInfo>
      <Name>prop1_still</Name>
      <AnimLength>100</AnimLength>
      <Visibility>
        <Parameter>
          <Code>
            (A:PROP MAX RPM PERCENT:1, percent) 50 &lt; if{ 1 } els{ 0 }
          </Code>
        </Parameter>
      </Visibility>
    </PartInfo>

"prop1_still" is the node and we know it is a helper, because a mesh would have the "x0_" prefix.

The Babylon Animation Groups panel records the animation you have created into the model and it essentially defines the animation for Asobo's render to take over. Imo, it does not as much assign a node, as it defines the node linkages you've assigned.
 
Thank you guys both for the thorough explanations. The SDK documentation has a tendency to be quite ambiguous about what certain things mean, and whether they are actually required or not. :)
 
Back
Top