Skip to content

Converts Steam Rich Presence to Discord Rich Presence for various games

License

Notifications You must be signed in to change notification settings

angelolz/SteamRPC

 
 

Repository files navigation

SteamToDiscordRPC

A (proof-of-concept) program that converts the Rich Presence information from the supported Steam games to Discord Rich Presence, written in Node.js.

Why?

There's quite a lack of games that support Discord's Rich Presence, while most (multiplayer) games actually do implement it for Steam.
Having one application that is able to support a ton of additional games with much ease (it doesn't require any modifications or memory shenanigans!) seems like a pretty cool concept.

This program works by searching through the text that you also see in Steam's friend list in rich presence enabled applications, and then spitting out "richer" version that can be used by Discord. That allows you to show in Discord fancy pictures of the map you're playing on or the game mode. Extracting this information and turning it into multiple parts is done through the profiles. They are written in basic javascript but shouldn't require a whole lot of coding knowledge.

Another benefit is that you could even (optionally) run it on a Raspberry Pi, VPS or any other 24/7 computer that you aren't gaming on. This allows you to not clutter your gaming PC with additional processes.

Currently supported games:

  • Rocket League (game stopped providing Rich Presence information which broke this integration)

Requirements

  • Node.js
  • (Optional) A dedicated computer to run this on.

Installation

Download a zip of the latest code and extract it somewhere (or if you have git, run git clone https://github.com/Crementif/SteamRPC).

You'll now need to specify your own Steam user profile. To do this, open the SteamRPC.js file in a text editor like notepad. In this file you need to edit the URL at the const steamProfileURL = part:

// ==================== Configuration Settings =====================
// Steam user identification

// You'll need to find your own SteamID64 URL using https://steamrep.com
// Note: This also allows custom URLs like https://steamcommunity.com/id/crementif but they require providing a valid web key.
const steamProfileURL = "https://steamcommunity.com/profiles/76561198259089872";

Then, run the INSTALL.bat file to install the dependencies required for this project. Or alternatively, you can run npm install in a command prompt inside the extracted folder.

After that's done, you can run it using the RUN.bat file or by running node SteamRPC.js inside the extracted folder.

Making your own profile

First, you'll want to make a copy of the ExampleProfile folder and give it a different name. Then, you'll need to modify the following parts:

  1. The game's appID which can be found on SteamDB.
  2. The game's title, although it's mostly used for identication and not for displaying.
  3. An exported Javascript function called translateSteamPresence with a parameter that'll contain the Steam rich presence text. You can see the text that your translate function will receive in the last line of the application. The function needs to return an object variable (or return an empty object, which clears the RPC) that will be passed to the Discord Rich Presence.
  4. (Optional) Provide images in the resources folder with assets for the bot which will be uploaded.

Some issues with the current way of how the Discord RPC clients are tackled is that there's a limit of 150 assets for each registered rich presence application. Also, every profile will show the same "playing Steam" status as there's no way to change this dynamically.

About

Converts Steam Rich Presence to Discord Rich Presence for various games

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Batchfile 0.1%