Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View Dedicated Gportal server #510

Closed
saki-xhan opened this issue Jan 24, 2024 · 10 comments
Closed

View Dedicated Gportal server #510

saki-xhan opened this issue Jan 24, 2024 · 10 comments

Comments

@saki-xhan
Copy link

Hi,
I tried to get the number of players connected on a Conan Exiles and Palworld server but without success because they are dedicated Gportal servers. This gives me server not found. But the servers are online and full of players.

@podrivo
Copy link
Contributor

podrivo commented Jan 24, 2024

Hello @saki-xhan!

Do you mind providing examples of dedicated Gportal servers, for Conan Exiles and Palworld? Thank you!

@saki-xhan
Copy link
Author

https://www.battlemetrics.com/servers/palworld/25156030

176.57.140.222:30800

@guilhermewerner
Copy link
Contributor

guilhermewerner commented Jan 24, 2024

https://www.battlemetrics.com/servers/palworld/25156030

176.57.140.222:30800

Palworld is bugged, not even my server outside of gportal works, Conan should work, would there also be a Conan IP for us to test?

@saki-xhan
Copy link
Author

Conan exiles: 185.239.211.117:32200

@guilhermewerner
Copy link
Contributor

The one from palworld has now responded:

{
    "name": "[FR] V├®t├®rans - https://discord.gg/6CqKeXp9HD",
    "map": "MainWorld5",
    "raw": {
        "deployment": "0a18471f93d448e2a1f60e47e03d3413",
        "id": "eebdf08281c6455e9f99f27700c67c04",
        "bucket": "Pal_1",
        "settings": {
            "maxPublicPlayers": 20,
            "allowInvites": false,
            "shouldAdvertise": true,
            "allowReadById": true,
            "allowJoinViaPresence": true,
            "allowJoinInProgress": true,
            "allowConferenceRoom": false,
            "checkSanctions": false,
            "allowMigration": false,
            "rejoinAfterKick": "",
            "platforms": null
        },
        "totalPlayers": 0,
        "openPublicPlayers": 20,
        "publicPlayers": [],
        "started": true,
        "lastUpdated": null,
        "attributes": {
            "OWNINGUSERNAME_s": "DedicatedServer - sid5965708",
            "BUSESSTATS_b": false,
            "GAMESERVER_PORT_l": 30800,
            "DAYS_l": 6,
            "WORLDGUID_s": "64BA63524910E72543D40D85ADD20969",
            "NUMPRIVATECONNECTIONS_l": 0,
            "TYPE_s": "Community",
            "NAME_s": "[FR] V├®t├®rans - https://discord.gg/6CqKeXp9HD",
            "CREATE_TIME_l": 1706102776,
            "SERVERTIME_l": 80,
            "DEDICATEDONLY_b": true,
            "ADDRESS_s": "176.57.140.222",
            "PRESENCESEARCH_b": true,
            "NUMPUBLICCONNECTIONS_l": 20,
            "BUILDUNIQUEID_l": 0,
            "ISPASSWORD_b": false,
            "VERSION_s": "v0.1.2.0",
            "GAMESERVER_ADDRESS_s": "176.57.140.222",
            "NAMESPACE_s": "production",
            "BANTICHEATPROTECTED_b": false,
            "BISDEDICATED_b": true,
            "PLAYERS_l": 5,
            "MAPNAME_s": "MainWorld5"
        },
        "owner": "Client_xyza78918C8ZyYGcxMcpvTQjPFdjtykx",
        "ownerPlatformId": null
    },
    "maxplayers": 20,
    "numplayers": 5,
    "players": [],
    "bots": [],
    "queryPort": 30800,
    "connect": "176.57.140.222:30800",
    "ping": 0
}

@saki-xhan
Copy link
Author

What I need to do is get the number of players online on the server and display it in bot status.

@guilhermewerner
Copy link
Contributor

What I need to do is get the number of players online on the server and display it in bot status.

This information is in the query response:

    "maxplayers": 20,
    "numplayers": 5,
import { GameDig } from '../lib/index.js'
// Instead of '../lib/index.js' you would have here 'gamedig'.

async function main() {
  const query = await GameDig.query({
    type: 'palworld',
    host: '176.57.140.222',
    port: 30800
  });

  console.log(query.numplayers)
}

main();

@saki-xhan
Copy link
Author

This tells me undefined online.

@podrivo
Copy link
Contributor

podrivo commented Jan 24, 2024

There's a fix (#508) that was merged yesterday, but it hasn't been published yet.

Currently, you can grab players from state.raw.attributes.PLAYERS_l:

{
  "name": "[FR] Vétérans - https://discord.gg/6CqKeXp9HD",
  "raw": {
    "attributes": {
      "PLAYERS_l": 5,
}

@podrivo
Copy link
Contributor

podrivo commented Jan 24, 2024

Conan exiles: 185.239.211.117:32200

This server seems to be offline: https://gamemonitoring.net/conan-exiles/servers/1565452
I've tried this from g-portal and it worked: https://gamemonitoring.net/conan-exiles/servers/616457

gamedig --type conanexiles 176.57.140.217:28015 --pretty

{
  "name": "Official server #1111 PvP - g-portal.com",
  "map": "The Exiled Lands",
  "password": false,
  "raw": {
    "protocol": 2,
    "folder": "",
    "game": "Conan Exiles",
    "appId": 440900,
    "numbots": 0,
    "listentype": "d",
    "environment": "w",
    "secure": 1,
    "version": "",
    "players": [
      {
        "name": "MSV#34557",
        "score": 0,
        "time": 35059
      },
    ]
  },
  "maxplayers": 40,
  "numplayers": 16,
  "players": [
    {
      "name": "dxylbo#54516",
      "raw": {
        "score": 0,
        "time": 41143
      }
    }
  ],
  "bots": [],
  "queryPort": 28015,
  "connect": "176.57.140.217:28000",
  "ping": 222
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants