• 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 Fixing an existing mdl with MCX

Kekelekou

Resource contributor
Messages
226
Country
france
Hello everyone,


I have just bought the KCFS Seabee, which, while being a nice rendering of this little amphibian, features reversed throttle, pitch and mixture animations.

The corresponding levers are pulled out in take-off configuration (full throttle, high rpm, full rich), when It should be the other way around (all pushed in).

I have being fiddling a little with MCV lately, but I am not no expert regarding its features, so I am asking the forum : Is it possible to fix the levers animations?


I was thinking about the following steps :

MCX gives the means to read the modeldef.xml used for this specific model. So I copy this modeldef.xml to the SDK’s location, reverse the animation in the code, then export the mdl.


I might be self-delusional, so I prefer confirming the possibility before wasting my time on an impossible task!


Thanks again.
 
If you draw up a reversed animation code for the Modeldef, you can replace the exisiting animation tags for the prop, mixture, etc... levers with it in MCX. You just need to make sure that you catch all instances of the animation in the animation editor.


Before that, you should check that you're not trying to "fix" a quirk of the real aircraft though.
 
Hello Heretic !


Hurray ! So since my try did not work yesterday, it’s my bad and not related to MCX.


I identified the levers animations (and names) thanks to MCX animation editor.

I copied the modeldef.xml read from the mdl in MCX, and pasted this at the bottom of the SDK’s modeldef.xml.

The throttle used a complicated formula, so I focused on the mixture and pitch levers. Their animations were this type : length 100, scale -1, bias 100. The parameters are (A:GENERAL ENG MIXTURE LEVER POSITION:1, percent) and (A:GENERAL ENG PROPELLER LEVER POSITION:1, percent)

Reversing the anim should be achievable through changing scale to 1 and bias to 0. So I just did that : correcting the parameters in the supplemented modeldef.xml, then I exported a new MDL to the airplane directory.

But no luck in-game, what is no real surprise :)


What’s puzzling me is that the tooltips are all mixed up : the mixture lever one is “engine generator”, the Kohlmann reads “NAV1 freq” etc, even though all animations are still the way they were before the MDL modification.


So here is my question :

Should I delete all items related to mixture and pitch lever animations in the default modeldef.xml, or should I not pay attention to this because the GUIDs enable the MDL to pick up the right animation tags (and tooltips) amongst the whole modeldef.xml?
 
I hope you didn't paste the entire modeldef from MCX at the bottom of another one since you will end up with duplicate entries that way!


Try to completely recreate the animation entry with a new GUID, name and mouse rectangle and assign it in the Animation Manager and Hierachy Manager.
 
Well, I might have done exactly that : a good ol' copy&paste! So that explains the unmodified animations and mixed-up tooltips. Thank you for the tip, I'll try work it out the way you're suggesting.

By the way, what exactly is shown in the model's modeldef.xml in MCX : all non-standard animations? all animations?
 
MCX generates the Modeldef from the one set in its preferences and adds any custom (non-standard) visibility, animation and mouse rectangle code found in the model file.
 
Well well well, no going anywhere... :(

I had a test session last night, which has only added to my bewilderment...
I did not pay attention to the tooltips, just focusing on the anims.

1st test : Am I able to delete all other anims except the three ones I'm trying to fix?
I opened the mdl with MCX, and fixed all other anims with the anim editor. MDL exported to seebee_I_test.mdl, model.cfg set accordingly, FSX launched.
The mixture, pitch and throttle were the only 3 animated parts.
--> Success

2nd test : Assigning the three fixed animations codes
The MDL's modefdef.xml code was pasted in the SDK's modeldef.xml.
All entries but the three relevant blocks were deleted. The animations were reversed by switching from scale =1/bias =0 to scale =-1, bias =100.
I opened the mdl with MCX, and fixed all other anims with the anim editor. The 3 animations were reassigned to the ones from the list.
MDL exported, the export log reads that the 3 anims are dealt with properly. FSX launched.
The mixture, pitch and throttle were the only 3 animated parts.They still moved the wrong way.
--> Failure

3rd test : Are the flawed animations still written somewhere (in the mdl?) so that these ones bypass the sdk's modeldef ones?
The 3 corrected anims in the SDK's modeldef.xml are renamed (kku_ prefix) and given a new GUID.
I opened the mdl with MCX, and fixed all other anims with the anim editor. The 3 animations were reassigned the kku_ animation codes from the list.
MDL exported, the export log reads that the 3 anims are dealt with properly. FSX launched.
The mixture, pitch and throttle were the only 3 animated parts, still moved the wrong way though.
--> Failure

I do something wrong obviously, just can't nail it so far. How funny modding is! :laughing:
 
Possible alternative method.
Export the MDL as a .X file, this will also generate a .xanim file.
Edit the .xanim file in Notepad and reverse the order of the relevant Keyframes, don't change the filename.
Reopen the .X file with MCX, export.
Easy in theory.
 
Thank you Essex for your help. I have just tested your proposal and it works! But all mouserects and tooltips are gone! :rotfl:
Oh boy, I was not expecting such a thrill!
 
Yep, you'll lose all user defined part properties when exporting in .x format.
 
Not necessarily I think.
If the customised modefdef.xml is also exported and then set as MCX's modefdef I don't think anything needs to be lost.
 
Not necessarily I think.
If the customised modefdef.xml is also exported and then set as MCX's modefdef I don't think anything needs to be lost.

It sadly doesn't work like that for visibilities and mouse rectangles. This info is stored in ASCII decimal format and is then stored as a "PartData" block in front of the "FrameTransformMatrix" block of the associated part in the .x file.
Since MCX (probably) lacks the capability to translate these custom part infos into ASCII decimal, it won't store them in exported .x files.
 
My understanding of how MCX exports MDLs is it first generates a .X file, a .xanim file and a modefdef.xml, then runs the compiler on these 3 files, which it then deletes.
I don't understand how tampering with the .xanim file in the middle of the process losses data elsewhere.
 
You're right. Just tried exporting and importing an .x file and the part data is exported and imported indeed, but only part data that is actually found in the modeldef set for use by MCX is retained. If the model contains part data entries that are not in that modeldef, the part data will be discarded.

What keke can try is loading the unaltered model into MCX, let MCX generate the modeldef.xml, copy and paste said modeldef into a new .xml file, point MCX to that new modeldef, then close and reoad the model in MCX, do his alterations, export in .x format, import from .x format and compile. It's the long way round, but may be worth a try.
 
Revised.
Set MCX Exporter settings to "Keep Xfile: true"
Export the MDL as a MDL file, this will also generate a .x, .xanim and modefdef.xml files.
Set MCX modefdefpath to the new modefdef.xml file.
Edit the .xanim file in Notepad and reverse the order of the relevant Keyframes, don't change the filename.
Reopen the .X file with MCX, export.
 
Thank you Heretic and Essex for your much valuable input!

I gave it a very quick shot yesterday, and must have failed somewhere once again (not sure I pointed to the right modeldef.xml).

I’ll try again without being in a rush, it will probably help!
 
Hmmm, I might have forgotten to do so. I think I selected the new modeldef.mxl without restarting it.
Thank you for the heads-up.
 
Quick update :
I have just tried to follow Essex's proposal WITHOUT changing anything the .x, .xml or .xanim files. But testing in FSX shows that tooltips are all mixed-up, and some switchs have lost their mouserects underway...
So I must have something wrong with the way my MCX/FSX is configured.
 
Back
Top