-
-
Notifications
You must be signed in to change notification settings - Fork 14
[EN] Multiplayer Plus
todo...
Example: !room
Will display in your chat the current room Code.
- In OBS, add a Text (GDI+) source.
- In the properties of that new source, enable "Read from file" and select the file at this location:
<Your-BeatSaber-Installation-Path>/UserData/BeatSaberPlus/MultiplayerPlus/RoomCode.txt
- Edit the visual properties to get a look you like.
Configuring the content of the text file
Find the BeatSaberPlus.ini file in your UserData folder in your BeatSaber installation.
<Your-BeatSaber-Installation-Path>/UserData/BeatSaberPlus/MultiplayerPlus/Config.json
In that file, there are one line you can edit:
Property | Description | Example |
---|---|---|
RoomCodeFormat | Formatting of message | Current room code %c |
In the format, you can specify variables.
Variables | Description | Example |
---|---|---|
%c | Code of the room | GUV87 |
For example, you can set the format like this:
"RoomCodeFormat": "Current room code %c",
and the text file will look like this:
Current room code GUV87
Get the link of the overlay
Get the overlay of your choice, per example from :
– https://theblackparrot.me/bs/#overlays
– https://github.com/HyldraZolxy/BeatSaber-Overlay#beatsaber-overlay
Follow the steps for the setup of the overlay so it looks the way you want (Scale, Position, …) and copy the link given
Add to the stream software
In your streaming software ( OBS, Streamlabs, …) add a new browser source in your sources of the desired scene and paste the link gotten from previous step.
The resolution of the overlay have to match your stream output resolution : 1920x1080 if you stream in 1080p, 1080x720 if you stream in 720p, etc…
Example :
IMPORTANT : Do not touch the Custom CSS, it will make the overlay malfunction
You're good to go !
You can test if it works by launching your game and checking in your streaming software with the browser source active
Endpoint
The websocket server will start listenning when the game start on
ws://localhost:2948/socket
Handshake
When a client connect, he will receive an handshake packet with the following informations
{
"_type":"handshake",
"ProtocolVersion":1,
"GameVersion":"1.24.0",
"LocalUserName":"HardCPP",
"LocalUserID":"76561198025265829"
}
Name | Description |
---|---|
_type | Message type |
ProtocolVersion | Protocol version of the overlay system |
GameVersion | Current version of the game |
LocalUserName | Current user name |
LocalUserID | Current user ID (Steam/Occulus) |
RoomJoined
{
"_type":"event",
"_event":"RoomJoined"
}
Name | Description |
---|---|
_type | Message type |
_event | Event type |
RoomLeaved
{
"_type":"event",
"_event":"RoomLeaved"
}
Name | Description |
---|---|
_type | Message type |
_event | Event type |
RoomState
{
"_type":"event",
"_event":"RoomState",
"RoomState":"SelectingSong"
}
Name | Description |
---|---|
_type | Message type |
_event | Event type |
RoomState | State of the room |
Enum RoomState:
Name | Description |
---|---|
None | Default null state |
SelectingSong | Players are in the lobby to select a song |
WarmingUp | Players are downloading & loading the map |
Playing | At least one player is still playing |
Results | Lobby is in the Results mode |
PlayerJoined
{
"_type":"event",
"_event":"PlayerJoined",
"PlayerJoined":{
"LUID":1,
"UserID":"76561198025265829",
"UserName":"HardCPP"
}
}
Name | Description |
---|---|
_type | Message type |
_event | Event type |
PlayerJoined.LUID | Server session ID for the player who joined |
PlayerJoined.UserID | User ID (Steam/Occulus) of the player who joined |
PlayerJoined.UserName | User name of the player who joined |
PlayerLeaved
{
"_type":"event",
"_event":"PlayerLeaved",
"PlayerLeaved":{
"LUID":1
}
}
Name | Description |
---|---|
_type | Message type |
_event | Event type |
PlayerLeaved.LUID | Server session ID for the player who leaved |
Score
{
"_type":"event",
"_event":"Score",
"Score":{
"LUID":1,
"Score":42,
"Accuracy":0.9565,
"Combo":17,
"MissCount":36,
"Failed":true,
"Deleted":false
}
}
Name | Description |
---|---|
_type | Message type |
_event | Event type |
Score.LUID | Server session ID for the player |
Score.Score | Current score |
Score.Accuracy | Current multiplied accuracy |
Score.Combo | Current combo |
Score.MissCount | Miss & bad cut count for the player |
Score.Failed | Did the player failed the map? |
Score.Deleted | Did the player quitted the map? |