Over the last two weeks a side project was the integration of LLM Large Language Model into the game.
I could test Qwen-3.8-27b-Q8 and have very good results.
It will create a new AI Board Computer section into the Info Menu on the Map.
With it you can hook it up to a local AI Model or to a model served over https.
You can chat with it ingame and over Tool calls it can check infos of your ship, wares needed for stations etc.
I have not yet tested all possible functions so it is in Beta status.
Tested with ship load-out, building plan and remaining resources.
When all works it will calculate per tool call all offers and give you feedback what sector and what station is most profitable.
Also you could ask, "I am in Sector Heretics End, what is the nearest abandoned ship?" If there are ships visible in sensors it should answer.
If i am able to, i plan to integrate a tts function (Text to speech) So it answers in voice.
Also i i am able to, i plan to integrate a speech to text function (whisper most likely).
So you can talk in real voice to the Ai.
My Vision is press a button (push to talk) say something like "Computer, i have 4680 Energy cells in the cargo where is the place to drop it of for the most profit?"
This Mod is in Beta stage and open source.
So please feel free to use it fully, expand on it or completly rework it and make it better.
No issues with me there.
There will be in the Main Menu some AI buttons, this are there for bug fixing and early reverse engineering the right tool call needed.
I leave it there for the mean time.
There is a Windows and a Linux Version.
Since i use Linux only, i could not test Windows.
In the x4llm folder of the extensions folder is txt file "x4llm_settings.txt" Here you can set the API of your Model, some LLM settings like Temperature and a Systemprompt.
The Systemprompt is for example how to behave and word the answers.
You want a sarcastic Board Computer a Emo Girl Computer or something else? You can write there how it should behave.
https://github.com/Neresco/x4llm_basic_ ... nd_Windows
Have fun experimenting.
X4 Mod LLM Integration
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
Neresco
- Posts: 30
- Joined: Tue, 19. Nov 13, 01:10

X4 Mod LLM Integration
Client: CPU: Ryzen 7 5800x3d, GPU: 4x AMD 9600 XT 16GB, RAM: 128GB DDR4
Host: CPU: Ryzen AI MAX+ 395, GPU 8060x + 7600XT 16GB over NVME to Occulink, 128GB LPDDR5
Host: CPU: Ryzen AI MAX+ 395, GPU 8060x + 7600XT 16GB over NVME to Occulink, 128GB LPDDR5
-
AriaHandler69
- Posts: 4
- Joined: Fri, 28. Aug 26, 20:59

Re: X4 Mod LLM Integration
Interesting project. I've been working on something in a broadly similar area, although from quite a different angle.
Mine is centred around adding a persistent AI companion/adviser to X4. The intention isn't to integrate a general-purpose LLM or chatbot that can discuss things outside the game; everything is deliberately bounded around X4, the player's universe and information the companion should reasonably have access to. The finished mod itself is controlled through scripted systems within X4 and runs as a normal game extension, rather than being connected to an external LLM during gameplay.
The companion has its own introduction and progression and is intended to provide contextual observations and useful information about things such as the player's empire, logistics, economy, fleets and significant events. I'm also experimenting with voiced interaction and giving it a visual presence through X4's existing communication systems.
The initial introduction/discovery sequence is now getting close to completion, with full dialogue, scripted missions and custom use of vanilla assets. That sequence will eventually lead into unlocking the companion's in-game analysis and monitoring capabilities as part of its progression, rather than those functions simply being available from the outset.
Obviously a different approach to what you're doing here, but there's some interesting overlap in the sort of information we're both trying to expose to the player. It's good to see someone else experimenting in this area, and I'll be interested to see how your project develops.
Mine is centred around adding a persistent AI companion/adviser to X4. The intention isn't to integrate a general-purpose LLM or chatbot that can discuss things outside the game; everything is deliberately bounded around X4, the player's universe and information the companion should reasonably have access to. The finished mod itself is controlled through scripted systems within X4 and runs as a normal game extension, rather than being connected to an external LLM during gameplay.
The companion has its own introduction and progression and is intended to provide contextual observations and useful information about things such as the player's empire, logistics, economy, fleets and significant events. I'm also experimenting with voiced interaction and giving it a visual presence through X4's existing communication systems.
The initial introduction/discovery sequence is now getting close to completion, with full dialogue, scripted missions and custom use of vanilla assets. That sequence will eventually lead into unlocking the companion's in-game analysis and monitoring capabilities as part of its progression, rather than those functions simply being available from the outset.
Obviously a different approach to what you're doing here, but there's some interesting overlap in the sort of information we're both trying to expose to the player. It's good to see someone else experimenting in this area, and I'll be interested to see how your project develops.
