(FIXED 9.0) Sir Nukes Mod Support APIs
🟢 Updated this monthPreview

🔍 Analysis
- ✅ Updated 95 days after the latest game patch — actively maintained
- 🏆 #27 of 27 Modders Resources mods in this game by downloads
📋 About This Mod
Fixes underlying bugs that have been piling up over the years including but not limited to the "No Menus Registered" Bug. Uses the same Dependency ID therefore can replace the original Sir Nukes Mod Support APIs seamlessly
NO MENUS REGISTERED BUG HAS BEEN FIXED!!!!!
Sir Nukes/Chem O Dun you are free to use this to update Mod Support APIs and I will take this down with no protest once Mod Support APIs is updated
X4 Mod Support APIs
This is a collection of APIs developed to ease mod creation in a variety of ways. Components include:
Lua Loader API
- Support for loading lua files
- Note: not necessary as of X4 7. 5, but kept for legacy support of older mods.
Simple Menu API
- Create custom menus
Interact Menu API
- Add new context menu commands
Named Pipes API
- Inter-process two-way communication
- Build for Windows OS
- Requires protected UI mode be disabled
Hotkey API (uses pipes)
- Create new hotkeys
Time API (uses pipes)
- Real-time delays
Primary development is on github:
https://github.com/bvbohnen/x4-projects/tree/master/extensions/sn_mod_support_apis
Extended documentation on api usage:
https://github.com/bvbohnen/x4-projects/tree/master/extensions/sn_mod_support_apis/documentation
Latest releases (nexus may be slower to get updates):
https://github.com/bvbohnen/x4-projects/releases
Also available on steam workshop.
This mod has two parts:
1) The X4 extension includes all x4 plugins that other mods can call, and is necessary for any dependencies.
2) An optional external program acts as a host for the named pipes api, and supports the hotkey api. This is Windows-only for now, and needs to run in the background while X4 is open to support any hotkey mods (or other mods using the named pipes). A Python source code version can also be obtained from github and run directly by users with Python installed. See github documentation for version and package requirements for running from source.
FIXED BUGS:
-Savegame Load Options Menu Disappearance: Simple Menu API.
-
[]What it causes: Loading a saved game mid-session caused all registered mod option submenus to permanently disappear from the in-game Extensions menu because the registration cue only fired on the initial engine startup. (NO MENUS REGISTERED BUG!!!!)[/]
[]The fix: We added
<event_game_loaded/> and
<event_game_started/> triggers to
Reset_On_Lua_Reload alongside defensive blackboard cleanup so menus re-register cleanly on every save load.[/]
-
[]What it causes: When mods re-registered their options menus after a reload,
menu. Register_Options_Menu threw a fatal Lua exception (
"Submenu id conflicts with prior registered id"), crashing menu generation.[/
][]The fix: We replaced the hard error with an idempotent table update (
custom_menu_specs = args), allowing mods to safely update their menus without crashing the game.[/]
-
[]What it causes: If the player's
$simple_menu_args blackboard was empty or returned nil, iterating over it with
ipairs threw
bad argument #1 to 'ipairs' (table expected, got nil), permanently freezing Simple Menu command processing.[/
][]The fix: added defensive
type(args_list) == "table" checks and wrapped argument retrieval in
pcall so the command queue recovers gracefully when empty.[/]
-
[]What it causes: Querying
C. GetPlayerID() early or indexing it without stripping
ULL suffixes created malformed IDs, causing blackboard operations to fail or throw engine type mismatch errors.[/
][]The fix: implemented
GetLivePlayerID() with
pcallzero/nil guards, and
ULL string stripping before conversion, ensuring valid player component access on every frame.[/]
[*]What it causes: Invoking Userdata APIs with a nil owner or before
📊 Mod Details
- Game
- X4 Foundations Mods
- Author
- XSector4
- Version
- 1.95
- Downloads
- 1
- Endorsements
- 0
- Category
- Modders Resources
- Created
- 9/13/2026
- Updated
- 9/13/2026
🔧 How to Install X4foundations Mods
Download from Nexus Mods.
📖 Full step-by-step install guide for X4foundations →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for X4foundations commands, item IDs, and more.
Keep browsing — more X4foundations mods await