• 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 Display of special characters in string

Messages
17
Country
unitedkingdom
Small problem that is causing me grief:

I am currently recreating my Narco NS800 RNAV (original was .gau) but I am creating the new gauge as XML.

I want to display a "<" character (ASCII 60) in a <String></String> does any body know of a way to do this (the Narco NS800 RNAV displays the "<" character next to the currently selected data item - so I want to be able to append the "<" to strings being displayed).

I know I could create a bitmap for it and show this in different positions but I would prefer to properly match text brightness and colour.
 
This is the code for displaying low pressure cooling air. The number 176 being the small circle degree sign º

so replace the #176 with #60
vololiberista

Code:
<Tooltip>Eng1LP Cooling Air: %((L:LP1_Cooling_air, number))%!03d!°%c %</Tooltip>

PS I've just noticed that the #176 is translated by the forum software so where you see the little circle "%!03d!°%c %" change that for #60
 
Last edited:
I use the little double arrows:

Code:
&# 187; obstacles,&# 187;180 KIAS:Climb Pwr:\n
&# 171;170 KIAS: Initial Cruise\n

» obstacles,»180 KIAS:Climb Pwr:
«170 KIAS: Initial Cruise

Note that there should NOT be a space between &# and the number; the forum software replaces them with the symbol if it's not there.
 
Hi, is there any way how I could display %? My code doesnt show any unit, just the number :(

percent.JPG


Pavel
 
Code:
<Tooltip>Engine 1 N2: %((A:Turb eng1 N2, percent) near)%!d![COLOR="Red"]%[/COLOR]%</Tooltip>

It's the red one!
vololiberista
 
Thanks guys

Interestingly I did also solve this simply by using:

<String>%((L:NARCO_NS800_SBY_WP, number))%!1d!%((L:NARCO_NS800_CPOS,number) 0 ==)%{if}&lt;%{end}</String>

I had perhaps naively assumed that &lt; wouldn't work but in fact it does.:o

Hopefully it has no adverse effect in the overall code.
 
Hello friends!

I am having the same issue... I just can't display the % character in a string; in this particular case within a tooltip.
Also, the ASCII equivalent is &#37;

For this example, I'd like to display:
a) If (L:Bell_407_Fuel_QTY_FWD_Tank,bool) is TRUE, the conditional text should show Aft Fuel Tank: 92%
(this, of course using the appropriate A:Var).
b) If (L:Bell_407_Fuel_QTY_FWD_Tank,bool) is FALSE, the conditional text should show Fwd Fuel Tank: 73%
(again, using the appropriate A:Var).

This is how I was trying to set it up (before to "collapse" all white spaces between lines):
HTML:
<tooltip>
%((L:Bell_407_Fuel_QTY_FWD_Tank,bool))
%{if}
Aft Fuel Tank: 
%((A:FUEL TANK CENTER2 LEVEL,percent) near)%!d!&#37;
%{else}
Fwd Fuel Tank: 
%((FUEL TANK CENTER LEVEL,percent) near)%!d!&#37;
%{end}
</tooltip>

Now... the correct way:
HTML:
<tooltip>%((L:Bell_407_Fuel_QTY_FWD_Tank,bool))%{if}Aft Fuel Tank: %((A:FUEL TANK CENTER2 LEVEL,percent) near)%!d!&#37;%{else}Fwd Fuel Tank: %((FUEL TANK CENTER LEVEL,percent) near)%!d!&#37;%{end}</tooltip>

The problem, is I can't spot where the problem is :eek:

In advance, thank you for any help!
Sergio.
 
Last edited:
Never mind...

