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

Support for Ark: Survival Ascended using EOS #54

Closed
wants to merge 4 commits into from
Closed

Support for Ark: Survival Ascended using EOS #54

wants to merge 4 commits into from

Conversation

dkoz
Copy link
Contributor

@dkoz dkoz commented Nov 14, 2023

This pull request will add support for Ark: Survival Ascended (ASA) using epics EOS api.

Some key notes:

  • Querying servers require three key credentials: client_id, client_secret, and the deployment_id.
  • You can only query the servers IP address, which returns all servers under the the same IP.
  • The EOS API will produce random results up to 214 servers at a time, this can be narrowed down by searching for specific IP address.
  • This game has no query port, so I implemented a filter using ADDRESSBOUND_s.

This is an example API request from the EOS API:

    'sessions': [{
        'deployment': 'ad9a8feffb3b4b2ca315546f038c3ae2',
        'id': '7978933815d04377af2f67930749da72',
        'bucket': 'TestGameMode_C:<None>:TheIsland_WP',
        'settings': {
            'maxPublicPlayers': 70,
            'allowInvites': True,
            'shouldAdvertise': True,
            'allowReadById': True,
            'allowJoinViaPresence': True,
            'allowJoinInProgress': True,
            'allowConferenceRoom': False,
            'checkSanctions': False,
            'allowMigration': False,
            'rejoinAfterKick': '',
            'platforms': None
        },
        'totalPlayers': 5,
        'openPublicPlayers': 65,
        'publicPlayers': [],
        'started': False,
        'lastUpdated': None,
        'attributes': {
            'MINORBUILDID_s': '11',
            'MODID_l': 0,
            'CUSTOMSERVERNAME_s': 'GR8 NewbZ Evolved PVE 10x',
            'ADDRESSDEV_s': '51.81.48.2,127.0.0.1',
            'ISPRIVATE_l': 0,
            'SERVERPASSWORD_b': False,
            'MATCHTIMEOUT_d': 120.0,
            'ENABLEDMODSFILEIDS_s': '4854705,4861202,4851634,4846256,4856936,4863828,4863178,4829265,4825342,4820622,4861686,4856764,4830799,4863213,4821647',
            'DAYTIME_s': '205',
            'SOTFMATCHSTARTED_b': False,
            'STEELSHIELDENABLED_l': 0,
            'SERVERUSESBATTLEYE_b': False,
            'EOSSERVERPING_l': 98,
            'ALLOWDOWNLOADCHARS_l': 1,
            'OFFICIALSERVER_s': '0',
            'GAMEMODE_s': 'TestGameMode_C',
            'ADDRESS_s': '51.81.48.2',
            'SEARCHKEYWORDS_s': 'Custom',
            'EOS_BLISTENING_b': True,
            'ALLOWDOWNLOADITEMS_l': 1,
            'LEGACY_l': 0,
            'ADDRESSBOUND_s': '0.0.0.0:7777',
            'SESSIONISPVE_l': 1,
            'EOS_BUSESPRESENCE_b': True,
            'ENABLEDMODS_s': '928793,928988,932822,900062,929521,930115,930494,930829,929830,928565,929183,928597,929110,929489,928708',
            'SESSIONNAMEUPPER_s': 'GR8 NEWBZ EVOLVED PVE 10X - (V26.11)',
            'SERVERPLATFORMTYPE_s': 'All',
            'MAPNAME_s': 'TheIsland_WP',
            'BUILDID_s': '26',
            'SESSIONNAME_s': 'GR8 NewbZ Evolved PVE 10x - (v26.11)'
        },
        'owner': 'Client_xyza7891muomRmynIIHaJB9COBKkwj6n',
        'ownerPlatformId': None
    }],
    'count': 1
}```

dkoz added 4 commits November 13, 2023 23:25
Adding support for Ark: Survival Ascended
Server can't be queried based on port and JSON output from EOS API varies. Needs more testing.
Fixed filtering issue with EOS API.
@patrix87
Copy link

This change includes Epic API secret key and client id.
I would recommend looking for a public API that does not require those.
Otherwise they would need to be added through the environment variables and definitely not directly in the code.

@dkoz
Copy link
Contributor Author

dkoz commented Nov 15, 2023

This change includes Epic API secret key and client id. I would recommend looking for a public API that does not require those. Otherwise they would need to be added through the environment variables and definitely not directly in the code.

Unfortunately there really is no other way to query servers under EOS. A public API equivalent would something like BattleMetrics which uses a similar method I'm introducing here.

I can definitely load the credentials through the environment file instead of being hardcoded. Should I modify the .env.example or just leave it blank for now while introducing the change into the code itself?

@dkoz dkoz closed this by deleting the head repository Nov 15, 2023
@BattlefieldDuck
Copy link
Member

I guess that is not a big deal, these credentials can be provided by the game developers or extracted from the game's files.

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

Successfully merging this pull request may close these issues.

3 participants