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

Request help with FSX/P3D toggle gauges and tooltips.

Messages
17
Country
unitedstates
Hi, I've been making a few XML gauges and am stuck on a few things. Understanding the differences of the old types vs new types is obviously confusing to a noob. I've been able to accomplish maybe 80% of what I've wanted but am stuck on a few items, mainly 3 separate things.

#1 - I want to make a few XML toggles that use two bitmaps, one for ON and one for OFF. I know this is fairly easy as I have many made in the older XML style like any simple light switch for example. But when trying it with other various events I've not always got the same results. So, #1..does the event always have to include the words "toggle" for this to work? In some cases I'd say no as for example I successfully made a parking brake toggle with two bitmaps using the older schema and it's working fine in P3D v3.5. In the case of the park brake the event is simply PARKING_BRAKES but it is in fact a toggle as are many gauges that don't actually say "toggle" in the event.

For example lets say I'd like to make another toggle for the engine 1 failure event (which is a toggle). As shown below it works with a single bitmap but then obviously you cannot visually tell when it is toggled on or off so I want to use two bitmaps, one for on, one for off.

Code:
<Gauge Name="Eng1 Fail Toggle" Version="1.0">
  <Image Name="ENG1-FAIL_Icon.bmp" />
     <Mouse>
          <TooltipText>ENG 1 FAILURE</TooltipText>
          <Cursor Type="Hand"/>
          <Click Event="TOGGLE_ENGINE1_FAILURE"/>
  </Mouse>
</Gauge>


and then in the older FS9 schema XML you have something like a light switch which is

Code:
<Gauge Name="BeaconLights" Version="1.0">
    <Element>
      <Select>
          <Value>(A:Light beacon,bool)</Value>
          <Case Value="0">
              <Image Name="POLE_TOGG_off.bmp" ImageSizes="38,54"/>
          </Case>
          <Case Value="1">
              <Image Name="POLE_TOGG_on.bmp" ImageSizes="38,54"/>
          </Case>
       </Select>
    </Element>
   <Mouse>
      <Help ID="HELPID_GAUGE_LIGHT_SWITCH_BEACON"/>
      <Cursor Type="Hand"/>
      <Click Event="TOGGLE_BEACON_LIGHTS"/>
   </Mouse>
</Gauge>


I'm trying interpolate between the two types to create a new gauge that does the same but in the newest XML for P3D or more preferably an XML schema that will work in both FSXsp2 / FSXse / P3D. I just don't know enough about XML to make the proper correlations and changes. I've read a lot in the SDK's and unfortunately the information is confusing because I also can't seem to decipher which web page is accurate for my needs as there are several ESP v1.0 web pages and then the P3D SDK pages as well which in most cases just seem to mimic the old FSX ESP pages. At a certain point I just glaze over and get that blank stare on my face lol.

#2 - I'm also trying to find specific events to some key functions that are stock/default keyboard functions but don't seem to have any obvious event in the most recent FSUIPC list that I have (installed june 2016). I'm looking for the following:

A -- Alt+Enter (toggle full screen) and Alt (toggle main menu) event commands as well ones for,

B -- Starting engines 2, 3, and 4 which all seem to be a "shift+" type command but assumed there may be a single event for these instead?

C -- Opening secondary doors/exits. Again, this may be a shift+ only function but can events like this be coded into a mouse-click gauge to contain both the Shift+ or Ctrl+ if needed to effect the desired single end result? If so..please do tell!


#3 - I'd also like to use some custom tooltips which I've tried unsuccessfully, again likely due to not understanding the nuances between FS9 XML vs FSX XML vs P3D XML. Unfortunately the available tooltipIDs are limiting in many cases so I want to create some of my own.

Thanks for the help! (and please...in laymens terms lol)
 
Last edited:

tgibson

Resource contributor
Messages
10,886
Country
us-california
Doesn't the FS9 schema work in all FS versions? I haven't heard that it doesn't, and many people are still using the FS9 schema for its simplicity.
 

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
Tom, I was just going to suggest the same thing. I've never used anything other than the FS9 XML schema for all gauges, since they work in all ESP derived sim platforms.
 
Messages
17
Country
unitedstates
Is there a website or book which details the FS9 XML schema, how to learn, etc? If it is more universally accepted then that is what I would like to use. And if that's the case does this toggle script below look right? Do I also need to have a <value> section under the <select> ? (and if so what / how do I find what should be put there for each toggle I create?) And I'm still not getting the tooltips right with these depending on the XML schema. I've seen them expressed so many different ways I have no idea what to use in each case. Please tell me what I'm missing.


Code:
<Gauge Name="Engine Fail Toggle" Version="1.0">
   <Element>
      <Select>
         <Case Value="0">
            <Image Name="ENG1-FAIL_OFF_Icon.bmp" ImageSizes="180,50"/>
         </Case>
         <Case Value="1">
            <Image Name="ENG1-FAIL_ON_Icon.bmp" ImageSizes="180,50"/>
         </Case>
      </Select>
   </Element>
   <Mouse> 
      <TooltipText>Engine 1 Failure</TooltipText>
      <Cursor Type="Hand"/>
      <Click Event="TOGGLE_ENGINE1_FAILURE"/>
   </Mouse>
</Gauge>
 
Last edited:

tgibson

Resource contributor
Messages
10,886
Country
us-california
Yes, you need a Value section to alllow the Case Value lines to choose. They have to choose something.

If you are using an FS event for a switch, then choose the appropriate A: variable from the SDK listing. If not, create your own L: variable and use that. In this case you are using engine 1 failure as your event, so you would probably choose an FS variable like (A:ENG1 FAILED, bool), A:ENG FAILED:1, bool), or something similar (I don't know the exact format of the engine indexing). The FSX SDK says it's the second one. And it might use engine numbering of 0,1,2,3 so that would become A:ENG FAILED:0, etc. The FSX SDK says it's 1,2,3,4. All this can be determined by experiment if necessary, since the SDK is not always correct. Another option is (A:GENERAL ENG FAILED:index, bool), whichever works best in your instance.

So a good guess is:

<Value>(A:GENERAL ENG FAILED:1, booll)</Value>
 
Top