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

TooltipID changed in exported model

Messages
144
Country
netherlands
Arno, when I downloaded the latest dev version I think I saw a change note about a TooltipID fix. I was hoping for a solution to this issue so I went in to test it. Unfortunately I still get corrupted TooltipID's in the exported FSX model. Example:

In MCX, the original modelpart has stock animation tag "lever_mixture0" with mouserec "custom_mrec_00".
In the sim, that tooltip reads "Engine 1 Mixture Control (100%)". In the FSX SDK this corresponds with TooltipID = TOOLTIPTEXT_THROTTLE_ENG1_MIXTURE_PERCENT.

When I use the exported model in FSX, the tooltip is wrong, it reads "Engine 3 Exhaust Gas Temperature Gauge (-273 C)" which corresponds with SDK TooltipID = TOOLTIPTEXT_ENG3_EGT_CELSIUS.

If I look in the exported ModelDef.xml file, I see this as mouserec - the TooltipID is converted to number "41020":

Code:
  <PartInfo>
    <Name>custom_mrec_00</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>41020</TooltipID>
      <MouseFlags>WheelDown+WheelUp+LeftDrag+LeftSingle</MouseFlags>
      <CallbackDragging>
        <Variable>GENERAL ENG MIXTURE LEVER POSITION:1</Variable>
        <Units>percent</Units>
        <Scale>163.839996337891</Scale>
        <YScale>-163.839996337891</YScale>
        <MinValue>0</MinValue>
        <MaxValue>16384</MaxValue>
        <EventID>65919</EventID>
      </CallbackDragging>
    </MouseRect>
  </PartInfo>

I hope this helps to identify the cause of this problem.
 
Last edited:
Hi,

The bug I recently fixed was related to custom mouse rectangles being defined, while a default one should be used. In your case it seems a custom one is still being defined. Did you convert this model before with the old MCX? In that case the problem could have been introduced by that.

Else I would need to have a test model and know which mouse rectange is assigned and which is read from the MDL after importing it again.
 
Thanks for your response. I think it is the same problem you describe and I did not convert this model before with the old MCX. The mixture lever of the model I imported has a default animation and mouserec. The animation was exported OK but the mouserec got converted into a custom one. For this test I took the stock FSX Cessna 172 interior model: cessna172sp_interior.mdl.
Anyway, I can work around this by replacing the wrong mouserec with a new custom mouserec which uses a TooltipText instead of TooltipID.
 
Last edited:
I'll see if I can reproduce it with the default model.
 
Hello,

Same issue here. Have you been able to find some time to work on this?

Thank you for MCX anyway.
 
Hi,

I did solve some bugs last time, but it doesn't seem to solve it in all cases. If you can provide a (small) sample model that shows the problem I'll have another look.
 
