r/Offworld • u/Due-Improvement4160 • Jul 21 '25
[Project Announcement] Reverse Engineering Offworld Trading Company's Dead Game Server
Hey everyone! I've been deep-diving into Offworld Trading Company's networking code and discovered why multiplayer lobbies have been broken lately.
TL;DR: The game server is dead and I'm building a replacement
------- VIEW THE GITHUB REPOSITORY HERE -----
What I Found:
- OTC uses a hybrid system: Steam lobbies for invites + a separate SFS2X server for actual gameplay
- The SFS2X server at 3.90.142.156:9933 appears to be down/unreachable
- When you hit "Create Lobby", Steam creates the lobby (which works), but the game can't create the actual gameplay room on the dead server
- This explains why you see Steam activity but lobbies don't function properly
The Technical Stuff:
- Game uses SmartFoxServer 2X with a custom "BlueBox" HTTP protocol
- All lobby settings (map, players, rules) get serialized into a 21-element array and sent to the server
- Once in-game, it switches to Unity P2P networking (which still works)
- The missing piece is just the lobby/matchmaking server
Current Status:
- ✅ Fully reverse engineered the network protocol and lobby creation flow
- ✅ Documented all message formats and data structures
- 🔄 Building a compatible replacement server
- ❓ Need testing once it's ready
What I Need:
- People willing to test the replacement server when it's ready
- Anyone with networking/server experience who wants to contribute
- Confirmation that others are seeing the same lobby issues
The good news is this should be totally fixable since the P2P gameplay code is intact - we just need to replace the lobby server component.
I'm relatively new to the realm of reverse engineering like this, but I've done enough due diligence where I think I'm comfortable announcing this project as possible. I'll update this periodically as I make progress! I fully intend to release all of the documentation I'm building up to the public shortly, I'll be creating a Gist with my findings ASAP.
As a follow up comment, this likely will require a Unity DLL patching framework to alter the game DLLs to point to a different lobby server. I'm eying up BepinEx as a strong candidate.
I do not intend a 1.0 release of this to mirror Tachyon functionality. My success metric is standard custom lobbies. That being said, Mono games are relatively easy to disassemble, but I see they're using DynamoDB as a leaderboard store which I really don't care to pay for myself. (Suppose it could be baked into the lobby server system with some other persistence method. We'll see)
(Juggling this with a day job)
Edit: For the technically inclined, the server needs to implement SFS2X room management over HTTP with pipe-separated BlueBox commands. The hard part was figuring out the 21-element lobby settings serialization format - that's done! 🎉
Edit (July 23, 2025): Updated with the Github Alpha link of the work in progress
17
u/ketralnis Jul 21 '25 edited Jul 21 '25
Have you tried contacting Stardock about it? They might be willing to ship one last update to allow specifying the lobby server URL so you don't have to do the DLL patching
2
u/Due-Improvement4160 Jul 24 '25
I've updated the original post with the github page with the work done so far in it. It's a little messy since I've been in R&D mode, but I'm starting to clean it up so it feels like a proper open source project. There's a lot of experimental unused methods. When we start to enter a Beta phase I intend to have this significantly cleaner, but I'm running into issues responding to the handshake correctly.
I see a valid connection occurring, and Offworld is recognizing the Client ID which I provide back to it as it gets used in subsequent requests to the server, but the login handshake is being problematic. I've parsed it out correctly (maybe not as efficiently as I can, I'll fix that later) but responses don't seem to get acknowledged.
I'm aware that I likely could simply dig into SFS2X resources, which I am glancing at as a sanity check, but I intend to entirely avoid using their DLLs in this implementation due to the licensing they have. I do not care to use 90% of what SmartFox provides. I am simply looking to implement the MINIMAL spec possible to be compliant with the features Offworld Trading Company uses.
https://github.com/VibrantClouds/TheCosmicExchange
2
u/shibiku_ Jul 22 '25
How did you figure out that much already? Is the code accessible or just by wiresharking current activities and requests?
2
u/Blues_OTC Aug 29 '25
Hey there! I hadn't realized this project was going on, and hopefully it won't be necessary soon, but if this becomes necessary again at some point and for some reason I can't implement an official fix, please feel free to contact me with any questions.
For what it's worth, the NAT facilitator and SFS2X implementation you describe is quite out of date at the point (since replaced with the discontinued UNET-based networking system and soon by Relay/UTP). It could be functional if you reimplement everything with an older version of Offworld as a base, but I'm not sure I'd recommend pursuing this direction. Even if it does have the advantage of not relying on any Unity-run services, the only advantage is holds over the v1.21.27686 Steam beta would be support for Epic.
10
u/archmage24601 Jul 22 '25
You are a saint.
Stardock needs to think about the longevity of the game. Ideally, they add LAN.
3
u/Craid20 Jul 22 '25
I hope this goes well I dont know much about coding or what is needed to work on these but if you need players i can come help.
2
u/ztaylor16 Jul 26 '25
id love to help test! Ive been out of the loop for a long time now, why did the game die in the first place? the devs seemed to be onboard pushing updates and then just went cold turkey all of the sudden. The game has great potential
1
u/james_hamilton1234 Jul 24 '25
You are the GOAT for this
1
u/Informal_Dream7239 Jan 21 '26
Late to the party but, as a not so technically inclined person, is this project something that will possibly allow me to play OTC multi-player and earn the Steam achievements, or it's just a lil side project to keep the game going if support ends for it totally? Or just a fun project to understand how it works? Thanks!