Skip to content

UI / Lua

  • Globals β€” RegisterEvent, SetScript, CallEventScripts, CallUpdateScripts.
  • Helper API β€” 200+ functions in ui/addons/ego_detailmonitorhelper/helper.lua for menu authoring.
  • FFI bridge β€” C function calls from Lua.
  • SN Mod Support APIs β€” Simple Menu API, Simple Menu Options, Interact Menu, Hotkey API, Named Pipes, Time, Chat Window, Userdata.
  • β€œHow do I add a custom menu to the game?” β†’ Helper API β†’ Helper.registerMenu walkthrough.
  • β€œHow do I handle events from MD in my Lua code?” β†’ Globals β†’ RegisterEvent("MyMod.X", ...) example.
  • β€œHow do I add an option to the Extension Options menu?” β†’ SN APIs β†’ Simple Menu Options.
  • β€œWhy doesn’t utf8 work in my Lua code?” β†’ Gotchas β†’ utf8 is nil in X4 sandbox.
  • β€œWhy is the table widget ID, not the object?” β†’ Gotchas β†’ uitable semantics.