-
Notifications
You must be signed in to change notification settings - Fork 0
UserStats
The following structure is used until today:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
StatusUpdate | Status | |
8 | sLongLong | Ranked Score |
4 | float | Accuracy |
4 | sInt | Play Count |
8 | sLongLong | Total Score |
4 | sInt | Rank |
2 | sShort | PP |
In versions b20120725 and lower, the pp is not present anymore:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
StatusUpdate | Status | |
8 | sLongLong | Ranked Score |
4 | float | Accuracy |
4 | sInt | Play Count |
8 | sLongLong | Total Score |
4 | sInt | Rank |
As explained in this document, the user stats changed a lot on how they work in versions b1717 and below. Here we need to introduce a new enum, called "Completeness", which determines how much data to read:
Name | Value |
---|---|
StatusOnly | 0 |
Statistics | 1 |
Full | 2 |
If the "Completenes" is set to StatusOnly
, the following information is sent:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
1 | Completeness | |
StatusUpdate | Status |
If it's set to Statistics
, it will contain this:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
1 | Completeness | |
StatusUpdate | Status | |
8 | sLong | Ranked Score |
4 | float | Accuracy |
4 | sInt | Playcount |
8 | sLong | Total Score |
4 | sInt | Rank |
And lastly, if it's set to Full
:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
1 | Completeness | |
StatusUpdate | Status | |
8 | sLong | Ranked Score |
4 | float | Accuracy |
4 | sInt | Playcount |
8 | sLong | Total Score |
4 | sInt | Rank |
String | Username | |
String | Avatar Filename | |
1 | uChar | Timezone + 24 |
String | City | |
1 | uChar | Permissions |
4 | float | Longitude |
4 | float | Latitude |
Note
The city should be left empty, if the Display City Location
is set to false in the Client Info.
In b338, the "Rank" datatype was changed:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
1 | Completeness | |
StatusUpdate | Status | |
8 | sLong | Ranked Score |
4 | float | Accuracy |
4 | sInt | Playcount |
8 | sLong | Total Score |
2 | uShort | Rank |
In b337, the "Completeness" is not present anymore. Instead there is a boolean, called "newstats", that determines if there are... well... new stats.
Here is an example when the boolean is false:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
1 | bool | Newstats (false) |
StatusUpdate | Status |
And here is the structure, when it's set to true:
Size | Datatype | Description |
---|---|---|
4 | sInt | UserId |
1 | bool | Newstats (true) |
String | Username | |
8 | sLong | Ranked Score |
4 | float | Accuracy |
4 | sInt | Playcount |
8 | sLong | Total Score |
4 | sInt | Rank |
String | Avatar Filename | |
1 | uChar | Timezone + 24 |
String | City | |
StatusUpdate | Status |
Warning
On versions b501 and below, the maximum value for the total score was 17705429347
.
On versions b658 and below, the maximum value was 26931190826
.
This is because the toNextLevel
array had a limit, which caused the bancho connection to crash when going over a certain total score value.
-
Home
- Protocol
- Introduction
- Login
- PacketEnums
- Players
- Chat
- Spectating
- Multiplayer
- Types
- Packets
- Client
- 0 ChangeStatus
- 1 SendMessage
- 2 Exit
- 3 RequestStatus
- 4 Pong
- 16 StartSpectating
- 17 StopSpectating
- 18 SendFrames
- 20 ErrorReport
- 21 CantSpectate
- 25 SendPrivateMessage
- 29 PartLobby
- 30 JoinLobby
- 31 CreateMatch
- 32 JoinMatch
- 33 LeaveMatch
- 38 MatchChangeSlot
- 39 MatchReady
- 40 MatchLock
- 41 MatchChangeSettings
- 44 MatchStart
- 47 MatchScoreUpdate
- 49 MatchComplete
- 50 MatchChangeBeatmap
- 51 MatchChangeMods
- 52 MatchLoadComplete
- 54 MatchNoBeatmap
- 55 MatchNotReady
- 56 MatchFailed
- 59 MatchHasBeatmap
- 60 MatchSkip
- 63 JoinChannel
- 68 BeatmapInfo
- 70 MatchTransferHost
- 73 AddFriend
- 74 RemoveFriend
- 77 MatchChangeTeam
- 78 LeaveChannel
- 79 ReceiveUpdates
- 82 SetAwayMessage
- 84 IrcOnly
- 85 StatsRequest
- 87 MatchInvite
- 90 MatchChangePassword
- 93 TournamentMatchInfo
- 97 PresenceRequest
- 98 PresenceRequestAll
- 99 ChangeFriendonlyDms
- 108 TournamentJoinMatchChannel
- 109 TournamentLeaveMatchChannel
- Server
- 5 LoginReply
- 6 CommandError
- 7 SendMessage
- 8 Ping
- 9 IrcChangeUsername
- 10 IrcQuit
- 11 UserStats
- 12 UserQuit
- 13 SpectatorJoined
- 14 SpectatorLeft
- 15 SpectateFrames
- 19 VersionUpdate
- 22 CantSpectate
- 23 GetAttension
- 24 Announce
- 26 UpdateMatch
- 27 NewMatch
- 28 DisbandMatch
- 34 LobbyJoin
- 35 LobbyPart
- 36 MatchJoinSuccess
- 37 MatchJoinFail
- 42 FellowSpectatorJoined
- 43 FellowSpectatorLeft
- 45 AllPlayersLoaded
- 46 MatchStart
- 48 MatchScoreUpdate
- 50 MatchTransferHost
- 53 MatchAllPlayersLoaded
- 57 MatchPlayerFailed
- 58 MatchComplete
- 61 MatchSkip
- 62 Unauthorized
- 64 ChannelJoinSuccess
- 65 ChannelAvailable
- 66 ChannelRevoked
- 67 ChannelAvailableAutojoin
- 69 BeatmapInfoReply
- 71 LoginPermissions
- 72 FriendsList
- 75 ProtocolVersion
- 76 MenuIcon
- 80 Monitor
- 81 MatchPlayerSkipped
- 83 UserPresence
- 84 IrcOnly
- 86 Restart
- 88 Invite
- 89 ChannelInfoComplete
- 91 MatchChangePassword
- 92 SilenceInfo
- 94 UserSilenced
- 95 UserPresenceSingle
- 96 UserPresenceBundle
- 100 UserDmBlocked
- 101 TargetIsSilenced
- 102 VersionUpdateForced
- 103 SwitchServer
- 104 AccountRestricted
- 105 RTX
- 106 MatchAbort
- 107 SwitchTournamentServer
- Client
- Protocol