How to use it#

Expand a category and library or subsystem in the sidebar, then select a name. Each entry has a dedicated page. Search opens the same page. Catalogue rows show return types; established types link to explanations.

Start with types, results and methods. unknown means an unestablished contract; none means no direct return.

Categories#

Area Open
X4 Lua UI calls Lua API
C declarations, parameters and returns FFI
XML actions and constructs MD / AI
Event conditions and filters MD / AI events
Lua UI events Lua events
Helper and menu methods UI Helper
Base functions and libraries Lua and LuaJIT

This is a growing reference of known interfaces, rather than the complete X4 SDK. Evidence limits explain what a declaration establishes.

First calls#

AddUITriggeredEvent sends to MD, RegisterEvent installs a Lua callback, and GetComponentData reads requested component fields.

First MD elements#

event_ui_triggered receives a UI event, raise_lua_event sends a value to Lua, and set_value writes a variable. MD has its own types and expressions.

neededbuildresources illustrates an MD property and a build task resource shortage table.

Continue with practice#

X4 code basics, Lua / MD bridge, changing properties, creating UI.