XLua2 SDK Documentation


The X-Plane Plugin SDK (Software Developers Kit) is a combination of code, DLLs, and documentation that allow programmers to write additions that work inside X-Plane without modifying X-Plane or having a copy of X-Plane’s source code.

The Plugin SDK allows a programmer to do a number of things, such as draw inside X-Plane’s window (in the cockpit or the 3‑d world), react to keystrokes, put up floating windows, and alter the way the simulator works in a few ways. The programmer can also do anything else a program can do (save and load files, send data over the network, etc.)

The Plugin SDK specifies a way for plugins to talk to X-Plane. It also provides a DLL that augments X-Plane to talk to plugins that follow that specification. The Plugin SDK will contain example code that developers can copy to write plugins, utility routines to make writing the plugins easier, and a test application to make sure plugins work.

This reference covers the SDK as accessed through XLua, Laminar Research’s Lua scripting layer for X-Plane. XLua exposes the same underlying SDK functions and data, but uses Lua syntax and conventions rather than C/C++. If you are already familiar with the C-based SDK, most concepts carry over directly — the function names, parameters, and behavior are the same — though a handful of things work slightly differently in the Lua environment. If you are new to X-Plane plugin development, Lua is a great starting point: scripts are shorter, easier to read, and require no compiler.