Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Discord Rich Presence support for Beat Saber, now with 100% more configurability!

License

NotificationsYou must be signed in to change notification settings

DJDavid98/bsrpc

Repository files navigation

Discord Rich Presence support for Beat Saber, now with 100% more configurability!

Displays information about the current song (including ranked status), modifiers (as emojis), play/pause state, multi/singleplayer, current score, combo and accuracy by default. Time left is also displayed while playing (speed modifiers are also accounted for).

Important

Please wait around 30-60s after launching the game for the Rich Presence to appear, it can take some time after starting the game.

Discord account card showing the Beat Saber rich presenceDiscord profile activity tab showing the Beat Saber rich presence

Credits: Profile picture bybrizunzies, banner byZell

Configuration

While the mod has a few basic configuration options exposed on the UI via the Mod Settings menu, currently most config options can be edited via the JSON file primarily, as I have no idea how to create an interface for some of these options. If you happen to be well-versed in creating in-game configuration UIs any help would be greatly appreciated.

DiscordClientId

Can be used to provide a customDiscord App ID in case you want to define your own image files, or change the first line of the Rich Presence, as that's controlled by the App's name.

The default is an App ID created by the mod's author that works with the default configuration of the mod.

If you want to create your own App, you will need to upload image assets with specific names to match the ones defined in the mod. See theRichPresenceResources.cs file for exact names.

MultiplayerDetection

Whentrue the mod will detect when you are in the built-in Multiplayer menu. It will also change the "lobby type" displayed in later steps.

MultiplayerPartyInfo

Whentrue andMultiplayerDetection is also enabled, the mod will display the size of the lobby as well as the number of people in it inside the rich presence.

LargeImageSongCover

Whentrue the mod sets the song cover image as the large image, if it's available. It only works for songs available on BeatSaver, and can be set tofalse to show the image of the current envorment instead, which is also used as a fallback in case no cover art is available.

ShowElapsedTimes

Whentrue the amount of time spent in the Main Menu or Multiplayer Lobby is displayed. The timer resets after starting a map or going in and out of a lobby.

ShowMapType

Whentrue the map type (standard, one-saber, 360, etc.) will be displayed as the small image for the rich presence. TheSmallTextFormat tooltip configured later will not be readable if this is set tofalse.

UseEndTime

Whentrue the "end time" for the rich presence activity is calculated and set dynamically based on the current song speed modifiers while actively playing a map. When set tofalse, only the "start time" will ever be set.

Note

Since Discord's new activity history update the activity no longer shows a timer in the activity details when an end time is set.When this is set totrue your activity will report no visible time progress while playing a map. In order to work around this,the newremainingTimePlaying field has been introduced to show the remaining time in a similar manner only while the game is not paused.

TrackLastSceneSwitch (Per-Activity Start Time)

Whenfalse the activity start time is set to (roughly) when the game was opened and will not change when switching between menus and playing a map. Useful if you want to show your total playtime instead of time spent in a level for example.

Note

Since Discord's new activity history tracks time spent in games differently, this setting is off by default.If you want to go back to the previous behavior, you can enable this setting, but I take no responsibility for incorrectly displayed play times.You can still show time-based map progress information in the other parts of the rich presence by using the newly-introduced time variables.

MapType

This can be used to change the text displayed when using themapType variable. Set the value to the text you want to see displayed, or an empty string to prevent that value from being displayed.Fallback can be set if you want a specific text to be displayed in case the map type being reported by the DataPuller mod does not have a readable name mapping. By default this isnull and it will display the value sent by DataPuller.

Data Line Formatting

There are several options which accept "format lists":

  • DetailsFormat - the 2nd line of the rich presence (below the app name) while playing a song
  • StateFormat - the 3rd line of the rich presence while playing a song
  • LargeTextFormat - tooltip displayed when hovering over the large image
  • SmallTextFormat - tooltip displayed when hovering over the small image

Each string in the list will only be appended to the final output in case it has a "valid" value (valid is subjective and it is defined by the mod). Each value in the list takes the form of"prefix{{variable}}suffix" whereprefix andsuffix can be an arbitrary number of characters before and after the variable, respectively, andvariable is the name of the variable from the table below.

The strings also have configurable separators that go between each valid item. By default this is a space forDetailsFormat andStateFormat, and a slash surrounded by spaces (/) forLargeTextFormat andSmallTextFormat. You can also disable displaying the individual lines by setting them tonull instead of the list.

VariableDescriptionExampleAdditional formattingValidity criteria
songNameTitle of the songCountry RoadsNot empty
songSubNameSub-name of the songSqueepo RemixNot empty
songAuthorAuthor of the songJaroslav Beck, Kings & FolkNot empty
mapperMapper + lighter names (comma separated)Mawntee, tychailatteNot empty
mappersMapper names (comma separated)altrevin, FreekNot empty
lightersLighter names (comma separated)altrevin, FreekNot empty
contentRatingMap content ratingSafeNot empty
difficultyHuman-readable difficultyExpert"ExpertPlus" replaced by "Expert+"Not empty
customDifficultyCustom difficulty nameLawlessNot empty
rankedRanked textBased on configurationIf map is ranked
qualifiedQualified textBased on configurationIf map is ranked
starsScoreSaber ranked stars4,22Up to two decimalsGreater than 0
blstarsBeatLeader ranked stars6,98Up to two decimalsGreater than 0
ppScoreSaber perofrmance points167,89Up to two decimalsGreater than 0
playStateEmoji indicating play state▶️Based on configurationNot empty
modifiersStateEmojis indicating modifiers🧘Based on configurationNot empty
lobbyTypeSingle/multiplayer or practice👤Based on configurationNot empty
mapTypeType of the current mapOne SaberBased on configurationNot empty
scoreTotal score123,456Greater than 0
topScoreTop score for mode and difficulty156,789Greater than 0
comboConsecutive hits without misses234No decimalsGreater than 0
missesTotall misses & bad cuts12No decimalsGreater than 0
energyPlayer health900-100, no % sign
bpmSong beats per minute180No decimalsGreater than 0
njsSong note jump speed14,21Up to two decimalsGreater than 0
accuracyCurrent accuracy86,24Two decimals, excluding % sign
rankAccuracy ranking letterSSNot empty
bsrBSR key of custom maps97f6Not empty
fcFull combo text✅FCBased on configurationNo misses & not empty
gameVersionVersion of the game1.29.1Not empty
pluginVersionVersion of the mod1.1.2Not empty
remainingTimeTime left in the current map1:23
elapsedTimeTime elapsed in the current map0:42
totalTimeTotal duration of the map2:05
remainingTimePlayingremainingTime while playing2:05Game is not paused
pausedSinceTime elapsed since the game was paused5:22Game is paused

FullComboValue

This can be used to change the text displayed when using thefullCombo variable. Set the value to the text you want to see displayed, or an empty string to prevent that value from being displayed.

MainMenuValue

This controls the 2nd line of the rich presence while in the main menu. Set the value to the text you want to see displayed, or an empty string to prevent that value from being displayed.

MultiplayerLobbyValue

This controls the 2nd line of the rich presence while in a multiplayer lobby. Set the value to the text you want to see displayed, or an empty string to prevent that value from being displayed.

Emoji configuration

ThePlayStateEmoji,ModifierEmoji andLobbyTypeEmoji options allow you to remap the emoji displayed in theplayState,modifiersState andlobbyType variables. Set the value to the emoji (or any arbitrary text) you want to see displayed, or an empty string to prevent that value from being displayed.

Dependencies


[8]ページ先頭

©2009-2025 Movatter.jp