pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
227 stars 53 forks source link

Interface for Meta Statistics #98

Open avresb opened 4 years ago

avresb commented 4 years ago

Hi,

So after sifting through the code I decided that my high school computer science knowledge on python just wouldn't cut it with this.

Would you be able to add an award (like diamond ore mined) where it ranks the players based on a sum of ranks? So rank #1 will always be the person who has the lowest rank in every event overall (the lowest sum of ranks).

Another award that we need is one where the player that has taken the most #1 spots off unique people gets #1 rank.

Perhaps if you could implement these 2, I would have more of an idea how to tackle the rest of the awards (more rank-based ranking awards).

Thanks a lot in advance! Chris

pdinklag commented 4 years ago

First off, thanks for your interest! Hm yes, the addition of events kinda makes it natural to add "meta stats" like you mentioned, e.g. "most events won".

So after sifting through the code I decided that my high school computer science knowledge on python just wouldn't cut it with this.

The difficulty here lies in the fact that there is currently only one pass that reads statistics for the players. In order to implement statistics that consider rankings of other statistics, one would need to schedule them.

The medals and the hall of fame points are currently the only statistics of this kind, but they're pretty much hardcoded into the system right now. So that's where your idea would come in: build a generic foundation for these meta statistics that is used by medals and hall of fame, but can also be easily used by others.

I'll have a look soon, can't make exact promises as to when. Seeing 1.16 getting closer, I'll have to look at Minecraft Stats soon anyway. 🙂

avresb commented 3 years ago

Hi, Sorry to bother, but an update on the situation with this feature would be very much appreciated.

Thanks in advance :)

pdinklag commented 3 years ago

The situation is simple: it's a free-time project for nothing but fun and I honestly can't make any promises as to when anything in particular will be added, especially since this is not something commonly required.

I'm sorry that's probably not what you like to hear, but the project is also open source and I'd be willing to take pull requests.

pdinklag commented 3 years ago

This is tricky because of circular dependencies.

Let's say you add a stat for (1) "most bronze medals earned" and (2) "most silver medals earned" - and a player gains a bronze medal for (2). Will that be included in (1)? If so, that could be expressed by a proper order (e.g. using priorities) - but that would mean that a silver medal in (1) is not recognized by (2), which would be inconsistent.

The only proper way to solve this that I see is to rule that meta statistics cannot read other meta statistics. Because of that, IMO, they should also be displayed separately from the rest so things stay consistent, e.g. above the others.

By the way, I don't quite understand this:

Another award that we need is one where the player that has taken the most #1 spots off unique people gets #1 rank.

It's unclear to me - what exactly would this stat be counting?

avresb commented 3 years ago

Hi, I think that having all meta stats separate from existing ones makes more sense (displaying them separately). My idea anyway was to have a monthly cycle with these unique meta stats as events.

It's unclear to me - what exactly would this stat be counting?

When someone becomes ranked #1 from rank #2 at a stat, the previous ranked #1 person's IGN is noted and the stat increases by 1. There should be a check before increasing this stat to make sure that each overtake is a unique IGN.

This stat in particular I don't actually see working properly without heavy activity in stats within our playerbase, so I am totally okay with you putting this one to the side for now.

Thanks for your help!

pdinklag commented 3 years ago

I think that having all meta stats separate from existing ones makes more sense (displaying them separately).

Alright.

When someone becomes ranked #1 from rank #2 at a stat, the previous ranked #1 person's IGN is noted and the stat increases by 1. There should be a check before increasing this stat to make sure that each overtake is a unique IGN.

This is not possible at all currently, and it's really a different issue. There is no concept of an award history right now - the updater does not load old award rankings or keep any kind of history beyond the last ranking. I'll open up another issue for that.