Add custom Discord Rich Presence to your game with BloxstrapRPC

When you are setting the presence to choosing a character, you are passing an rbxthumb string which it is failing to parse. It only takes a number.

1 Like

Even when I’m not doing that, it still just doesn’t work

That is very strange, I can’t reproduce that issue in a baseplate however I joined your game and you are still passing strings in your assetIds unless you are testing it in a separate place or something

Edit: Nvm

1 Like

if you create a new server it should be updated now

1 Like

image
Seems to work for me now

1 Like

Yeah, it kinda works?? It’s supposed to update when you pick a character but it doesn’t work even with what seems to be correct data

Your assetId is a string on the largeImage

1 Like

oh wait I just realized that’s a string YEAH LOL

There seem to be some slight reliability issues cropping up recently, though mostly still working, and I am due on completely redoing the system since I’m sort of relying on a debug logging flag that isn’t supposed to be enabled anymore. I’ll get those issues ironed out soon.
(accidental reply my bad)

3 Likes

My small side-project, ApplejuiceCLI now has my own BloxstrapRPC protocol implementation in Rust!
Although the implementation is rough around the edges, it means that Roblox on Linux users will be able to make use of BloxstrapRPC in games!

Take a look at the sause (utils/rpc.rs)

image
image
image

6 Likes

Great to see a community-made program for Roblox adapting another community-made program’s protocol too!

1 Like

Why present that on a user’s rich presence?

I don’t think Roblox users want their Discord presence to be a advertisement space.

1 Like

Seeing how many people are in the server with you (for example, 7 out of 16) would actually be great.

can also be used in games like Locofficial when you’re in a match (3 out of 4)

We can’t determine how many people are in a server, and it’s trivial for the game developer to implement such a status if they want.

2 Likes

This so cool, i’m using this on my game.
Only i didn’t found way to remove Small Image.
Sad it don’t let’s add just 1 own button starting with https://www.roblox.com it can be useful for Lobby system.
{8079B9B0-B5FA-43E1-B567-2A43A10B7054}

Just discovered this, pretty cool but I don’t like how it adds to the console every time you edit the RPC. I was able to replace print("[BloxstrapRPC] " .. json) with ContentProvider:PreloadAsync({"[FLog::Output] [BloxstrapRPC] " .. json .. "\n" .. HttpService:GenerateGUID()}) to make the RPC silent. ContentProvider:PreloadAsync will error for invalid asset IDs only to the log file and not the console, notably with an error message that includes the invalid asset ID, so I put the print and RPC prefix in an asset ID as Bloxstrap requires, along with a newline to delimit Bloxstrap’s JSON parser, and a GUID to make sure the final asset ID is different every time, because Roblox will only log the error for the same asset ID once. Maybe you could publish an update to the module to include this? I don’t see any downsides.

5 Likes

That’s pretty cool, and it seems to work perfectly. Nice job on finding this.

I would’ve considered doing it this way, but I do see a downside with doing this. It’s simply just not what ContentProvider:PreloadAsync is intended to do. It’s hacky, and therefore not safe, i.e. If Roblox internally changed PreloadAsync to validate URLs before further processing, then it would completely break it. I wouldn’t risk betting on PreloadAsync to keep working like this.

2 Likes

See the docs, you should be able to remove the small image. You might be able to create a lobby system if you use SetLaunchData to detect people joining through a Bloxstrap deeplink, but that only works if you don’t use reserved servers (not ideal, I know, my fault for not implementing it properly, sorry).

image
The images aren’t loading for me.