Serverless Proximity Chat

Serverless Proximity Chat

0 Downloads

How does this mod work?

DarianLStephens opened this issue · 4 comments

commented

I haven't found any information about it. Surely it doesn't 'just work', right?
How does it associate Minecraft usernames with Discord ones? How can you tell it what servers to use?
Even if it IS just an 'install and forget' mod, I'd appreciate knowing that for sure instead of there being no setup information at all.

Mostly, so I know whether or not I need to do something to set it up on my server before I add it, or if there's any way to control it (No config file from what I saw).

The 'Setup' section just weirdly links to the main Fabric API development wiki, nothing what-so-ever to do with this mod.

commented

On the contrary, it does just work, and I’ll go over a basic explanation of how it does.

Discord used to sell games on a “Discord Store”, and so they wrote some code that allows for games to communicate with Discord. Things like managing the activity status, but also for working with networking code, and most importantly, voice chat.

Now as for the Minecraft side of things, the mod detects whenever you join a server, and asks Discord if there are any voice channels with the same name as your server ip. If so, it will connect you to the first one automatically, and if not, it will make one for you.

It then takes your Minecraft UUID (a unique number that never changes for your Minecraft account) and adds it as “User Metadata” for the voice call, so that whenever the mod joins a voice channel, it can map all of the UUIDs to the DiscordIDs (a unique number for your Discord account).

Then it’s as simple as every tick, checking if any of the rendered players are in the Discord lobby, and changing their volume with the setLocalVolume() function.

And no, there’s no server side setup. All of the steps above run fully client-side, so installing it on the server will do nothing.
(The setup section refers to setting up an IDE to help write code for the mod so that other people can work on the mod even if I stop supporting it)

commented

I’ll work on adding this info to the mod description soon!

commented

Ah, so I do need to do some setup, at least to add a new channel?
Otherwise, what do you mean 'it makes one'? Is that a feature of this Discord Game API? Or can it still work in any old channel?
If so, is there any way to designate a channel as 'speak anywhere'?

Oh, and is there any way to do directional audio, or does Discord only allow for plain volume adjustments? And does that affect any pre-existing local volume? I have some people set differently because of different microphone qualities, and just voice loudness.

commented

Sorry, like I said, there is no setup. The mod will automatically create a lobby if it doesn't find one. It's a feature of the Discord Game SDK. It can't work in "any old channel" because it doesn't use the ordinary voice channels. The Discord Game SDK manages all of it. You won't find the channel that you're joining in Discord.

The pre-existing local volume will (probably) be ignored. You can change the voice channel volume in game by running /discordprox config in a server.

There is also no way to designate a channel as "speak anywhere", because that could be done by just using a normal voice channel without the mod. (Although, it is certainly something possible to do)

(and no, there isn't a way to do directional audio, at least not that I can find in the SDK)