• 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 in modeldef.xml

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,706
Country
netherlands
Hi aircraft developers,

I'm trying to fix a bug in MCX and I can use a little bit of help, as I'm less familiar with modeldef.xml extensions.

There seems to be a bug in restoring the modeldef.xml information from the data I read from the MDL file. The problem is that tooltips don't stick. Inside the MDL file these are stored using the int values as defined in gauges.h. But if I stick that value in the modeldef.xml file like this:

Code:
<TooltipID>12697</TooltipID>

It doesn't work. On the next compile the TooltipID has changed to a different number. If I use the name of the tooltip ID like this it does work:

Code:
<TooltipID>TOOLTIPTEXT_THROTTLE_ENG1_PROPELLER_PERCENT</TooltipID>

Is there a way to use the number in the modeldef.xml code or should I always translate them to a name first?
 
Probably not of any help Arno but I didn't even realize the named tags get converted to a number on compiling. They are always stored as the full description in the modeldef file as far as I am aware. It may be a one-way street in that the name gets converted to a number (which is then referenced elsewhere) and inserting the number in place of the name generates a new number because the name changed.
 
I'm not sure why there are still ID numbers in the first place. Probably some legacy code from aeons ago?

If it eliminates the tooltip problem, I'm all in favor of "translating" the ID number to the corresponding string. This also makes it easier to identify a (default) tooltip and what it does*.


* https://msdn.microsoft.com/en-us/library/cc526960.aspx
 
Thanks for the answers so far. Guess I should go from number to string then.

Bjorn, what did you mean with insert the string itself? Is that different from the string ID?
 
Bjorn, what did you mean with insert the string itself? Is that different from the string ID?

My wording was a bit scrambled. I was just echoing your idea of replacing the tooltip number with the string.
 
Ok, thanks. I'm going to try that.
 
Back
Top