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
597 stars 146 forks source link

Support for ETS2 #513

Closed Araxion closed 7 months ago

Araxion commented 7 months ago

Hey, Is it possible to support ETS2? https://store.steampowered.com/app/227300/Euro_Truck_Simulator_2/ Thanks! :)

guilhermewerner commented 7 months ago

Hello, would you have an IP of a server for us to test? I tried to create one but I don't have the game.

Araxion commented 7 months ago

Hey, thanks, you can use this server 77.78.90.150:20600

Dne ne 28. 1. 2024 19:01 uživatel Guilherme Werner @.***> napsal:

Hello, would you have an IP of a server for us to test? I tried to create one but I don't have the game.

— Reply to this email directly, view it on GitHub https://github.com/gamedig/node-gamedig/issues/513#issuecomment-1913676099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5D7O6RHMKATZ2U5YKT73LYQ2HBPAVCNFSM6AAAAABCJRKJ2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGY3TMMBZHE . You are receiving this because you authored the thread.Message ID: @.***>

podrivo commented 7 months ago

Tried running tools/attempt_protocols.js on 77.78.90.150:20600 and 77.78.90.150, but it didn't work on any protocol.

Araxion commented 7 months ago

Found on another service supporting ETS2:

These games seem to use the Source protocol, so adding support for them should be quite easy.

connection_dedicated_port: 27015 query_dedicated_port: 27016

podrivo commented 7 months ago

It seems ETS2 works with Valve protocol. Got some servers to test on this list: https://gamemonitoring.net/euro-truck-simulator-2/servers

Tried running with valve protocol and it works:

gamedig --type protocol-valve 89.163.193.8:27016 --pretty

{
  "name": "!! Zockerbude -1- (German only 24/7)",
  "map": "/map/europe.mbd",
  "password": false,
  "raw": {
    "protocol": 17,
    "folder": "xjeEAd/V2y8=",
    "game": "Euro Truck Simulator 2",
    "appId": 227300,
    "numbots": 6,
    "listentype": "l",
    "environment": "l",
    "secure": 0,
    "version": "1.0.0.0",
    "steamid": "90180017515203591",
    "tags": [
      "ZABlAEsCAAA="
    ],
    "players": [
      {
        "name": "",
        "score": 0,
        "time": 2093.457763671875
      },
      {...}
    ]
  },
  "maxplayers": 8,
  "numplayers": 6,
  "players": [],
  "bots": [
    {
      "name": "",
      "raw": {
        "score": 0,
        "time": 2093.457763671875
      }
    },
    {...}
  ],
  "queryPort": 27016,
  "connect": "89.163.193.8:27015",
  "ping": 239
}