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

FSX Conditional TooltipID?

Messages
588
Country
germany
Hi All,

I wanted my speed selection bug's tooltip to display IAS or Mach according to the selected mode. I was surprised that there exists no A:Variable holding the selection state IAS or Mach. So I tried this workaround, which does not work:
Code:
<TooltipID>(L:FLC IAS, bool) 1 == 
    if{ TOOLTIPTEXT_AUTOPILOT_SPEED_INDICATOR_KNOTS } 
    els{ TOOLTIPTEXT_AUTOPILOT_MACH_INDICATOR }</TooltipID>
Did I miss something or is it simply impossible to make if/els statements like that in a TooltipID?
 
I dont know if this helps or not, but at least you can get both speeds in the same TooltipText.

<Tooltip>"%((A:AIRSPEED SELECT INDICATED OR TRUE, knots))%!d! knots%((A:AIRSPEED MACH,mach)) %!1.2f! mach"%</Tooltip>
 
Code:
<TooltipText>%((L:FLC IAS, bool) 1 ==)%{if}%((A:AIRSPEED SELECT INDICATED OR TRUE, knots))%!d! Knots%{else}%((A:AIRSPEED MACH,mach))%!1.2f Mach</TooltipText>

This shows either IAS or MACH depending on the state of L:FLAC IAS.

Original code
Code:
%((L:Mip Fuel Consumed, bool) 0 ==)%{if}%((L:Fuel_Total_Consumed, liters) 1.6 * )%!4d%{else}%((A:Fuel total quantity weight,pounds))%!4d
 
Last edited:
Thanks guys, but since I want to use the localized TooltipID, I'll just stick with TOOLTIPTEXT_AUTOPILOT_SPEED_INDICATOR_KNOTS for both modes of FLC IAS. Speaking of FLC (Flight Level Change), does anyone know where I can grab Rob Barengredt's (rcbarend) rcbfl-10.zip? I couldn't find it on flightsim.com, and avsim...
 
Thanks guys, but since I want to use the localized TooltipID, I'll just stick with TOOLTIPTEXT_AUTOPILOT_SPEED_INDICATOR_KNOTS for both modes of FLC IAS.

There is no technical reason to stick with <ToolTipID> and be restricted to get the desired value, instead of using <ToolTipTex> with a proper script.

Tom
 
Thanks guys, but since I want to use the localized TooltipID, I'll just stick with TOOLTIPTEXT_AUTOPILOT_SPEED_INDICATOR_KNOTS for both modes of FLC IAS. Speaking of FLC (Flight Level Change), does anyone know where I can grab Rob Barengredt's (rcbarend) rcbfl-10.zip? I couldn't find it on flightsim.com, and avsim...

I do not know where it is, but what does it do? That has my curiosity going.
 
It is a "flight level change" gauge, it does "airspeed hold" by pitch adjustments independent of/without autothrottle. The gauge controls the Autopilot's vertical speed reference through a feedback loop to airspeed/mach. I've managed to get my hands on what seems to be a copy/modification of that gauge, distributed with another package. I am now trying to understand and replicate the PID-loop in that gauge.
 
There is no technical reason to stick with <ToolTipID> and be restricted to get the desired value, instead of using <ToolTipTex> with a proper script.

Tom

Well, I like to have the user get the displays in his/her language and using TooltipIDs is the only way (that I know of) to achieve that... I use custom tooltips for some parts for which a TooltipID does not exist.
 
Have you tried evaluating it as a string? Just an idea.

Code:
<TooltipID>%('TOOLTIPTEXT_AUTOPILOT_MACH_INDICATOR' 'TOOLTIPTEXT_AUTOPILOT_SPEED_INDICATOR_KNOTS' (L:FLC IAS, bool) 1 == ?)</TooltipID>
 
Last edited:
Well, I like to have the user get the displays in his/her language and using TooltipIDs is the only way (that I know of) to achieve that... I use custom tooltips for some parts for which a TooltipID does not exist.

Oh ok, I didn't think of language as a factor. Anyway you'll have indeed a mix of languages if you use custom tooltips in parts of your code.

Have you tried evaluating it as a string? Just an idea.

Shouldn't work, <TooltipID> requieres an ID, as its name indicates, it is not a script evaluator.

Tom
 
Back
Top