Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
15 stars 13 forks source link

Number of teams to trigger end game award printing #20

Closed specing closed 7 years ago

specing commented 7 years ago

Why does this number have to be greater than 2? Does it take gaia team into account? I am opening this issue as it did not print statistics after multiple 1v1 games and there are no comments near that line explaining the >2.

https://github.com/Yaribz/SPADS/blob/master/src/spads.pl#L12733 spads.pl(stable):12653 if($nbTeamStats > 2 && $conf{endGameAwards}) {

Yaribz commented 7 years ago

The "2" here doesn't take gaia team into account.

SPADS awards are basically a system to showcase the best players regarding some specific statistics after each game. When it's a 1v1, these "awards" don't really make sense imho: either your are the best among the 2 players regarding these stats, either the worst. Of course if you want to check the statistics after a 1v1 you can still issue the !stats command.

If you really want to see this information even for 1v1, I guess I could modify the output to not call them "awards" for 1v1 but still show the information in some way...

specing commented 7 years ago

I doubt this: "either your are the best among the 2 players regarding these stats, either the worst.". It should be possible to get e.g. micro award even though you lost. Likewise for others. I will watch !stats

Yaribz commented 7 years ago

I meant: for each of these specific statistics, either you are the best, either you are the worst. It's not "awards" properly speaking...

specing commented 7 years ago

I see. Well it would be still good to see who did better in specific statistic. Additionally I'd recommend splitting this code to a plugin or something that would allow easier additions of custom awards.

One more thing and probably offtopic: how are the awards on replays.springrts.com / hall of fame calculated for e.g. BA?

Yaribz commented 7 years ago

Thank you for your recommendation, but tbh I'm afraid this is far from the only section of SPADS core which should be split... Basically SPADS should just consist in a set of "functionality modules" added to a generic Spring lobby bot core code. That's what I would have done if I had known SPADS would grow that much over years and become quite used...

However, it's already possible to implement your own custom awards with current plugin interface. You just have to implement the "onGameEnd" customization callback which receives as parameter a reference to a hash containing all end game data (including team statistics in the key named "teamStats").

Concerning your question about replays.springrts.com, I don't have the answer as I'm not involved in the replay site development. You should ask the replay site maintainer (Dansan).