Jump to content

SDK Documentation and ASOBO Model Behavior Defs


Recommended Posts

Posted

I have been using the documentation at https://docs.flightsimulator.com

I assume this is the 'official' documentation and for this sub-templates XML code I have a question:

<Template Name="ASOBO_INSTRUMENT_Needle_VerticalSpeed_SubTemplate">
    <DefaultTemplateParameters>
        <NODE_ID>INSTRUMENT_Needle_VerticalSpeed#SUFFIX_ID#</NODE_ID>
        <ANIM_NAME>INSTRUMENT_Needle_VerticalSpeed#SUFFIX_ID#</ANIM_NAME>
        <PART_ID>INSTRUMENT_Needle_VerticalSpeed</PART_ID>
        <MAX_VALUE>2000</MAX_VALUE>
        <UNITS>ft/min</UNITS>
    </DefaultTemplateParameters>
    <OverrideTemplateParameters>
        <ANIM_SIMVAR_SCALE Process="Float">50 #MAX_VALUE# /</ANIM_SIMVAR_SCALE><!-- Scale MAX_VALUE to [-50, 50] -->

       <Condition Valid="USE_TOTAL_ENERGY">
               <True>
                           <ANIM_SIMVAR>VARIOMETER TOTAL ENERGY</ANIM_SIMVAR>
                           <ANIM_LAG>100</ANIM_LAG>
              </True>

              <False>
                           <ANIM_SIMVAR>VERTICAL SPEED</ANIM_SIMVAR>
              </False>
    </Condition>
    </OverrideTemplateParameters>

    <Component ID="INSTRUMENT_VerticalSpeed">
        <Component ID="#ANIM_NAME#" Node="#NODE_ID#">
            <UseTemplate Name="ASOBO_GT_Anim_Sim">
                <ANIM_SIMVAR>VERTICAL SPEED</ANIM_SIMVAR>
                <ANIM_SIMVAR_UNITS>#UNITS#</ANIM_SIMVAR_UNITS>
                <ANIM_SIMVAR_BIAS>50</ANIM_SIMVAR_BIAS><!-- [-50, 50] + 50 => [0, 100] -->
                <Condition Check="HIGHLIGHT_NODE_ID">
                    <PART_ID/>
                </Condition>
            </UseTemplate>
        </Component>

        <Condition Check="HIGHLIGHT_NODE_ID">
            <UseTemplate Name="ASOBO_GT_Highlight_Template">
                <HIGHLIGHT_NODE_ID>Instrument_VerticalSpeed_Highlight</HIGHLIGHT_NODE_ID>
            </UseTemplate>
        </Condition>
    </Component>
</Template>

I am trying to make the T31 variometer. I have it operating with Vertical_Speed but that's a simple VSI and I think I need to use the TOTAL ENERGY bold part but it is ommitted from the code in the file Instrument_Subtemplates.xml

Does anyone know if I can just paste it in or has it been removed from the subtemplate file for a reason? And does anyone know how I would call a conversion from ft/min to ft/sec when calling from my internal.xml :-

    <Component ID="Manometer_Green_Ball">
        <Parameters Type="Default">
            <ID>2</ID>
            <ANIM_SIMVAR_SCALE Process="Float">50 #MAX_VALUE# /</ANIM_SIMVAR_SCALE>  <!-- Scale MAX_VALUE to [-50, 50] -->
            <!-- <Condition = USE_TOTAL_ENERGY /> -->
        </Parameters>
        <UseTemplate Name="ASOBO_GT_Helper_Suffix_ID_Appender">
            <TEMPLATE_TO_CALL>ASOBO_INSTRUMENT_Needle_VerticalSpeed_SubTemplate</TEMPLATE_TO_CALL>
        </UseTemplate>    
    </Component>        

Hope someone can help.

 

Archived

This topic is now archived and is closed to further replies.

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...