gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
606 stars 148 forks source link

Support Satisfactory game #442

Open Maxence1502 opened 9 months ago

Maxence1502 commented 9 months ago

Hello,

Is it possible to support this game : https://store.steampowered.com/app/526870/Satisfactory/

Thank you :)

CosminPerRam commented 9 months ago

Hello, please use the issue templates. It seems that Satisfactory doesn't support valve server queries, but I've found a mod thats made for this: FicsIt Remote Monitoring. I've seen on the steamdb page of the dedicated server that it uses Epic Online Services, it could be queried that way, but finding the necessary keys for the epic protocol is tricky here.

Maxence1502 commented 4 months ago

Hello, there is still no way without adding a mod ?

CosminPerRam commented 4 months ago

None that I know of at least unfortunately :/

Maxence1502 commented 2 weeks ago

A major update to Satisfactory has been released today, and the game is now in 1.0.

Maybe the protocols have changed, do you know if we can make it compatible?

CosminPerRam commented 2 weeks ago

From their patchnotes:

We have added support for an HTTP API, so it is now possible to create applications to communicate with the dedicated server for those who are interested in developing tools for it :)

And upon starting a dedicated server (hope it means what I think):

PacketHandlerLog: Loaded PacketHandler component: FactoryDedicatedServer.DSQueryHandlerComponentFactory (DSQueryHandlerComponent)

So I guess its possible, I'll look into it later on.

CosminPerRam commented 2 weeks ago

From their Discord server: image

I unfortunately do not own the game.

Destarianon commented 2 weeks ago

DedicatedServerAPIDocs.md Here is a reference to the API documentation.

It looks like there is a UDP endpoint that doesn't require any kind of authentication and provides an always available status response.

It also has a QueryServerState API endpoint which returns more detailed information.

Maxence1502 commented 2 weeks ago

Let me know if you need help for testing or debugging in game

Smidy13 commented 1 week ago

Investigated this and will look at contributing. There are two requests needed, one to get a authentication token and then the second to get the server state. Making some notes here and will continue tomorrow.

First Request to Get Authorization Token

> POST https://localhost:7777/api/v1
> Content-Type: application/json
> data {"function":"PasswordlessLogin","data":{"MinimumPrivilegeLevel":"Client"}}

This will return a JSON with an authenticationToken.

Second Request to Get Server State

> POST https://localhost:7777/api/v1
> Content-Type: application/json
> Authorization: Bearer **authenticationToken**
> data {"function":"QueryServerState","data":{"clientCustomData":{}}}

This will return a JSON with serverState including activeSessionName, numConnectedPlayers, playerLimit, techTier, activeSchematic, gamePhase, isGameRunning, totalGameDuration, isGamePaused, averageTickRate and autoLoadSessionName.

xCausxn commented 6 days ago

Looking forward to seeing the PR and getting another contributor to GameDig 👍