Creating Generic Instruments

The Rotary

  • The rotary can be used as a single image layer, but with dynamic lighting. Set it to no click, one image.
  • Rotary can be used behind an image to get “dynamic lighting” onto a background. (But – don’t make it too large – spot lights affect overlays UNIFORMLY. Burns VRAM. No shadows!)
  • Rotaries can be used with rheostats – set the rheostat to no -1 layer on top of the rotary with no click, customize hot spots. Same trick works with triggers.
  • Put a rotary (no click 1 phase) as a face plate over a pointer, but set the pointer itself to clip, to ensure that if the pointer exceeds its “masks” bounds it disappears.
  • Key frames must be continuous EXCEPT for rotaries – use to re-arrange enums. See Non-Monotone Key Frames.
  • Rotary key frame output < 0 means it disappears. Use for annunciators. Don’t need transparent frame. Save VRAM.
  • Rotary key frame > digits WRAPS. USe for repeating animation like trim wheel.

Using Rotaries With Plugins

You can use a rotary as a way to get “mouse clicks” in a plugin:

  • Set the rotary mode to “momentary”.
  • Create a custom dataref handler.
  • Your dataref’s “set” handler will be called once on a down click and once on an up click. The down click will have a value of the number of frames – 1, and the up will have a value of 0.

There is one complication with this method: if you are using the “get” function from your rotary to make the light flash, then you may not receive “set” messages, because the sim won’t write back to your dataref the same value you returned. (Thus if you use “1” for “lit”, you won’t get down-clicks in a 2-phase rotary.)

The solution: rotaries will modulo their number of frames. So for a two-phase rotary, return 2 & 3 from your plugin, instead of 0 and 1. The graphics will look the same, but you will still get writes of “0” and “1” on click.

Driving The Same Dataref With Multiple Rotaries

You can use multiple “push-button” rotaries to set the same dataref between two values. For example, say you want to have (3) push-buttons on your panel and they all set the dataref between zero and another value as follows:

  • Push-button #1 to drive the dataref to either 0 or 1,
  • Push-button #2 to drive the dataref to either 0 or 2
  • Push-button #3 to drive the dataref to either 0 or 3.

You would set the gen_rotary properties to Positions = “2” and Rotary Type = “Push Button”. Your graphic image should be designed with two (2) phases.

You should then set-up the key frame table as follows:

For Button #1:

Dataref Value ––––––––—–––– Image Number

          0                            0
          2                            0
          3                            0
          1                            1

For Button #2:

Dataref Value ––––––––—–––– Image Number

          0                            0
          1                            0
          3                            0
          2                            1

For Button #3:

Dataref Value ––––––––—–––– Image Number

          0                            0
          1                            0
          2                            0
          3                            1

When a button is pushed, X-Plane looks for Image #1 in the key frame table (the highest image for a 2-phase image) for that button and notes what the dataref should be set to by the associated “Dataref Value”. At the same time all other buttons with that dataref are set to zero.

All of the enum values for the dataref must be individually listed in the keyframe table (you cannot set up a range). The last key frame needs to be the “1” frame.

Glass vs. Translucent Glass

X-Plane has two modes of glass instrument lighting. Both take the light levels from an instrument light level rheostat and light the instruments overlays, ignoring spot lighting. The difference is in how they fade:

  • Glass instruments are opaque except for their alpha channel, drawing over what is behind them. As they get dark, they fade to black. Thus they can be used to form masks as well as glass instruments, but they will only appear to blend in over a pure-black background.
  • Translucent Glass Instruments draw additively – the alpha channel is not needed and has no effect. As they get “dark” they become more translucent – that is, they add less. They cannot be used for masks, but they will draw over any background, allowing for screen backgrounds that are not pure black.


  • Generic needles can be offset – save VRAM!
  • Needle can act as a heading bug, via offset and drag.


  • Rheostats can have overlays – save VRAM.
  • Set rheo step 2 to 0 to get incremental movement.


  • You can customize the colors of the pie – the-2 overlay image has 3 color swatches for the “green”, “yellow” and “red” tinges, which are chosen based on the dataref range. So you can pick any color for your pie.
  • If you ned more than 3 colors, make two overlapping pies and use show-hide to switch between pies at certain dataref ranges.
  • You can make a pie that is a thin line rather than thick by putting a black pie in front of the white pie, but give the black pie a smaller radius. After 930 you can simply use the offset parameter.


After X-Plane 930 groups can be hidden using filters. This can be used in a few ways:

  • If you need more filters (E.g. hide an instrument based on a number of conditions) simply put the instrument into a group – now you can filter the instrument or the group.
  • You can hide non-generic instruments by putting them inside a group.

Pointer Instead of Rolling For Tapes

gen_rolling is meant for a mechanical drum style instrument but it will not work if a large section of the “drum” is visible…thus while it seems that it should be usable as a tape, it is not. (The instrument does not work as a tape because not enough “extra” texture is provided at the top and bottom).

After 940 you can use a vertical pointer with a wrapping key frame table to make a looping tape.


  • Key frame tables can be clamped by doubling an output value, e.g. (-1,0) (0,0) (1,1) (2,1)
  • You can also clamp one side of a key frame table and wrap the other side. To do this you’ll need to repeat a value. For example: (0,0) (0,0) (100,100) will make a key frame table from 0->100 that can be wrapped at the top but will clamp at the bottom.
  • Facebook
  • Reddit
  • StumbleUpon
  • Twitter
  • Google Buzz
  • LinkedIn