FSX FSX XML Schema question

In FS9 FormattedText XML schema, one can list multiple font colors, font faces, and font sizes and then select which one to display by using the appropriate escape sequence. For example:

<FormattedText X="440" Y="222" Font="consolas" FontSize="8" LineSpacing="8" Color="#101010" BackgroundColor="gainsboro" Bright="Yes" Align="Right">
<Color Value="blue"/><Color Value="red"/><Font Name="consolas italic"/><Font FontSize="10"/>
        %\{clr2}----------------- NearestVorCurrent -----------------\n
        %      ICAO     \{clr5}111\{clr2}\n
        Line  \{clr2}1\{clr4}23\{clr3}4567\{clr5}89012\{clr2}  Ident Type\n
        %((@c:NearestVorItemsNumber) s2 0 !=)
                    %((L:ScrollIncrement, enum) int sp1)
                        %(l1 (>@c:NearestVorCurrentLine))\{lsp=24}\{clr}
                            %((@c:NearestVorCurrentICAO) 'SelectedVORICAO' @FIRString scmp 0 ==)%{if}\{clr4}%{end}
I presume that the escape sequences documented in the link are valid under both FS9 and FSX schema formats.

Question: How does one write the alternate color/size/font choices in FSX schema format? What is the syntax?

<GaugeText><Bold>false</Bold><Bright>false</Bright><FontColor>#FFFFFF</FontColor><FontFace>OCR-A II</FontFace><FontHeightScript>17</FontHeightScript>
    *What goes here?*
        %((L:JoystickButtonScroll, enum) 9 + (C:ITrafficInfo:ListSize) min s2)
        %{if}%((L:JoystickButtonScroll, enum) 8 / int 8 * sp1)
                    %(l1 d (>C:ITrafficInfo:CurrentVehicle) (>C:ITrafficInfo:SelectedVehicle))
                    %((C:ITrafficInfo:SelectedVehicleID) 1 ==)%{if}\{clr2}%{end}
                    %((C:ITrafficInfo:SelectedVehicleID) (L:VehicleID) == )%{if}\{rev}\{blc=olivedrab}%{end}
                    \{clr}%((C:ITrafficInfo:CurrentVehicle) 1 +)%!2d!
                    \t%( @CurrentCallsign )%!s!
Last edited:


Resource contributor
This is the only example I could find quickly:
<AlternateColor id="AlternateColor">

<FontFace>GLASS GAUGE</FontFace>
Not sure whether multiple alternate colors (up to 7 for FS9 schema, IIRC) require their own wrapping "alternatecolor" tag or it suffices to add them to the list by their "fontcolor" tags.
Excellent! Thanks Bjoern.

I had a hunch you would respond. You're the only one I know that has the patience to work with FSX schema.

After reading your response, I took a more careful look at the online SDK. It's in there - just buried a little further down than I looked at first.

