• 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.

FSXA Export problem

euroastar350

Resource contributor
Messages
863
Country
us-delaware
Hi guys,

I'm starting to code my first payware project for Milviz (Bell 407) and I am having issues with exporting. As you can see in the following screenshots, this is what I get when I export the project to the X file for MDL processing. Also, this is the script I am using for the needle which is controlled by a engine control gauge in the panel folder. Any help is appreciated

Code:
<PartInfo>
    <Name>helo_needle_torque</Name>
    <AnimLength>120</AnimLength>
    <Animation>
      <Parameter>
        <Code>120 (L:Eng2Torque,enum) -</Code>
      </Parameter>
    </Animation>
  </PartInfo>
 

Attachments

  • ss1.jpg
    ss1.jpg
    675.8 KB · Views: 428
  • ss2.jpg
    ss2.jpg
    605.5 KB · Views: 446
The only time I have gotten those errors are when the partinfo name in modeldef have been changes and I have forgotten to re-tag the part in the scene with the new partinfo name.
 
Yes, the part has been tagged in the animation manager. I have the needle calibrated and keyframed from 0-120. It's just everytime that I export, I get that error. The guid has the same name as the part, I checked and doubled checked to make sure everything has been done properly. Any ideas?
 
Still having the same problems with the torque needle and now the starter switch code that I implemented. Any ideas on how to fix this? Since this project is for Milviz, I don't want to give them a model with everything default. All the guids are formatted properly, so are the animation scripts and on the parts themselves. Any help is appreciated.
 
This is the torque needle animation

Code:
<Animation name="Eng2Torque" guid="11c3498a-b357-45e2-8ced-4bb7ba39af19" length="120" type="Sim" typeParam2="Eng2Torque" typeParam="AutoPlay" />

Code:
<PartInfo>
    <Name>Eng2Torque</Name>
    <AnimLength>120</AnimLength>
    <Animation>
      <Parameter>
        <Code>(L:Eng2Torque,enum)</Code>
      </Parameter>
    </Animation>
</PartInfo>

This is the code for the engine start switch which is linked to a visibility script/code as provided by Bill Leaming.

Code:
<Animation name="EngStrtswitch" guid="cce094f1-4cc1-4c55-9ac7-6dea0ca81735" length="50" type="Sim" typeParam2="EngStrtswitch" typeParam="AutoPlay" />

Code:
<PartInfo>
  <Name>EngStrtSwitch</Name>
  <Animation>
    <Parameter>
      <Code>(L:EngStrtSwitch, bool) 50 *</Code>
      <Lag>50</Lag>
    </Parameter>
  </Animation>
  <MouseRect>
    <Cursor>Hand</Cursor>
    <TooltipText>Engine Start Switch</TooltipText>
    <CallbackCode>
          (L:EngStrtswitch, bool) ! (>L:EngStrtSwitch, bool)
    </CallbackCode>    
  </MouseRect>
</PartInfo>
 
Are you absolutely, one-hundred percent positive that you are [a] editing the active modeldef.xml file or that Max is pointed to the active modeldef.xml file?

The first error message is stating that it can't find the animation definition (the script with the GUID in it).

The second error message is stating that it can't "close" an unopened animation.

If you wish, email me directly at n4gix@comcast.net and I'll help you sort this out... :D
 
Just for information's sake, there is one very critical thing with animations for FSX...

We must have more that just a "start" and "stop" key. We need at least one more in the middle, but best of all is if we add keys at 25% and 75% as well:

0 - 25 - 50 - 75 - 100

or in this case

0 - 30 - 60 - 90 - 120

Using the provided script, I was able to export without errors after I added the correct tag via the AnimationManager that is... ;)
 
I got the needle to work, but it only stops at 70% torque reading and not all the way to 120% reading, although in the real helicopter, you don't ever want the torque to reach 120%:eek: Any ideas?

While I'm at it, I started with coding the ITT needle. It is animated in sim, but it jumps from 0 to 100. This is the code I am using:

Code:
<PartInfo>
    <Name>Eng2ITT</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:Circuit general panel on, bool) 1 ==
			if{
			(L:Eng2ITT,enum)
			}
			els{ 0 }</Code>
      </Parameter>
    </Animation>
