G Workaround and Right Click API
⚪ Last updated 2023Preview

🔍 Analysis
- 👍 0.0% endorsement rate
- 🏆 #2 of 114 User Interface mods in this game by downloads
📋 About This Mod
The Right Click API by morbideth hasn't been updated since 2. 00.
From the original post...
- You may NOT: Host these files elsewhere without either my permission or if I have been inactive on these forums for over a month.
Last forum post from morbideth was March 1st.
I am now enacting this clause.
I will only be maintaining this until morbideth returns and picks it back up.
v0. 41
- Right Click API updated for patch 6. 20.
v0. 41
- Right Click API updated for patch 6. 00.
v0. 40
- Right Click API updated for patch 5. 00.
v0. 39
- Right Click API updated for patch 4. 10.
v0. 38
- Right Click API updated for patch 4. 00.
- Reworked how you add actions and register custom sections for cosmetics.
-- Previous methods still work, but they are deprecated and will be removed later.
-- All actions are now added with
capi. RegisterAction(actiontype, actionFunction, post)
The first parameter 'actiontype' is exactly what it says on the tin. Previously, the mod had everything split up into their own tables, with individual functions for each of them to add and access, and thus was built into the function names. Now you just put it in as the first variable. It expects a string, so don't forget the quotation marks.
The final parameter 'post' is optional, and will add the new actions AFTER the base game's actions. (This mod always added things BEFORE the original ones. Now it just defaults to it, but you have more control over where it shows up.)
-- All custom sections are now registered with
capi. AddSectionMimic(mimic, id)
The first parameter 'mimic' is the id string of the original section you're trying to mimic. Currently, there are "main", "main_assignments", "main_assignments_subsections", "player_interaction", "selected_orders_all", "selected_orders", "trade_orders", "selected_assignments", "selected_change_assignments", "selected_assignments_all", "overrideorderoption", and "trade".
v0. 37
- Right Click API updated for patch 3. 20.
v0. 36
- Right Click API updated for patch 3. 00.
v0. 34
- Right Click API updated for patch 2. 60.
(Minor update. Only change made by 2. 60 is the 2 extra lines that exclude drones when giving orders. Shouldn't break anything even if you don't update.)
v0. 33
- Right Click API updated for patch 2. 50.
- Added a few API functions for cosmetic purposes.
(Allows you to register custom sections to count as one of the base sections so they get the same extra tooltips such as "selected unit" and "target name".)
G Workaround and Right Click API is a community-maintained update to morbideth's Right Click API for patch 6.20, adding new functions and reworking action registration. It's for modders who need a working right-click menu API in the current game version. The mod is a temporary fix until the original author returns.
✨ Key Features
📊 Pros & Cons
✅ Pros
- Keeps a popular API alive for the latest patch (6.20) — essential for modders who rely on it
- Adds cleaner, more flexible registration methods (capi.RegisterAction) with backward compatibility for old code
- Zero endorsements but 42k downloads — clearly a lot of people are grabbing this workaround
⚠️ Cons
- Temporary fix — maintenance stops as soon as the original author returns, so future updates are uncertain
- Only a workaround, not a full rewrite — underlying issues from the original mod may persist
- Potential compatibility risk with other mods that depend on the old Right Click API version
For modders and players who use mods that rely on the Right Click API and need it to work on patch 6.20. If you're a casual player who doesn't mod, this isn't for you. Skip if you're looking for a standalone UI overhaul — this is a backend API fix.
💡 Beginner Tips
- If you're a modder, update your mods to use capi.RegisterAction instead of the old per-table functions — the old methods still work but will be removed later.
- Use the 'post' parameter in capi.RegisterAction to control whether your actions appear before or after the base game's actions — this helps avoid UI conflicts.
- Since this is a workaround, keep an eye on the original author's return — if they come back, you may need to switch back to the official API.
📊 Mod Details
- Game
- X4foundations Mods
- Author
- morbideth
- Version
- 0.42
- Downloads
- 42,536
- Endorsements
- 0
- Category
- User Interface
- Created
- 5/30/2019
- Updated
- 9/23/2023
🧩 Commonly Used Together
Users add these mods to the same collections — a real compatibility signal, not an AI guess.
🔧 How to Install X4: Foundations Mods
Download from Nexus Mods.
📖 Full step-by-step install guide for X4: Foundations →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for X4: Foundations commands, item IDs, and more.
Keep browsing — more X4: Foundations mods await