--- title: ids - X4 identifiers summary: UniverseID, ComponentID, Lua component references and UI handles are not interchangeable. Representation depends on the API layer. Do not substitute a pointer address for an ID or lose a 64-bit ID through number conversion. section: reference kind: guide status: reference updated: 2026-10-26 tags: ["API","X4"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/","https://www.lua.org/manual/5.1/manual.html","https://luajit.org/ext_ffi_api.html"] --- ## Meaning UniverseID, ComponentID, Lua component references and UI handles are not interchangeable. Representation depends on the API layer. Do not substitute a pointer address for an ID or lose a 64-bit ID through number conversion. ## Example ```lua -- Keep the representation required by the receiving API. -- Convert only through a documented engine conversion. ``` **What happens:** The comments explain a rule; there are no executable actions. This fragment does not print or write a log message. The values shown are the expected results of the example. ## Methods and related calls [API reference](wiki:api-index).