There were a lot of small changes in recent few months, but it was not mentioned in the changelog/news. Let’s fix this:
– added ratings games, time_played, level.
The level rating is especially interesting, because it unlocks the limit of 2400 max level in ds, now you can know what level you would have been if not for the maxlevel limit, or if not for you losing your bank files/levels.
– added various 1v1 commander/race-specific ratings:
it calculates your 1v1 rating properly: it keeps track of the rating on all commanders/races, and when you-mengsk beat opponent-raynor, it will use raynor’s 1v1 rating (not his main account rating) to calculate the difference. So this is a fair 1v1 competition, with proper per-commander/race ratings used in calculations.
Now playing 1v1 as some extremely weak commanders like swann can be fun again: you don’t have to be better than everyone else picking strong commanders like raynor, you just have to be better than other swanns!
– changed main_next to double the rating change for mirror matchups. It’s extremely important for 1v1. For 2v2 “mirror” would require cmd1+cmd2 vs cmd1+cmd2 OR cmd1+cmd2 vs cmd2+cmd1 to be applied. Same for 3v3, it must be either full mirror, or the mirror where opponents commanders are shifted 1 or 2 times, for example cmd1+cmd2+cmd3 vs cmd3+cmd1+cmd2, the order must be preserved.
Statistically speaking, it will almost never happen for 3v3, unless you make it so in a private lobby.
This is mostly for 1v1. Your matchup may have been unfavorable and you’ve lost. But if you’ve lost to the same commander as you are, it must mean you are indeed weaker, the rating change deserves to be larger.
– fixed a replay parse bug (implemented a workaround for Direct Strike bug) where the base building might have exploded, but it’s HP is actually not 0, game not ended. Such game was recorded as lost for the team who’s base got that DS bug. Now I’m watching the game until the very end, and using the last base explosion event to determine who’s won. Thanks <STDES> PNR (@pingpong) for reporting it!
– added support for custom user ratings! https://github.com/dima-stefantsov/dsr_ratings
now anyone with ideas in mind can see them working on DSR. This is like “plugins” for DSR, just a simple snippet of code is enough. It’s sole responsibility is to decide the rating change for every player in the given game. A simple example is there, https://github.com/dima-stefantsov/dsr_ratings/blob/master/calculators/pink_color_rating.php, see how it just checks “player color is pink? increase player rating by +1, otherwise decrease player rating by -3”.
just like 1v1 commander/race ratings, solo/team ratings are smart inside: they keep track of solo/team performance for all participants, and if you are playing solo and happened to face against a team, your solo rating will be used, while opponent team rating will be used, in the end you will most probably lose to a team, but you will not lose a lot of rating, because enemy team rating was used for calculators.
In 3v3, there may be a “team” of 2man, and 1 solo player on the same side. Their inner team and solo ratings are used accordingly.
As for how it is determined, what is “solo” and what is a “team”, this part may require some improvement, but it’s currently good enough. Currently, the logic for “is team?” is following.
We are looking at “Teammates” list, the one you can find in every player profile. A player in your team is considered your teammate, if:
(your games together > 10 and person position in teammates list <= 50) or
(your games together > 20 and person position in teammates list <= 100) or
(your games together > 30 and person position in teammates list <= 200)
This is retroactive: if right now you have 11 games with someone, and he is in top50 of your teammates list (this one fits to be counted as a teammate), then all 11 of such games will be counted as “team”, even if you’ve just passed the “team” threshold with the last 11th game.
You can check this logic for your own profile, and profiles of your friends. For everyone I’ve checked, this kind of threshold looked about right. And if a game here and there has slipped outside this boundaries, it’s no big deal in a big picture: the most impactful teammates are ones you’ve played the most together. If you happened to just play with someone like 6 times, this is not considered being a team, but it’s just 6 games, impact is not big.
There’s no other way of knowing are people in a team, can not get the state of party from replays, and even if we could, nothing would stop people from joining same lobby team, while not being in a party.
This “is a teammate” is checked for each player both directions “is player1 a teammate of player2 OR is player2 a teammate of player1”, to detect being a teammate more reliably.
– now for your custom ratings you can use the knowledge “is in team”
$player['is_solo'] = !dsr__have_teammates_in_game($player, $team);