Last edited:
Just another example , used in a Loop in my radar .
( It was done in two parts , (1) readout section , and (2) loop calculation . )
    <!--Target selected AI Lock    %\{clr=@AiFontColor}  On-->
        <Element id="Target_Data">
                    <Visibility>(L:TGTscript, number) 1 ==</Visibility> 
                <Element id="Target_Data">
                    <GaugeText id="target">
                              <GaugeString>\t%Ac %((C:ITrafficInfo:S:ATC MODEL, string))%!s!                                                 
                                \n\n\t%Gs %((L:Target_Groundspeed, number) 10 / near 10 *)%!4d!%kt%
                                \t\t%Alt %((L:Target_Altitude, number) 100 / near)%!4d!\{dpl=FL}
                                \n\n\t%Hdg%((C:ITrafficInfo:S:PLANE HEADING DEGREES MAGNETIC, degrees))%!4d!%\{dplo= }
                                \t\t%\{clr=@AiFontColor}%Dst %((L:Target_Distance, number) 1.59 &lt;)%{if}%((L:Target_Distance, number) 6076 *)%!4d!%ft%((L:Target_Distance, number) 1.6 &gt;)%{else}%((L:Target_Distance, number))%!4.1f!\{dpl=nm}%{end}%
                                \n\n\t%\{clr}%VSI: %((L:Target_VSI, feet per minute) abs flr )%!d!%  %((L:Target_VSI, feet per minute) 0 &lt; if{ 'Dn' } els{ 'Up' } )%!s!
                                \t\t%\{clr=@AiFontColor}%(-299 299 (L:Target_Altitude, number) (A:Indicated Altitude,feet) - rng)
                                    %((L:Target_Altitude, number) (A:Indicated Altitude,feet) - abs)%!3d!%'%
                                    %((L:Target_Altitude, number) (A:Indicated Altitude,feet) - 100 / abs 3 &gt;)
                                    %((L:Target_Altitude, number) (A:Indicated Altitude,feet) - 100 / near abs flr)%!3d!%
                                    %((L:Target_Altitude, number) (A:Indicated Altitude,feet) - 0 &lt; if{ 'blw' } els{ 'abv' } )%!s!
                                \n\n\t%Brg %(@ClosingSpeed (&gt;L:ClosingSpeed,number))%(@AspectAngle (&gt;L:AspectAngle,number))
                                %((L:Target_Bearing, number) abs flr )%!3d!\{dplo= }%  %((L:Target_Bearing, number) 0 &lt; if{ 'L' } els{ 'R' } )%!s!
                                \t\t%Cls %((L:ClosingSpeed,number))%!4d!
and ,

                <Element id="TGT_Data_Calc">
                        <GaugeText id="GaugeText">
                            <FontFace>Gloucester MT Extra Condensed</FontFace>
                            <GaugeString>%((L:Filter) (&gt;C:ITrafficInfo:Filter))
                                %((L:ListFirstVis) 16 + (C:ITrafficInfo:ListSize) min s2)
                                %{if}%((L:ListFirstVis) sp1)
                                    %{loop}%(l1 (&gt;C:ITrafficInfo:CurrentVehicle))
                                    %((C:ITrafficInfo:SelectedVehicle) l1 == )
                                    %((A:PLANE LATITUDE, radians) rddg dnor (&gt;C:fs9gps:GeoCalcLatitude1,degrees)
                                    (C:ITrafficInfo:S:PLANE LATITUDE, radians) rddg dnor (&gt;C:fs9gps:GeoCalcLatitude2,degrees)
                                    (A:PLANE LONGITUDE, radians) rddg dnor (&gt;C:fs9gps:GeoCalcLongitude1,degrees)
                                    (C:ITrafficInfo:S:PLANE LONGITUDE, radians) rddg dnor (&gt;C:fs9gps:GeoCalcLongitude2,degrees)
                                    (C:fs9gps:GeoCalcBearing,degrees) (&gt;L:sAI_Bearing, degrees)
                                    (L:sAI_Bearing, degrees) (A:Plane heading degrees true, degrees) - 360 % dnor s0
                                        180 &gt;
                                        if{ 360 l0 - /-/ } els{ l0 } (&gt;L:Target_Bearing, number)
                                    (C:fs9gps:GeoCalcDistance,nmiles) (&gt;L:Target_Distance, number))

                                    %((C:ITrafficInfo:S:GROUND VELOCITY, knots) (&gt;L:Target_Groundspeed, number))%

                                    %((C:ITrafficInfo:S:PLANE ALTITUDE, feet) (&gt;L:Target_Altitude, number))%
                                    %((C:ITrafficInfo:S:Vertical speed,feet per minute) (&gt;L:Target_VSI, feet per minute))

                                    %((C:ITrafficInfo:S:PLANE HEADING DEGREES TRUE, radians) rddg (&gt;L:Target_Heading, number))%

                                    %(l1 ++ s1 l6 &lt; d)
The alternate colour is previously declared in a Macro .
        <Macro id="AiFontColor" Name="AiFontColor">
Note also that other Escapes are included within the Loop script .


EDIT Shot shows readout text on Radar at right , data relates to aircraft at left .
Last edited: