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

Modeldef.xml-FSX

Messages
64
Country
us-texas
Anybody know how to add parts to the modeldef.xml-FSX Exactly what steps are needed to add parts.

J.Abbott
 
You mean, "can anyone tell me." It's obvious that someone already knows... :duck:

Open in notepad.exe or any XML editor.

Add your new entries as needed.

Each entry that has animation keyframes will need an <Animation...guid.../> definition. Entries that are <Visibility> only don't need this:

<Animation name="My_New_Name" guid="some.new.guid.number" length="number of keyframes" type="Sim" typeParam2="My_New_Name" typeParam="AutoPlay" />

Then you add the custom XML script for your new entry. I put all of mine at the top of the existing entries to make 'em easier to get to, and add a comment to identify where they begin and end:

Code:
  <!-- MY CUSTOM ANIMATIONS -->
  <PartInfo>
    <Name>My_New_Name</Name>
    <AnimLength>300</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:AMP_knob, enum) 0 == if{ 25 (A:ELECTRICAL GENALT BUS AMPS:1,amperes) - 4.22 * }
          (L:AMP_knob, enum) 1 == if{ 25 (A:ELECTRICAL GENALT BUS AMPS:2,amperes) - 4.22 * }
          (L:AMP_knob, enum) 2 == if{ (A:ELECTRICAL BATTERY VOLTAGE,volts) 10 * }
          (L:AMP_knob, enum) 3 == if{ (A:ELECTRICAL MAIN BUS VOLTAGE,volts) 10 * }
        </Code>
        <Lag>300</Lag>
      </Parameter>
    </Animation>
  </PartInfo>

  <PartInfo>
    <Name>light_gear_nose_ON</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:GEAR CENTER POSITION, percent) near 100 ==
          (L:CenterGearTest,number) 1 ==
          or
          if{ 1 } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
  <!-- END MY CUSTOM ANIMATIONS -->
 
Last edited:
Thank you Bill for Telling me. Mucho appreciated

J.Abbott

No problem. It was mostly cut-and-paste from my own modeldef.xml file that I already had loaded in Visual Studio. I keep it open most of the time whenever I'm working on a model so I can make quick entries in it as I need 'em.
 
When I first went to FSX and making new part animations, this really scared me. I have since found ways to speed up the parts animations entries...

Create about 20 new GUID's and have them in a sectioned off area near the top of the parts XML list. Use those for new animations, deleting the used ones from your list till you run out, then create more. This way you dont have to go into the GUID creation program every time you need a new GUID.

For new animations, you can reuse other animations and just change out the various aspects to your own new animations. Note that the FSX XML code is different then FS2004 and previous part XML code, so using existing FSX code ensures your's to work properly. (usually, lol).

Another small note. If you make a mistake on your part code, it will crash the FSX Tools in Gmax. Thus you will need to go back and repair the code (figure out whats going wrong) before you can start FSX Tools again in Gmax. Kind of a good thing in a way as you find out early if your code is written right or not.


Bill
 
I go here: http://www.guidgenerator.com/ and ask for 100 guids. I then copy/paste the entire list to an empty notepad.exe file.

I "consume" them from the bottom, using highlight Ctrl-X to remove it from the list, then Ctrl-V the selected guid into my new <Animation...guid.../> entry.

When my list of guids is empty, I simply go get more... :D

My single piece of advice is this:

Do not create more than one entry at a time, and test each new entry completely in the sim before attempting to create another new entry!
 
Thanks Bill for the heads up on GUID creator.com.

Nice....! 100 at a time. You cook man!!!!


:D
 
Well, you can ask for up to 2000, but I really think that's more than simply "overkill..." :rotfl:
 
Back
Top