External app for X4 Foundations game.
Shows real-time logbook entries, mission offers, currently active mission details and player information.
Application is served on a local port, so it can be run locally or on multiple network devices at once.
Created to be displayed on an external device (monitor, tablet or smartphone).
Note: lua module supports only Windows, so currently it will run exclusevly on this platform.
-
Install Http client library for X4 Foundation mod by djfhe
https://github.com/djfhe/x4_http
Since this mod is still in beta, you need to navigate to the main page of the repository. Above the list of files, click Code and Download ZIP.
Then extract contents of the zip file to\extensionsdirectory - and renamex4_http-mainfolder todjfhe_http.The folder structure should be:
\extensions \djfhe_http \content.xml \... -
Install X4 External App mod
https://www.nexusmods.com/x4foundations/mods/818 -
Download X4 External App server
https://github.com/mycumycu/X4-External-App/releases -
Disable
Protected UI Modein game's Settings > Extensions menu.
That's it, you should be good to go.
- Start the X4 External App server (
x4_external_app.exe). Don't close it during playing. - Start the game and load your save file.
X4 External App will serve application on a local port. If default port (8080) is busy - a new, free one will be found.
In case of used port different from 8080 - also update the port setting the mod config file located in
\extensions\mycu_external_app\ui\config.lua
App will automatically open in the default browser.
If you want to access it from a local network - change localhost to local IP address of a machine running X4, e.g. http://192.168.1.120:8080.
Application will detect and output the exact network address in a console window.
- Configure your X4 to run using proton (Steam Compatibility mode)
WARNING For some reason X4 won't sync saves between windows and linux using Steam cloud.
I reccommend temporarely disabling Steam Cloud for X4, copying the save files over from your linux folder:
~/config/EgoSoft/X4/to windows folder~/.steam/steam/steamapps/compatdata/392160/pfx/drive_c/users/steamuser/Documents/Egosoft/X4/. Latter folder might not exists berfore you first launch X4 in compatibility mode. Once you've done this and launched the game once, you can enable Steam Cloud sync again.
- Start the X4 External App server (
x4_external_app_linux). Don't close it during playing. - Start the game and load your save file.
- Open http://localhost:8080/ in your browser.
There are two optional but quite useful X4 parameters working when game looses focus:
- -nosoundthrottle makes game keep playing music
- -nocputhrottle game usess full CPU
Thanks to it interacting with external monitor feels like a part of the game.
You can apply one or all of them: https://help.steampowered.com/en/faqs/view/7D01-D2DD-D75E-2955
User can freely define app layout. To open the configuration screen, press the layout icon
It's possible to define number of columns and its width.
Also, by dragging widgets into appropriate columns, one can set their order.
If the "limit widget heights" option is checked - each widget can have "max height" property defined - application will then automatically adjust the height of the widget within the viewport height.
All changes made are stored automatically.
Clicking 
You can export and import the application's settings.
Where to find it:
- Open the layout configuration screen by clicking the layout icon
.
- In the layout settings, find the "Manage settings" / "Settings" section and use the
Export settingsandImport settingsbuttons.
Export:
- Saves all application settings into a
x4ea-settings.jsonfile. - The file is standard JSON and can be backed up or moved to another device/browser.
Import:
- Pick a previously exported
x4ea-settings.jsonfile. The app validates the file before applying it. - If valid, the import will overwrite all current settings and the app will reload to apply them.
Notes and troubleshooting:
- Import will replace all existing settings. Consider exporting first to create a backup.
- If import fails, ensure you are using a file exported by this app and that it wasn't manually edited.
App UI supports unrestricted filtering the latest logbook entries.
You can also define phrases that should be excluded or feartured in logbook panel.
To define such phrases, click on clog icon: 
Possible settings for each rule include:
- on/off toggle - defines if a certain rule is enabled
- phrase - phrase to look for. All phrases are case-insensitive.
- type - excluded means that an entry containing such a phrase will not be displayed, while highlighted means that it will be marked with a color.
- blink - makes entry's title blinking
- title only - when disabled, search will consider also message text and a faction name
Important logbook messages (e.g. property under attack or being destroyed) will automatically blink catching attention.
All changes are stored automatically.
Mission offers can be filtered similarly to logbook entries.
Also, you can define which mission difficulties should be displayed.
To do so - just click on the clog icon:
Setting window will open.
You can define and add your own goals. Just type it and press the enter key (or dedicated button). Each goal can be moved higher or lower in priority or even moved to another list by dragging.
You can also highlight selected goals with one of a few preselected icons. To do that, select the "make featured" option from a goal (three dot) menu. The exclamation icon will appear. To switch it, just click on the icon until desired one appears.
After completing a goal and making it "checked" - it will fade out and will be removed in a few seconds. Unchecking the goal within that time cancels the removal operation.
Shows all factions and their relations with the player.
If a player has a military or capital ship licence with a faction - it will be displayed as a green bar above the faction name.
When a faction relation changes, its name will blink and the recent relation change value will be displayed in the top right of a faction name.
Widget settings alow to:
- exlude factions from the grid
- exclude certain relation levels
- hide recent relation changes
- hide licence indicators
External App mod (MD + LUA) collects and sends data to (Node.js) server that serves it to a (Vue.js) SPA application.
A big thanks to djfhe for creating Http client library mod that allows communication between game and REST server.
SPA application was created with Vue.js (v3) using Bootstrap (v5) and all data is provided dynamically.
In order to build the executable of X4 External App server yourself:
- Clone this repo with the command:
git clone https://github.com/mycumycu/X4-External-App.git - Change dir:
cd x4_external_app - Install packages:
npm install - Create .env. file from existing .env.example file
copy .env.example .env - Build exe with:
npm run package:win(if windows) ornpm run package:linux(if linux)
Output executable will be created in \dist folder