I've tried with the same character taken from Tom's example ( &#187; ) and my code worked... but no with this &#37;
An educated guess, is that % is a reserved character and as a consequence, we can't use it.

EDIT 1:
It's not what I wanted, but worked for now...

The "set it up first" version:
HTML:
<tooltip>
%((L:Bell_407_Fuel_QTY_FWD_Tank,bool) !)
%{if}
Aft Fuel Tank (pct):%((A:FUEL TANK CENTER LEVEL,percent) near)%!3d!
%{else}
Fwd Fuel Tank (pct):
%((A:FUEL TANK CENTER2 LEVEL,percent) near)%!3d!
%{end}
</tooltip>

The final version:
HTML:
<tooltip>%((L:Bell_407_Fuel_QTY_FWD_Tank,bool) !)%{if}Aft Fuel Tank (pct):%((A:FUEL TANK CENTER LEVEL,percent) near)%!3d!%{else}Fwd Fuel Tank (pct):%((A:FUEL TANK CENTER2 LEVEL,percent) near)%!3d!%{end}</tooltip>

Thank you anyway.
Sergio.
 
Last edited:
to show % i do it this way

Code:
      %Fuel  Percent\t%((L:FuelM_total_fuel_perc,number))%!5.2f!\t%%\n

\t is for tabs
\n for new line
 
Hi EduHir!

Thanks for the swift reply; however no cigar yet. A slight variation using an A:Var:
HTML:
<tooltip>%Aft Fuel Tank:\t%((A:FUEL TANK CENTER LEVEL,percent) near)%!d!\t%%\n</tooltip>

The tooltip shows (with full tanks):
Aft Fuel Tank:\t100\t%\n

Thank you.
 
Last edited:
Here is a working tooltip

Code:
    <Tooltip>%((A:ENG N2 RPM:1,percent) 5 &gt; (L:FE_M_PILOT_TTip_Enable,number) -)%{case}%{:0} L: GRD ENG1 Start %{:1} ENG1 N2  %((A:ENG N2 RPM:1,percent) (L:EngWindM_Eng_N2,percent) max)%!4.1f!%% %{end}</Tooltip>


hmmmhh you wrote "tooltip" try "Tooltip"

FS9 is sometimes very funny!
 
<tooltip> is not the problem!

This is tested and working

Code:
<tooltip> Aft Fuel Tank: %((A:FUEL TANK CENTER LEVEL,percent) near)%!d! %% </tooltip>

\t and \n not used in tooltips only in text.
my example was from a textstring.
sorry for misleading you
 
Last edited:
I've always used <TooltipText> for my formatted strings... :coffee:

Nota Bene: I edited the above to add the missing "l" from <TootipText> :(
 
Last edited:
my example was from a textstring.
sorry for misleading you
My dear friend, no worries!!! You was trying to help and I really appreciate it; thank you kindly! I will test your snipet as soon as I'm able.

I've always used <TootipText> for my formatted strings... :coffee:
Hi Tom!

I am sure that Fr. Leaming was referring actually to <tooltip_text> and </tooltip_text>; just typo I think! :)
By the way, I noticed that <tooltip> </tooltip> in used in 2D gauges and <tooltip_text> </tooltip_text> in 3D parts; is that right?
Never used any of them in the "contrary" team :rotfl:

Cheers!
Sergio.
:)
 
FS9 vs FSX syntax.
Gee!, I never said that the code I was having issues was for FS9... :duck::duck::duck:
My mistake! Bjoern, thanks for the clarification.

<tooltip> is not the problem!
This is tested and working
That made the trick!!! Thank you.:wizard:

This is for FS9!!!
The final code; first, how I set it up:
HTML:
<tooltip>
%((L:Bell_407_Fuel_QTY_FWD_Tank,bool) !)
%{if}
Aft Fuel Tank (pct):
%((A:FUEL TANK CENTER LEVEL,percent) near)%!3d!%%
%{else}Fwd Fuel Tank (pct):
%((A:FUEL TANK CENTER2 LEVEL,percent) near)%!3d!%%
%{end}
</tooltip>

The only meaningful change is this: %!3d!%%

Now the final code (without blank spaces between lines):
HTML:
<tooltip>%((L:Bell_407_Fuel_QTY_FWD_Tank,bool) !)%{if}Aft Fuel Tank (pct):%((A:FUEL TANK CENTER LEVEL,percent) near)%!3d!%%%{else}Fwd Fuel Tank (pct):%((A:FUEL TANK CENTER2 LEVEL,percent) near)%!3d!%%%{end}</tooltip>

That tooltip is huuuuuuuuuge!

Thank you all,
Sergio.
:)
 
Last edited:
Back
Top