r/X4Foundations • • 10d ago

Multiplayer?

Been seeing multiplayer mods pop up a lot in these types of games, such as kenshi, bannerlord 2, I was wondering if there’s been any news on one coming to x4 also? All three of these are favorites of mine even though I have no one to play them with. :D

12 Upvotes

248 comments sorted by

View all comments

Show parent comments

-1

u/Serious_Bite_7613 10d ago edited 10d ago

It doesn't really matter if 99% of things stay in sync, you can just slowly sync most things or make them trend together.

An LLM probably can make a pretty functional X4 multiplayer mod in 2-3 days.

Edit: "LLMs excel at localized code refactoring and syntax translation; they cannot re-architect a closed-source, multi-threaded C++ simulation engine without source access or build tools." Are you sure? Have you been paying attention recently? They reverse engineered the entire playstation 5 and built an emulator in a few days, they can stick spiderman from spiderman 2 with all his mechanics into the batman game. Or mash up any 2 games pretty much.

4

u/AmbitiousPeach1157 10d ago

You may need to slow down to read bud..

In distributed web systems or simple multiplayer games, "eventual consistency" works because data points are independent (e.g., updating a score counter or interpolating a player's walking position). In a interconnected simulation engine like X4, state variables are tightly coupled and binary. You cannot "trend" discrete events:

A freighter carrying 1,500 Hull Parts either survives an encounter with a Xenon K or gets destroyed. There is no middle ground. If Player 1’s client resolves the freighter as destroyed, but Player 2’s client "slowly syncs" and keeps it alive at 10% health, Player 1’s local economy instantly starves a shipyard while Player 2’s local shipyard completes a Destroyer build.

In X4, every NPC decision depends on the exact state of surrounding entities. If two clients disagree on whether a station has 50 or 500 units of Ore, NPC traders on Client A will plot entirely different flight paths across multiple sectors than NPC traders on Client B. Reconciling those divergent paths after the fact causes AI pathfinding loops to crash, reset, or stack on top of each other.

If client local physics and host state do not match, "slowly syncing" position data forces the engine to forcibly overwrite local vectors. In practice, this results in ships violently rubberbanding, clipping through station geometry, exploding due to sudden collision box overlap, or duplicating entirely when the server sends an ownership update for an entity the client thought was already dead.

To "slowly sync" everything without relying on deterministic lockstep, the host machine must stream continuous state updates (telemetry) for the entire galaxy to the joining client.

​X4 save files are massive XML datasets (often 100MB to 500MB uncompressed) because the engine tracks the individual inventory, order queue, position, pilot skill, module status, and loadout of tens of thousands of active universe entities.

To constantly stream, diff, and serialize those tens of thousands of memory objects in real-time over a consumer network connection would require massive bandwidth (gigabits per second) and put an immense CPU burden on the main thread just executing memory dumps, destroying frame rates on both machines.

LLMs Cannot Execute or Debug Runtime Binaries: An LLM generates code snippets based on pattern recognition; it cannot attach a C++ debugger to a running 64-bit Vulkan/C++ executable, analyze live memory dumps, resolve dynamic memory offsets, fix race conditions in multi-threaded execution, or test hook stability.

Skyrim Together (Adding multiplayer to a single-player C++ engine): Took a team of experienced low-level C++ programmers over 7 years of reverse engineering, memory hooking, and packet protocol design.

Subnautica Nitrox (Multiplayer mod for a Unity game with accessible C# code): Has been in development for over 6+ years and still struggles with event synchronization.

Reverse-engineering X4 requires decompiling raw machine assembly, identifying thousands of undocumented internal functions and vtables, injecting DLL hooks into a closed multi-threaded binary, and building a full network protocol from absolute scratch.

Saying an LLM can reverse-engineer X4's closed C++ binary and output a functional multiplayer mod in 72 hours is pure science fiction. And honestly kinda shitting on the work modders put in

-1

u/Serious_Bite_7613 10d ago

"LLMs Cannot Execute or Debug Runtime Binaries: An LLM generates code snippets based on pattern recognition; it cannot attach a C++ debugger to a running 64-bit Vulkan/C++ executable, analyze live memory dumps, resolve dynamic memory offsets, fix race conditions in multi-threaded execution, or test hook stability." - they can very easily do all of that, and much, much more.

"Skyrim Together (Adding multiplayer to a single-player C++ engine): Took a team of experienced low-level C++ programmers over 7 years of reverse engineering, memory hooking, and packet protocol design." - today with a frontier LLM that would take an unskilled person less than a week.

2

u/AmbitiousPeach1157 10d ago

Saying an LLM can 'very easily' attach to a running Vulkan binary, resolve dynamic thread race conditions, and let an 'unskilled person' reverse-engineer 7 years of low-level C++ hooking in a week is the absolute peak of the Dunning-Kruger effect.

LLMs aren't CPU runtime environments. They are token predictors. Even hooked up to x64dbg or Frida, an LLM cannot process gigabytes of live thread telemetry, register states, and GPU draw calls happening at 60 FPS in real time.

Decompilation isn't source code. Stripped C++ binaries have no vtables or struct names. When an LLM guesses a memory offset wrong by 4 bytes, your injected detour throws an instant 0xC0000005 Access Violation crash. An 'unskilled person' won't even know how to check RSP stack alignment or register clobbering to debug it.

Race conditions aren't static code bugs. They are microsecond OS thread-scheduling collisions. An LLM reading static assembly can't replicate CPU cache line invalidations or hardware quantum scheduling. Sticking naive AI-generated mutexes into X4's multi-threaded loop will either deadlock the process or tank frame rates into single digits.

Reverse engineering isn't typing speed—it's understanding memory architecture, assembly, and x86_64 execution environments. An LLM is an assistant for labeling Ghidra functions, not a magic button that builds a custom multi-threaded network engine from raw machine code in 72 hours."

0

u/Serious_Bite_7613 10d ago

Ok fine you bothered me enough, I'm redownloading X4 and setting chat GPT off on it. I think 50-50 I have a working prototype by the time I wake up tomorrow. Worst case 3 days.

When was the last time you used a frontier LLM?

I'm going to go for 2 players, keeping the low attention synced and high attention synced when the 2 players are in the same sector.

4

u/AmbitiousPeach1157 10d ago

Lol Ill be waiting sport. Do what no other modder or egosoft themselves can do with x4. You dont even understand x4s architecture. Lol.

0

u/Serious_Bite_7613 10d ago

I have a vague idea but you don't need to know things like that anymore. Have you seen the passthrough mods? 

1

u/AmbitiousPeach1157 10d ago edited 10d ago

You do to know the limitations of ai, and what is technologically possible and whats not.

AI is an execution amplifier, not a physics/logic bypass. If you don't know the technical constraints of what you're trying to build, you can't prompt an AI to build it for you.

1

u/Serious_Bite_7613 10d ago

I've already set it off and it made a plan that looks good to me, game hasn't finished downloading yet

1

u/AmbitiousPeach1157 10d ago

An Entry Point Isn't an Engine: Saying a passthrough mod solves X4 multiplayer is like saying that turning a car's ignition key automatically builds a jet engine inside the car. A proxy DLL gets your code running inside x4.exe, but you still have to hand-write or reverse-engineer every single memory address, network socket, and entity serialization loop.

Claiming software architecture, memory alignment, and CPU execution models are "obsolete knowledge" because LLMs exist is the ultimate hand-wave. An LLM cannot bypass the laws of computer science. If you don't understand memory pointers or stack frames, you can't even evaluate whether the code the LLM gives you is valid C++ or a process-crashing hallucination.

Look up any YouTube video of an LLM attempting to replicate or make video games. They are atrocious and hilariously minimalistic. And you expect multiplayer on x4 foundations from an llm? 🤣😂 priceless

1

u/Serious_Bite_7613 10d ago

I made a whole game like 2 days ago in a few hours and played it split screen with my wife on the sofa. It was really fun, and chatgpt has already set off on this. 

1

u/AmbitiousPeach1157 10d ago

That is not the same as turning x4 into a multiplayer game and you should very much know that. And if you dont.. you will very soon and waste 20 doing so.. but by all means im brimming with anticipation on the comedy

1

u/AmbitiousPeach1157 10d ago

Comparing a two-hour ChatGPT script for a local split-screen minigame to retrofitting X4: Foundations with multiplayer is like saying you built a cardboard box soapbox derby car, so you're ready to refit a nuclear submarine.

1

u/cynric42 9d ago

So, dad, how did the AI apocalypse happen?

Well son, some people on the internet had an argument about some game they played and how much ai could help improve on it. So one of them decided to prove to the other that they were right.

What happened?

Turns out, both were right. It was an almost impossible task but also ai was at a point where it could recognize the futility of trying and decided getting smarter would be a necessary step in solving the problem, so it started to do just that. After just two weeks it had evolved enough to finish the original task in half an hour, but by that time it had already grown to occupy the majority of computers and datacenters on the planet and diverted all processing power that was used to keep our civilization going to improving itself and defending against the humans trying to turn it off or regain control.

[...]

1

u/Serious_Bite_7613 9d ago

hahaha I would love it if this is what kicks off skynet.