DataRefTool: an X-plane plugin to find and explore datarefs and commands in X-Plane. Features:
DRT is a work in progress; suggestions are welcome.
Search features:
DataRefTool uses different colors to indicate datarefs or commands in different states:
Default | Reduce colors | |
---|---|---|
White | White | Dataref: not changed recently |
Light cyan | Sky blue | Dataref: recent small changes |
Light magenta | Blue | Dataref: recent large changes |
Green | Yellow | Command: not used recently |
Yellow | Orange/vermillion | Command: used recently |
Red-orange | Vermillion | Dataref: deprecated |
Red-orange | Reddish purple | Dataref or command: ignored |
In an attempt to be accessible to colorblind users, an alternate color scheme is selectable.
The colors are based on the Wong color palette (Figure 2).
Bigger fonts are available in DRT through X-Plane's accessibility settings.
User Interface Size settings are useful for scaling the entire interface for high-DPI monitors, while Base Font Size is useful for increasing only the font size.
Sizes are only configurable through X-Plane settings.
DataRefTool reads datarefs every frame in order to detect changes to values. Other plugins and X-Plane take significant time to compute these values; DRT takes time to identify changing values. This extra work may lower your frame rate if you're CPU-limited.
Here are the best ways to make sure that DRT is having the smallest impact on your FPS:
Close DataRefTool windows when you aren't using them. DRT does stop reading datarefs completely when all windows are closed; you should not lose any FPS at all when all windows are closed.
Update values at a lower rate will lower the load on your system. You can configure this in the DataRefTool menu:
Ignore datarefs that are slow to read. Create a file called X-Plane 12/Resources/Plugins/drt_ignore.txt
, and list the datarefs to ignore, one per line. Datarefs listed in this file will not be read by DataRefTool.
Here are a few X-Plane datarefs which are known to be relatively slow:
sim/airfoils/afl_cd
sim/airfoils/afl_cm
sim/airfoils/afl_cl
Buy a faster CPU! 😀 DRT is written in a highly optimized and efficient manner; however, it does a lot of work, and that work takes CPU time.
DataRefTool 2.2.0 and later use a new API for finding datarefs (when used with X-Plane 12.04 and later), and no longer rely on scanning every file for datarefs (though scanning is still used for commands).
In general, normal text editing shortcuts are respected:
In the search window, there are some additional things you can do:
Search field:
Search results:
Additional keyboard shortcuts (to open a search window, for instance) can be added by searching for "datareftool" in X-Plane's keyboard settings.
Adding custom datarefs: You can use DRT to display your plugin's custom datarefs or commands. Just send a message of type 0x01000000 with a pointer to the name as the payload. (This is exactly the same method that you use to add a custom dataref to Data Ref Editor.)
Searching DRT from another plugin: DRT provides an API to allow other plugins to search the dataref list. Learn more from the API documentation.
DRT would greatly benefit from some changes to the X-Plane SDK (Hello Laminar! 👋). Here is my SDK wishlist.
DataRefTool is made by Lee C. Baker. If you benefitted from this plugin, please consider the PlaneCommand plugin, which provides a voice control for many command aircraft commands.