Hello Arno!
I’ll send you the file in the next few days (i’m away from home right now).
What I have noticed is that beside the tooltipID, some of the custom mrec names look corrupted: they read like « custom_mrec_—A:engine rpm— }1{—&gt;_27 », some simvar names are inserted into the designation! The animation is still able to affect them, but this means something goes wrong when the MCX_modeldef.xml is created.
 
No, that's OK I think. The names are derived from the condition. Let me double check in the code now I derive them. The friendly name in the modeldef.xml file is not stored in the MDL.
 
Good to know that the modified names are fine.
So here is the original mdl file.
Let's focused on the throttle levers : the untied left one, the untied right one, ant the tied ones.
With the original modeldef.xml, the animations, mouserects and visibility conditions from the unaltered file read as follows in the Object hierarchy (search "throttle") :

Untied right lever:
Vis custom_vis_x3d_asbn2_ctrl_throttlevis_00
MouseRect lever_vicker_throttle_diff_right
Anim lever_throttle1
Untied left lever:
Vis custom_vis_x3d_asbn2_ctrl_throttlevis_00
MouseRect lever_vicker_throttle_diff_left
Anim lever_throttle0
Tied levers :
Vis custom_vis_x3d_asbn2_ctrl_throttlevis_04
MouseRect custom_mrec_92
Anim custom_anim_GENERAL_ENG_THROTTLE_LEVER_POSITION_59

Then, I close MCX, and change the <HelpId> and <ToolTipID> lines from "diff_left" and "dift_right" mourerect sections to the following ones :

Code:
<HelpID>HELPID_GAUGE_THROTTLE_THROTTLE</HelpID>
            <TooltipID>TOOLTIPTEXT_THROTTLE_ENG1_THROTTLE_PERCENT</TooltipID>

becomes

Code:
<Tooltip>TestLeft</Tooltip>

Code:
<HelpID>HELPID_GAUGE_THROTTLE_THROTTLE</HelpID>
            <TooltipID>TOOLTIPTEXT_THROTTLE_ENG2_THROTTLE_PERCENT</TooltipID>

becomes
Code:
<Tooltip>TestRight</Tooltip>

The two relevant sectios now read as follows in the modeldef.xml :

Code:
<PartInfo>
    <Name>lever_vicker_throttle_diff_left</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
                (A:general eng1 throttle lever position:1,percent)
                s0
                (&gt;L:VickerLeftThrottlePercent,percent)
                l0 -2 / 50 +
                </Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <Tooltip>TestLeft</Tooltip>
      <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
      <CallbackDragging>
        <Variable>GENERAL ENG THROTTLE LEVER POSITION:1</Variable>
        <Units>percent</Units>
        <Scale>163.84</Scale>
        <YScale>-163.84</YScale>
        <MinValue>-16384</MinValue>
        <MaxValue>16384</MaxValue>
        <EventID>THROTTLE1_SET</EventID>
      </CallbackDragging>
    </MouseRect>
  </PartInfo>
  <PartInfo>
    <Name>lever_vicker_throttle_diff_right</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
                (A:general eng2 throttle lever position:2,percent)
                s0
                (&gt;L:VickerRightThrottlePercent,percent)
                l0 -2 / 50 +
                </Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <Tooltip>TestRight</Tooltip>
      <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
      <CallbackDragging>
        <Variable>GENERAL ENG THROTTLE LEVER POSITION:2</Variable>
        <Units>percent</Units>
        <Scale>163.84</Scale>
        <YScale>-163.84</YScale>
        <MinValue>-16384</MinValue>
        <MaxValue>16384</MaxValue>
        <EventID>THROTTLE2_SET</EventID>
      </CallbackDragging>
    </MouseRect>
  </PartInfo>

After MCX is opened once again, and Islander_interior.mdl imported again, the modified sections appear in the "Show ModelDef.xml" code., and both "throttle_diff_..." mouserects are affected to the parts.

MCX is still pointing to the modified modeldef.xml (with "testleft" and "testright"), but when I export the MDL to, say, BN2_VC.mdl, two new custom mouserects are affected to the parts EVEN TOUGH the "throttle_diff_..." mouserects still exist in the Show modeldef.xml!

Code:
<PartInfo>
    <Name>custom_mrec_24</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>44032</TooltipID>
      <MouseFlags>WheelDown+WheelUp+LeftDrag+LeftSingle</MouseFlags>
      <CallbackDragging>
        <Variable>GENERAL ENG THROTTLE LEVER POSITION:2</Variable>
        <Units>percent</Units>
        <Scale>163.839996337891</Scale>
        <YScale>-163.839996337891</YScale>
        <MinValue>-16384</MinValue>
        <MaxValue>16384</MaxValue>
        <EventID>65821</EventID>
      </CallbackDragging>
    </MouseRect>
  </PartInfo>
  <PartInfo>
    <Name>custom_mrec_25</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipID>13544</TooltipID>
      <MouseFlags>WheelDown+WheelUp+LeftDrag+LeftSingle</MouseFlags>
      <CallbackDragging>
        <Variable>GENERAL ENG THROTTLE LEVER POSITION:1</Variable>
        <Units>percent</Units>
        <Scale>163.839996337891</Scale>
        <YScale>-163.839996337891</YScale>
        <MinValue>-16384</MinValue>
        <MaxValue>16384</MaxValue>
        <EventID>65820</EventID>
      </CallbackDragging>
    </MouseRect>
  </PartInfo>

Not a single issue with Vis or anim though.

I have noticed that custom mouserects in the original MDL are not mixed up after export. The flawed ones seem to be the ones that are coded in the default modeldef.xml.
 
Darn, can't upload a 4Mb zip file...
And by the way, I run a French edition FSX Gold. Maybe the language files are causing the mess in the tooltipIDs? Do you know where a list with the ID number and the meaning can be found?
 
You can email me the file as well. I'll PM you an address.

The sdk contains the list of values.
 
Got the file.

There is a header file that specifies the numbers for the tooltips. I'm typing this on my phone so can't find it now.
 
I would never have thought looking for an header file. I was keeping on searching into the online site and the CHM help file!
Thanks Arno.

Regarding the tooltips, I guess the question is why the already assigned mouserects are replaced by custom ones.
 
Have you tried tooltiptext, as in..

<TooltipText>Hi There Friends of Italian Opera</TooltipText>
 
No, haven’t tried with tooltiptext.
The fact that default mouserect assignments are discarded while exporting still exists even if no modifications are done in the modeldef.xml.

PS: what I have writtten is a bit misleading. The issue I am facing is that most tooltips are mixed up ingame : the cage/uncage knob of the attitude gauge could read « antidetonation tank » in French.
I have noticed that even though the mouserect section and assignements are fine before exporting, a new custom mouserect is created by MCX while exporting. This new mrec calls for a TooltipID number.
So I'd like to understand if:
- creating custom mrec for all sections is the normal way of proceeding for MCX
- the called-for TooltipID is correct, and is not language dependant

PS : I'll check the language.dll this evening...
 
Last edited:
Last update : I must have done something wrong when I tired to edit the modeldef.xml, so I have brought everything back to default.

So let's start from scratch.
MCX points to the default modeldef.xml all along the test.
- Islander_interior.mdl shows that custom_mrec_25 is assigned to the left pitch lever, which calls for the TooltipID 12697 in the Object Modeldef.xml.
- This mdl is exported to BN2_VC17.mdl
- BN2_VC17.mdl is opened in MCX. The left pitch lever mrec is custom_mrec_24 which calls for the TooltipID 13504 in the Object Modeldef.xml.

Ingame, the tooltip is fine with the Islander_interior.mdl, but shows a "Niveau du fluide anti-détonation" ("Antidetonation fluid level) with BN2_VC17.mdl.

The TooltipID number list is available in the gauges.h file in the Microsoft Flight Simulator X SDK\SDK\SimObject Creation Kit\Panels and Gauges SDK\inc folder.

12697 : TOOLTIPTEXT_THROTTLE_ENG1_PROPELLER_PERCENT
13504 : TOOLTIPTEXT_ANTIDETONATION_FLUID_LEVEL

This is consistent with what I have just read ingame.

I have done the test twice, with the same results.

So :
- There is no discrepency between the French and the English tooltips.
- The tooltipIDs seem to go wrong during the export with MCX
 
Hi,

Thanks for the update. I didn't have the time yet to check your file (I'm hunting some other bugs in another tool at the moment). But this should help me to find it.

As a little background information, when a MDL is compiled part of the information from the modeldef.xml file is put in the MDL file. MCX does read the information from the MDL file and then tries to find the right definition in your modeldef.xml file again. It seems this is going wrong in this case. Probably a bug in reading the information from the MDL file.

But hopefully with the clear description above I can find out what is going wrong. The fact that MCX makes a custom definition and not displays one of the default ones indicates that it things none of the default definitions match.
 
Hi,

I'm not sure if you made this object yourself from scratch, but if that's the case would it be possible to make a very simple test object that only has the animation that gives the problem (so only that lever)? That way it would be much easier to debug for me.
 
Hi,

I just did a small test. On a simple object I assigned the two mouse rectangles for lever_prop_pitch0 and lever_prop_pitch1. If I export this object and import it again I do get custom definitions. So I'll continue debugging why that happens.

On the other hand, the tooltip IDs don't change for me.
 
Back
Top