• 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 Throttle control

Messages
44
Country
italy
Hi all.
In blender I have done a animation for the push pull lever for the throttle ( linear animation from 0 to 100 key frame)
How do the right code in xml file to do it work when I move the throttle control of my joystick assigned to Throttle axis in MsFS 2020 ?
I tryied different type of xml commands taken from other planes but my animation in the sim won’t work. My throttle lever doesn’t move.

Many thanks to someone could explain me and help.
 
Messages
244
Country
unitedkingdom
The XML programming is a long journey. You will have two main choices: (1) use Asobo special templates for each function in your aircraft, these templates are undocumented (2) learn to use a few basic Asobo templates ASOBO_GT_Anim, ASOBO_GT_Update, ASOBO_GT_Visibility, ASOBO_GT_Interaction_WheelLeftDrag_Axis, ASOBO_GT_Interaction_LeftSingle_Event which are mostly undocumented but sufficient to construct anything most of the special templates can do. Option (1) seems easier for people starting out but it doesn't take long to decide the 2000-line Asobo template is overkill for the 10-line function you need in your basic throttle. Option (2) is slower to begin with but you gain the tools to build anything you need in your XML file rather than being dependent upon Asobo having written it for you already.

It's not that you don't know how to animate a throttle - you don't know how to program in XML. IF you want to move the throttle based on your control input, example code using the basic template might be:

Code:
<Component ID="throttle_animation">
        <UseTemplate Name="ASOBO_GT_Anim">
              <ANIM_NAME>THE NAME OF YOUR THROTTLE ANIMATION IN YOUR MODEL GOES HERE</ANIM_NAME>
              <ANIM_LENGTH>100</ANIM_LENGTH>
              <ANIM_CODE>
                    (A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)
              </ANIM_CODE>
        </UseTemplate>
</Component>
that's an example of using the ASOBO_GT_ANIM general-purpose template. You could use the same template for the rudder, elevators, ailerons, flaps, gear simply with different simvars. So you need to know how to look up which simvars are available (SDK docs). At some point you're going to need to know what can go inside that ANIM_CODE section of the XML other than just a variable name. For the throttle you may want to add mouse drag, and that will mean learning the 'mouse drag' general-purpose template.

Or.... you can find someone to give you an example of a suitable use of an Asobo throttle template, and your throttle problem will be solved that way.
 
Messages
44
Country
italy
Thank you so much B21-soaring for your help. I try the code you suggest me as Asobo_gt_anim. Seems friendly to understand for my animations about throttle lever and even for the others to do.
I let you know.
 
Messages
44
Country
italy
Hi B21- soaring,

I tryied but with this animation name won't work.

<Component ID="throttle_animation">

<UseTemplate Name="ASOBO_GT_Anim">
<ANIM_NAME>Engine_Lever_Throttle_1</ANIM_NAME>
<ANIM_LENGTH>100</ANIM_LENGTH>
<ANIM_CODE>
(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)
</ANIM_CODE>
</UseTemplate>
</Component>

but if I use ( copied from another xml file ) this lines, my animation works.


<Component ID="ENGINE">
<UseTemplate Name="ASOBO_ENGINE_Lever_Throttle_Template">
<DRAG_AXIS_SCALE>-200</DRAG_AXIS_SCALE>
</UseTemplate>
</Component>

why ?
 

Attachments

  • 1.png
    1.png
    22.1 KB · Views: 71
Messages
44
Country
italy
No , unfortunately, but it’s works with the second one instructions I wrote in my previous post. I don’t know why
 
Messages
21
Country
netherlands
<Component ID="throttle_animation" NODE_ID=”throttle_object”>

or

within the component <NODE_ID>throttle_object</NODE_ID>

Why don’t you want to use the Asobo template?

good luck
 
Messages
44
Country
italy
<Component ID="throttle_animation" NODE_ID=”throttle_object”>

or

within the component <NODE_ID>throttle_object</NODE_ID>

Why don’t you want to use the Asobo template?

good luck
I used the asobo template and works ( see my third post ) , I have found this code in an other plane, but I don't know how to find an explanation of these templates and where I can find them. So Hi B21- soaring tell me to use the following code but doesn't work for me.
<Component ID="throttle_animation">

<UseTemplate Name="ASOBO_GT_Anim">
<ANIM_NAME>Engine_Lever_Throttle_1</ANIM_NAME>
<ANIM_LENGTH>100</ANIM_LENGTH>
<ANIM_CODE>
(A:GENERAL ENG THROTTLE LEVER POSITION:1, percent)
</ANIM_CODEn
</UseTemplate>
</Component>

than I'm using the asobo template and I have solved my problem but I still don't know something about this templates.
 
Messages
21
Country
netherlands
I copied the fs-common-aircraft directory to an easy accessible location and open and read the templates in order to understand them. They usually tell you what you need or can provide. Or else the subtemplate might.
 
Last edited:

FoxtrotScenery

Resource contributor
Messages
79
Country
netherlands
Shouldn't the NLA track's name be the same as the one in the XML? The name on the dope sheet can be anything because you can reuse multiple tracks and combine them into one NLA track.

So where you see Nlatrack, you shout out the animation name "Engine_Lever_Throttle_1".
 
Messages
21
Country
netherlands
Yes the nla track name should be the same. You can give multiple animations the same nla track name and they will all animate in the game with one xml entry.
 
Messages
244
Country
unitedkingdom
we're a little bit stuck not knowing what "not working" means, partly because we have no idea what you are doing to get to the "not working" point.
E.g. do you hold down the F3 key, see the throttle setting increase to max in the external view gauge, but inside the cockpit the throttle lever has not moved?
 
Messages
44
Country
italy
Hi B21-soaring. Sorry for delay reply.
your instructions are fine and works. Was a number of mistake in xml and cfg files of my airplane to give me problems.
I have the throttle lever animation that works now.
many thanks
 
Messages
62
Country
france
hello
where can we find the ASOBO_GT directory because i have this problème using this code:
<Component ID="ENGINE_CONTROLS">
<UseTemplate Name="ASOBO_ENGINE_Lever_Throttle_Template">
</UseTemplate>
which does not work in my new realization, whereas it worked fine under my previous realizations?
 
Messages
767
Country
italy
In the docs, template explore, you can find all the default templates



Fully understanding them is a whole different story

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
62
Country
france
thank you for the information
But that doesn't explain why my code worked on previous models and doesn't work now?
 
Top