HeroicGamesLauncher
HeroicGamesLauncher copied to clipboard
Add more options for DiscordRPC
added more custom options & settings to the discordrpc user can now customize
- app name (
Playing xxx), by providing a custom discord app id instead of HGL's, falls back to HGL's if none provided - activity title and state, now removable (empty string) and if undefined falls back to old ones
and added title & state variables,
{game}for game name &{platform}for platform/os name
hope i didn't miss/error in something, and always up for suggestions.
p.s. didn't do anything for images as they're already customizable enough :D altho i do recommend making the small icon an image link instead of relying on discord's app assets, that is in case you think HGL would need more visibility with custom apps
Use the following Checklist if you have changed something on the Backend or Frontend:
- [x] Tested the feature and it's working on a current and clean install.
- [x] Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
- [ ] Created / Updated Tests (If necessary)
- [ ] Created / Updated documentation (If necessary)
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
also a heads up, CLA link in CONTRIBUTING.md is invalid
also a heads up, CLA link in CONTRIBUTING.md is invalid
ok, will check it out
honestly I think the application id was reaching too far, but I can see myself and many others editing the states and details format, not required obviously but nicer to have.
- Being able to change the format of the app description in Discord RPC is a nice change. :) Non-nerdy users could then remove the "on Linux" etc to get a cleaner status format.
- Setting application ID is not useful at all in the current implementation, because it's a single, global setting active for every game, so if you change the ID to impersonate "Apex Legends" for example, then Discord would show you as "Playing Apex Legends: Playing Minecraft via Heroic on Linux" if you play another game, heh.
- Application ID could be useful if it was an advanced per-game setting instead. But even then, there's another problem: By impersonating the app, what will happen if the game we launch actually supports Discord RPC too and tries to use the same ID? Most likely the game would take precedence since it runs later, but who knows, since the Heroic RPC socket stays open as long as the game is running (if I remember right, didn't check again). And if a game has a registered Application ID, then the game itself supports Discord RPC.
- So the ability to impersonate app IDs should definitely be removed.
- I would rather recommend working on wine RPC integration. There are two or three different projects that hook the discord DLL and redirect them to the Unix socket instead. If the best one (whichever it is) is integrated into your game's Wine prefix, you'll get automatic Discord RPC connections from your Windows games, with actual game names and proper game-specific status. Which needless to say is a lot better than faking it.
- This would allow us to have integration without needing this rejected Legendary PR at all.
Edit, I barely did a search so there may be others too, but here are the bridges I found:
- Not appropriate (needs shell script): https://github.com/openglfreak/winestreamproxy
- Not appropriate (needs shell script): https://github.com/0e4ef622/wine-discord-ipc-bridge
- Not appropriate (outdated, incomplete, uses a DLL which means easy install, but won't work if the game uses its own built-in Discord RPC code): https://github.com/mellowagain/rpc-wine
- Appropriate (hands-off, only requires creating a Windows service registration inside the prefix, which could even be automated via registry edits by Heroic, and then it will proxy all connections to the Windows Discord RPC socket automatically and works with all games/apps): https://github.com/EnderIce2/rpc-bridge
- You also need my bridge if you are using Discord Native + Heroic Flatpak together: https://github.com/Arcitec/discord-flatpak-rpc-bridge
The AppId isn't there to impersonate the game (too inefficient) as much as it's there to just customize and choose your own name/image handles, keeping things consistent if you already have a separate RPC client but want heroic's game info, and so at least in the current implementation.
And I've thought about the RPC integration but it proved to be way outside of just heroic's space so not much was done.