• 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 Dummy Switches

Zeiten

Resource contributor
Messages
444
Country
norway
It is possible to make the switches in the VC just rotate without actually doing something?

I really don't know anything about xml yet, so the plan is to make every switch in the VC to operate, but not really do anything and just implement systems as I go along.

If it's possible what is the correct code?

Thanks.
 
I do not know the exact syntax of the XML code for it, but if the model has an animation tag for that switch, all you would have to have the switch do is execute the animation based as its function, instead of turning something on and off, etc.

If you research XML gauge animation you will see ways you can do it. Sorry I can't code examples,

--
Collin Biedenkapp
 
Extremely easy.


Here is a basic 'custom' L:var part animation. With this, you can endlessly change it to do other things.

Note the (command) strings and the tooltip zone. You will change those zones to fit what you need.

This is in FS2004 format.

<part>
<name>folding_seat_rh</name>
<animation>
<parameter>
<code>(L:Right Seat Fold, bool) 100 *</code>
<lag>70</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Fold Seat</tooltip_text>
<callback_code>(L:Right Seat Fold, bool) ! (>L:Right Seat Fold, bool)</callback_code>
</mouserect>
</part>



Here is one in FSX format.

Top FSX Animation Section;

<Animation name="ave_glovebox" guid="6B3D9C91-6337-4a20-9B32-0024B9565F06" length="100" type="Sim" typeParam2="ave_glovebox" typeParam="AutoPlay" />

Bottom FSX Animation Section

<PartInfo>
<Name>ave_glovebox</Name>
<Animation>
<Parameter>
<Code>(L:AVEgloveBOX, bool) 100 *</Code>
<Lag>50</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Open Glove Box</TooltipText>
<CallbackCode>
(L:AVEgloveBOX, bool) ! (>L:AVEgloveBOX, bool)
</CallbackCode>
</MouseRect>
</PartInfo>



Note on the second one, the speed (Lag) is at 50. That is very slow. Usually a switch is 400, very quick. Slow is 50 to 100.

The '100' on the top string indicates your animation scale, 100 points. Usually stock FS switches use 50 KF's or 'key frames'.

These animations are added to your XML parts list for Gmax in the SDK pack, 'bin' folder in the Environment section for FSX and for FS2004 it is in the Gamepacks/FS2004/Plugins folder.

EDIT; Small note. When recreating new versions off of these, note that there is a > symbol in the second of the bottom command strings;

(L:AVEgloveBOX, bool) ! (>L:AVEgloveBOX, bool)

Bill
 
Last edited:
Thank you Bill's ;)

Can't wait to try this out.

So this code goes into the modeldef.xml located in the Bid folder as Bill #2 (Lionheart) described?

Just a quick question.

I can see I have both a modeldef.xml in the bin folder and one in the plugin folder under 3DSM2009 where XtoMDL is located.

3Ds Max 2009 get its animation from the modeldef.xml in the bin folder and xtomdl uses the one under plugin?

So i basically need to edit one of them and replace the other one?
 
Ah, that is a question I cannot answer. I am running Gmax and it uses the Bin folder. Max might use the Gamepack folder. Bill Leaming and the others using Max can help you with that.

Just a small note. We usually add the animations to the top of the stack (in their appropriate sections) so that if the animation code has a fault, it stops the entire list of animations. In Max, usually the 'Animation Manager' will bleep an alarm when you try to bring it up, and or, the animations will be gone from the Animation Managers screen, showing you the list of parts is malfunctioning, coding error.

Also, you can 'section off' your codes you create, such as for certain planes; keeping the animations in a group.

In the parts list, you can add separators like this;

<!-- Cessna 182 Animations -->

tons of code...

<!-- End of Cessna 182 Animations -->



This way, you keep everything clustered in groups. Keeps you organized 2 years down the road.



Bill
 
I can see I have both a modeldef.xml in the bin folder and one in the plugin folder under 3DSM2009 where XtoMDL is located.

3Ds Max 2009 get its animation from the modeldef.xml in the bin folder and xtomdl uses the one under plugin?

Max will use whichever one you tell it to use. Honestly, I use only the one in the ..\bin folder for everything! It would be too confusing to have more than one.

Because I have many, many projects however, I tend to keep "custom" versions of modeldef.xml in the ..\bin folder...

...but prefix them with the name of my projects:

B737_modeldef.xml
C310R_modeldef.xml
T-38A_modeldef.xml
T-38C_modeldef.xml
etc.

I can then quickly make a copy of whichever one I need and remove the prefix_ from the filename.

For each new project, I actually start with an empty file, and only copy/paste the animation scripts I need for that aircraft, and only then add any "new custom animation scripts" that're required.

This keeps my working copy of modeldef.xml file neatly organized and as short as possible for ease of use! :teacher:
 
Bill,
For each new project, I actually start with an empty file, and only copy/paste the animation scripts I need for that aircraft, and only then add any "new custom animation scripts" that're required.

You just solved the FSDS issues with modeldef!

Thank you

Roy
 
This is gold!!

Will try this out later tonight so be prepared for either a cheer or another question ;)
 
Bill,


You just solved the FSDS issues with modeldef!

Thank you

Roy

Well then, that's an example of pure serendipity, since it is quite obviously an unintended consequence to the good... :D

The only ticklish part is remembering to re-save my working copy of modeldef.xml back to the correct "prefix_" version...

...before beginning to work on another project! I actually spent a few hours wondering why none of my animations for one project suddenly were failing during export before I remembered that I'd forgotten to save, rename and load the version for the aircraft I'd switched to... :rotfl:

I developed this scheme because I just got tired of having to search through and work with >15,000 lines of "stock script" while writing new scripts!

One other interesting thing is that I've found that one doesn't necessarily have to have all the <Amination...guid=.../> entries in the same group either...

Code:
<ModelInfo>
  <!-- MILVIZ B737-200 CONSOLE ANIMATIONS -->
    <Animation name".....guid="...../>

    <AnimationGroup name=".....>
         <AnimationRef guid="..../>
    </AnimationGroup>

    <PartInfo>
          ..........
    </PartInfo>

  <!-- MILVIZ B737-200 OVERHEAD ANIMATIONS -->
    <Animation name".....guid="...../>

    <AnimationGroup name=".....>
         <AnimationRef guid="..../>
    </AnimationGroup>

    <PartInfo>
          ..........
    </PartInfo>

</ModelInfo>

Because of this, I can keep the sections of the scripts I currently working on isolated to a smaller number of lines, making it much faster and easier to manage.
 
Back
Top