</PartInfo>
 
Both problems you've described go back to the custom L:vars being used...

In the torque needle's instance you need to know precisely what the output range of the variable, and then scale the needle's animation to match it.

In the case of the (L:Eng2ITT,enum) variable, it may well be "jumping" from 0 to 100...

You will need to write a small test gauge with a <FormattedText> display to know, something like:

Code:
  <Element>
    <Position X="113" Y="62"/>
    <FormattedText X="300" Y="35" Font="Glass Gauge" FontSize="10" LineSpacing="0" Adjust="Left" Color="White" Bright="Yes">
      <String>Eng2 ITT = %((L:Eng2ITT,enum))%!3.2f!%</String>
    </FormattedText>
  </Element>

You may also wish to add a <Lag> entry to the animation to "slow it down" a bit...

...the number for <Lag> is xx frames/second, so "30" would be roughly 3.333 seconds from 0 to 100.

Code:
<PartInfo>
    <Name>Eng2ITT</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:Circuit general panel on, bool) 1 ==
			if{
			(L:Eng2ITT,enum)
			}
			els{ 0 }
        </Code>
        <Lag>30</Lag
      </Parameter>
    </Animation>
</PartInfo>
 
Ok I am still fiddling with the ITT needle. With the torque needle, I scaled it so it is reading from 0,5,10, 15, etc. Now the needle is controlled by an engine logic gauge and I've tried different settings to see if it would go any higher then 70, but it's a no go. This is the logic code used for torque creation:

Code:
<!-- Engine 2 and 3 Torque and Mast Torque Creation -->
			-20.0 (&gt;L:TorqueAdjuster,enum)
<!-- 
			(A:Eng1 torque percent, percent) 100 (A:general eng mixture lever position:2,percent) - abs - 
			162 (A:Eng1 torque percent, percent) - + (A:Eng1 torque percent, percent) min (L:PowerPenalty,enum) (L:Eng2Powering,bool) * + (L:TorqueAdjuster,enum) + (L:Eng2Running,bool) * (&gt;L:Eng2Torque,enum)
 
Ok I am still fiddling with the ITT needle. With the torque needle, I scaled it so it is reading from 0,5,10, 15, etc. Now the needle is controlled by an engine logic gauge and I've tried different settings to see if it would go any higher then 70, but it's a no go. This is the logic code used for torque creation:

Code:
<!-- Engine 2 and 3 Torque and Mast Torque Creation -->
			-20.0 (&gt;L:TorqueAdjuster,enum)
<!-- 
			(A:Eng1 torque percent, percent) 100 (A:general eng mixture lever position:2,percent) - abs - 
			162 (A:Eng1 torque percent, percent) - + (A:Eng1 torque percent, percent) min (L:PowerPenalty,enum) (L:Eng2Powering,bool) * + (L:TorqueAdjuster,enum) + (L:Eng2Running,bool) * (&gt;L:Eng2Torque,enum)

I wasn't talking about calibrating the needle to the gauge's scale, I was talking about scaling the output from your (L:Eng2Torque,enum) variable. If you are expecting that variable to display from 0% to 100%, then you will need to rescale the L:var output accordingly:

100 frames /70 Lvar's max output = 1.4285714 (scalar value to be applied).

You can either apply the above calculated scalar to the formula above, or in the modeldef.xml's script entry for the needle. Your choice.
 
Until you do the digital readout gauge and give us the resulting values you obtain at full throttle (or max whatever), we can't help.
 
What I usually do when I need to extract digits from a needle etc is not to create a gauge, but make some changes to the xml code so it includes a <MouseRect> and a <TooltipText>.



Code:
<PartInfo>
    <Name>Eng2ITT</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:Circuit general panel on, bool) 1 ==
			if{
			(L:Eng2ITT,enum)
			}
			els{ 0 }</Code>
      </Parameter>
    </Animation>
<MouseRect>
<TooltipText>%((A:variable,unit))%!d!I</TooltipText>
</Mouserect>
</PartInfo>

Make the necessary modifications to the code so it reads the variables you need and apply the mouserect to your needle using the attached point tool and all you need to to is hover your mouse over the part in the sim and the readout will show.

Will work in my theory.. ;)
 
Back
Top