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 external device (monitor, tablet or smartphone).
Note: lua module supports only Windows named pipes, so currently it will run exclusevly on this platform.
Install SirNukes Mod Support APIs
https://www.nexusmods.com/x4foundations/mods/503
Download SirNukes Python Pipe Server
https://github.com/bvbohnen/x4-projects/releases
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
Run SirNukes Python Pipe Server, it will create permissions.json
file.
Add X4 External App ID (ExternalApp
) to the permissions file:
{
"instructions": "Set which extensions are allowed to load modules, based on extension id (in content.xml).",
"ws_2042901274": true,
"ExternalApp": true
}
That's it, you should be good to go.
X4_Python_Pipe_Server.exe
file)x4_external_app.exe
).So there should be two console windows open - one from SirNukes Python Pipe Server and second from X4 External App. Don't close it during playing.
X4 External App will serve application on a local port. If default port (8080) is busy - a new, free one will be found.
App will automatically open in 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 console window.
There are two optional but quite useful X4 parameters working when game looses focus:
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 configuration screen press layout icon
It's possible to define number of columns and its width.
Also, by dragging widgets into approtiate 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 icon switches between different font sizes.
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: - setting window will open.
Possible settings for each rule include:
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 clog icon:
Setting window will open.
You can define and add your own goals. Just type it and press 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 few preselected icons. To do that, select "make featured" option from 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 player has a military or capital ship licence with a faction - it will be displayed as a green bar above faction name.
When faction relation changes, its name will blink and recent relation change value will be displayed in a top right of a faction name.
Widget settings alow to:
External App mod (MD + LUA) collects and sends data to SirNukes Pipe Server (Python) custom module.
Then this module creates another named pipe, allowing the (Node.js) server to read data from this pipe and serve it to a (Vue.js) SPA application.
A big word of praise for SirNukes - without his work this data communication wouldn't be possible.
SPA application was created with Vue.js (v3) using Bootstrap (v5) and all data is provided dynamically.
In order to build executable of X4 External App server yourself:
git clone https://github.com/mycumycu/X4-External-App.git
cd x4_external_app
npm install
copy .env.example .env
npm run package
Output executable will be created in dist
folder