JustTemmie / steam-presence

A script that takes the game you're playing on steam and displays it on discord
MIT License
243 stars 18 forks source link

potential improvement to enhanced rich presence #54

Closed pparmy closed 4 months ago

pparmy commented 4 months ago

,, I have zero clue how technically inclined this small thing may be but on the offhand that it is quite simple, would it be possible to pull Discord's default assets for the enhanced rich presence of select games like ULTRAKILL? it came to mind after reading how you could pull the default icon that Discord used for every game (on main branch). below is the first image which displays steam-presence, the second is native rich presence (albeit a stitched together image) but it shows the blue colored ULTRAKILL level preview icon (which I assume could be pulled from Discord but I have zero clue) image image

JustTemmie commented 4 months ago

it should in theory be possible, but in practice i think very few games would actually be affected as i think the detectable endpoint is only filled with games managed by discord. Many games with their own actual RPC use a different ID

Let's take mindustry for example, the game sends this packet to the discord client

{
    "id": "610508934456934412",
    "name": "Mindustry",
    "icon": "96405d12f0fdfba5fd0002f67dac6214",
    "description": "Rich Presence for the game Mindustry.",
    "summary": "",
    "type": null,
    "is_monetized": false,
    "cover_image": "d3fde752d384d65e519fc5f16f9b1249",
    "hook": true,
    "storefront_available": false,
    "integration_types_config": {
        "0": {}
    },
    "verify_key": "599c047da76f90a8eba03eee5786226c3f790a48bb8d4af71596208ee8f54e49",
    "flags": 0
}

where it ID is 610508934456934412, discord then queries https://discord.com/api/v9/oauth2/applications/610508934456934412/assets uses the first icon to actually generate the RPC

however, in the detectable endpoint mindustry is listen under a different ID, 1124352084003803146. This app doesn't have any icons associated to it, so since steam-presence can't get it's hand on the actual ID, it can't fetch the actual images

i don't own ultrakill so i can't check, but i'm fairly certain the same is happening for that game, using SGDB fixes it though so i think it's fine

pparmy commented 4 months ago

using SGDB fixes it though so i think it's

when using SGDB, the steam rich presence doesn't seem to translate - unless I'm understanding what you said wrong that is image

JustTemmie commented 4 months ago

nono, SGDB just pulls stuff from here https://www.steamgriddb.com/game/5255287/icons there's no way to detect what image steam-presence "should" be using

pparmy commented 4 months ago

what does SGDB fix then? do you know why the subtext for "Main Menu" and other in game specifiers don't appear when using SGDB?

JustTemmie commented 4 months ago

that sounds like a bug if anything - i know the steam enhanced presence stuff has been pretty wonky recently so :shrug: