dotabod / backend

Backend services for dotabod, the popular twitch streamer tool
https://dotabod.com
GNU Affero General Public License v3.0
40 stars 15 forks source link

turbo games are adjusting mmr #373

Closed Geczy closed 1 month ago

Geczy commented 11 months ago

fix so it only adjusts for ranked games

Aluerie commented 1 month ago

this is the only issue that pops up after searching for "turbo" so I will bring possibly related problems here;

Turbo games also

PS. This comment in the code is wrong (min 4 max 5.5 because halving min 8 max 11)

https://github.com/dotabod/backend/blob/d19459a2f741c84b5fec6cf9b237a4a377d9b6f3/packages/dota/src/dota/events/gsi-events/event.roshan_killed.ts#L88

Geczy commented 1 month ago

Which one is actually turbo? My database only has lobby types 1, 7, 9, and 14. For some reason id 23 isn't being picked up...Might need to look into how to get lobby type again?

const gameModes = [
  { id: 1, name: 'All Pick' },
  { id: 2, name: 'Captains Mode' },
  { id: 3, name: 'Random Draft' },
  { id: 4, name: 'Single Draft' },
  { id: 5, name: 'All Random' },
  { id: 6, name: 'Intro' },
  { id: 7, name: 'Diretide' },
  { id: 8, name: 'Reverse Captains Mode' },
  { id: 9, name: 'The Greeviling' },
  { id: 10, name: 'Tutorial' },
  { id: 11, name: 'Mid Only' },
  { id: 12, name: 'Least Played' },
  { id: 13, name: 'New Player Pool' },
  { id: 14, name: 'Compendium Matchmaking' },
  { id: 15, name: 'Custom Game' },
  { id: 16, name: 'Captains Draft' },
  { id: 18, name: 'Ability Draft' },
  { id: 19, name: 'Event Game' },
  { id: 20, name: 'All Random Deathmatch' },
  { id: 21, name: '1v1 Mid Only' },
  { id: 22, name: 'All Pick' },
  { id: 23, name: 'Turbo' },
  { id: 24, name: 'Mutation' },
]
Aluerie commented 1 month ago

Erm

lobby types

const gameModes = [

Lobby Type is a different thing from game mode.

class LobbyType(IntEnum):  # source: dota_gcmessages_common_lobby.proto
    Invalid          = -1
    Unranked         = 0
    Practice         = 1
    CoopBotMatch     = 4
    Ranked           = 7
    BattleCup        = 9
    LocalBotMatch    = 10
    Spectator        = 11
    EventGameMode    = 12
    NewPlayerMode    = 14
    FeaturedGameMode = 15
Aluerie commented 1 month ago

For example, GetRealTimeStats has them both as lobby_type and game_mode image

And so does TopSource GC Call image

But idk much about GSI maybe there is more straightforward way

Geczy commented 1 month ago

have i been looking at the wrong key this whole time? lol

my code uses lobby_type === 7 a lot, so sounds like that's still fine, since there's different types of ranked game modes

but having turbos counted in !ranked sounds like a bug

does !ranked return incorrectly too during a turbo match?

do you have a match id in the last 12 hours you can share, that was recorded on dotabod, which should be turbo but isn't counted as such?

Aluerie commented 1 month ago

haha, quick search in twitch tags "turbo" gave me this streamer https://www.twitch.tv/d0ters

their last turbo game ended just now 7955145008

!ranked worked properly (translation: no, it's not ranked) image

Geczy commented 1 month ago

i see why it's happening now , i think because lobby type is 0. will check into it

Aluerie commented 1 month ago

rosh thing still wrong.

this is a turbo game 7968975075, rosh fell at 33:04 so the response should be 37:04-38:34

image

Edit 2: actually mmr thing is also still bugged :D the guy got +mmr for losing this game.

Edit3: he didnt get mmr for winning next turbo game though...

Edit4: maybe disregard two edits above, maybe, the thing that confused me is that it showed wrong account's mmr on stream? Maybe?

Geczy commented 3 weeks ago

so is it wrong? lol