• 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 Recover XML Scripts

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Is it possible to recover XML scripts from a compiled aircraft model?

I pulled a classic "Fr. Stupid" today and loaded an older copy of my current modeldef.xml file to add three miserable minor knob/switch animations...

...and managed to loose around sixty already completed and fully tweaked animations! :yikes::banghead:

I think I remember reading that the latest ModelConverter tool will recover/recreate a compiled aircraft's modeldef.xml file.
 
Well, I did manage to recover the XML scripts, but...

...they are a bloody mess since the Animation and Mouse scripts are separated, and the <Name>s are totally different. Fortunately I can use the F(ind) function to locate and reconstruct them properly.

Well, it's better than having to completely rewrite them from scratch! :oops:
Code:
  <PartInfo>
    <Name>custom_rec_SW_Venturi_Pump_09</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <CallbackCode>
          (L:SW_Venturi_Pump,bool) ! (&gt;L:SW_Venturi_Pump,bool)
          1 (&gt;L:XMLSND1,bool)
        </CallbackCode>
    </MouseRect>
  </PartInfo>

  <Animation name="custom_anim_SW_Venturi_Pump_79" guid="df6cde7b-67c2-43fe-a65a-9475e383f2af" length="5" type="Sim" typeParam2="custom_anim_SW_Venturi_Pump_79" typeParam="AutoPlay" />
  <PartInfo>
    <Name>custom_anim_SW_Venturi_Pump_79</Name>
    <AnimLength>5</AnimLength>
    <Animation>
      <Parameter>
        <Code>#400#(L:SW_Venturi_Pump,bool) 5 *</Code>
      </Parameter>
    </Animation>
  </PartInfo>
 
Last edited:
Oh my God Uncle Bill - that is damned hard. Hope you solve that in a short Time.
And I hope you have in the future backups of your Files - e.g. Dropbox or GoogleDrive or OneDrive or your Postbox as printed letters.
 
Sandra, the pity is that we are forced to use a single "modeldef.xml" file, instead of being able to use a project-named.modeldef.xml file. As it is now, unless one remembers to periodically Save-As their current working modeldef.xml file, anytime one saves directly to that file, it will overwrite the contents of that file.

So, the short story version is that I had rebooted my development computer, and several days later decided to add some XML scripts to a model I've been working on. Instead of loading my current modeldef.xml file, I stupidly loaded my last saved T50.modeldef.xml file, added the new entries and then saved the file. Thus I overwrote all of the existing scripts with no easy way of recovery.

Fortunately, Arno's marvelous utility has allowed me to recover those lost scripts, albeit in a somewhat scrambled form. It will take me several hours today to reconstruct what I had originally carefully organized. :confused:
 
Grim! Sorry for your loss of scripts, FBL. Hope the restoration goes smoothly. At least you got the bulk of the code back.

Would auto-bak have all the names of the animations in the file?
 
Fr. Bill,
I have always believed that some of the world's most beautiful music was written as the results of the composers' inadvertent drips of ink on the sheet music, whether providentially melodic, or simply forcing the composer to have to start over.
I have to believe that this little hiccup by Fr. Oops will end up with an even better than the real thing end result.

Cheers
Gary

 
Would auto-bak have all the names of the animations in the file?
Well sure it would, but that's not relevant to this issue. I can read the animation names in the working .max file. For that matter, I can copy/paste the names for mouse stuff from the Properties tab for the selected object. :cool:

As I wrote earlier, the "recovered XML scripts" are broken up into two separate sections: one for Animations and another for Mouse stuff. Truthfully, I could simply correct the <Name> for the Animation stuff, and the <Name> for the Mouse stuff, but it would make future maintenance a nightmare... :eek:

"I've got to get me one of these!" Thanks for the chuckle, Gary!

EDIT: I know that some "Names" have to be auto-created by MCX, but some of them are hilarious! For example:
Code:
<Name>custom_rec_Event)_'LeftSingle'_scmp_0_!=
________if{
________(L_29</Name>
 
Sorry to hear that Bill. Unfortunately we are the weak link in computer data.
I started working on an automated system for organizing and updating the modeldef.xml file through batch files similar to the send-to scheme for compilation we use as mentioned in a previous post. All this will have to wait since my system bit the dust and it will be a couple of months before I can repair it.
 
Back
Top