mobarena / MobArenaPlaceholders

PlaceholderAPI expansion for MobArena and MobArenaStats.
5 stars 2 forks source link

MobArena Leaderboard Placeholder #11

Open PabloKateee opened 1 year ago

PabloKateee commented 1 year ago

A placeholder with the top players, where number of kills and waves would be visible for all would be a dream, so that other players know how good the best was etc.

SpencerMT commented 1 year ago

This would be awesome to have to be honest

garbagemule commented 1 year ago

Thanks for the suggestion, but we're definitely nowhere near a clear enough spec for any work to start yet.

First of all, just to clarify, we're talking placeholders for persistent stats here, right? Not stats for the current session? There is a massive difference, because data from the current session is somewhat simple to grab directly from the MobArena API, whereas persistent stats are only available via MobArenaStats, as they are stowed away in some (user defined) database. This means that for MobArenaPlaceholders to have access to these stats, MobArenaStats must expose them somehow.

Secondly, "top players" is not a well-defined concept. You mention "number of kills and waves", but these two metrics are not equivalent, and neither of them is well-defined on its own. What does "number of kills" mean? Is that the total number of kills across all arenas and all sessions, or is it the highest number of kills in any session across all arenas, or is it the highest number of kills in any arena across sessions? The same questions can be asked about the "number of waves" metric.

I could go ahead and just make a guess, but if there's one universal rule about software developers, it's that they're really good at making the wrong guess about what a user actually wants, especially when their requirements are vague and imprecise (which is why the field of UX is so massively underrated in the industry). We need to be much more clear about what we want here, and by "we", I mean everyone who's interested in this stuff, and not me 😛 I don't run a Minecraft server, I don't know what you guys want, so you have to be more specific.


To give an example of why these seemingly nitpicky questions matter, consider this hypothetical "kills table":

session | arena | player  | kills
---------------------------------
1       | a     | pablo   |    10
1       | a     | spencer |     8
2       | a     | spencer |     7
3       | a     | bob     |    11
3       | b     | pablo   |    14
4       | b     | spencer |    12
5       | b     | bob     |     9
6       | b     | bob     |     5
7       | c     | bob     |     5

In plain English, we can say the following about these sessions:

If we want to talk about the "top player" in these sessions, there are at least five (!!) different ways to slice the data:

I've created a DB Fiddle with the data and the queries. You don't have to be a database admin or a software developer to see just how different these five queries are. The third query (sum of kills per player for each arena) took me a while to figure out and I have no idea if it's portable to other database engines.

So... Who is the "top player"?

And this is just with kills. You mentioned two dimensions, kills and waves. So then what if someone is "top kills" but not "top waves"? Who is then "top"?

It's not that this isn't doable, but it is not clear what "top" means, which is why I had hoped that once the stats were in a database, server owners would just extract what they want and use it for their specific purposes. The total number of possible metrics is pretty big, and it's kinda ridiculous to try to expose all of them via the MobArenaStats API, because it would be like building a new version of SQL. In fact, this is exactly what SQL is so incredibly good at - arbitrary queries - so the only "right" solution would be to move the responsibility of picking the "right" query out to the server owners and admins - you have the data already, you know what you want to do with it, you "just" need to learn to extract it. Of course, this assumes that there are already tools available to help you along your way. I don't know if there are any PlaceholderAPI expansions that allow you to dip into any SQL database, but that would be an excellent tool for this purpose.

PabloKateee commented 1 year ago

Yes :D it is only about the placeholders for the permanent statistics. I can show you an example for a placeholder that could look like this.

  1. &e %mobarena_wave_1_alltime_name%
  2. &e %mobarena_wave_2_alltime_name%
  3. &e %mobarena_wave_3_alltime_name%

Leaderboard

  1. Pablo Wave 99
  2. BoB Wave 85
  3. Bill Wave 57
  4. Tom Wave 49

It's just about the placeholders that should be permanently sangezeigt in eienr so-called "lobby" So that new players also see it, to have the courage to also stand on the 1 place ^^

Where the mobkills are not necessarily so important, I think that later then only an infinitely long number in the leaderboard.

MaechtigerMatthias commented 1 year ago

The only reason we installed this on our server.

&e %mobarena_wave_1_alltime_name%
&e %mobarena_wave_2_alltime_name%
&e %mobarena_wave_3_alltime_name%

Would be amazing.

PabloKateee commented 8 months ago

Their plugin is absolutely awesome, but with the placeholders we still really need that 1 update from them :D A best list placeholder, where the players and rounds are in it I would give you an example:

%mobarenaround% %mobarenawave% %mobarenaplayer% %mobarenamobkills%

Example:

Mobarena Stats for all Players on this Server:

Player[A] Highsest Round 544 Mobkills: 23222 Player[B] Highsest Round 244 Mobkills: 20222 Player[C] Highsest Round 211 Mobkills: 18222 e.g The Mobarena is the most capable plugin I have ever seen. But the leaderboards placeholders are definitely missing, otherwise the players have no motivation to play high rounds because they don't know who is in first place or who is the best player in the mobarena. Because you can't make it visible to the players to show which player has survived how many rounds. If they provide this update, it will perfect the system 100%, as it is a factor for servers with active players to be the best and show it :D

Of course, after this update there will be something for the coffee fund from me as a thank you :D I would be very happy about positive feedback from you

Like This: 282305958-cb6d31fa-14a6-4ba7-8bb6-0d321bd51174

But only that you can see which player has overleveled how many rounds, and that you could maybe optionally add the mobkills :D

PabloKateee commented 7 months ago

there will probably be no update on this topic ? :(

garbagemule commented 7 months ago

I still think it's too vaguely defined.

The proposed placeholder names are not consistent with the current naming conventions, and the questions in my original answer are still left unanswered. We need something concrete that actually addresses the questions and looks past what any one person wants, because otherwise there will be a new issue immediately after the release of this feature saying "oh that's not what I wanted, I want something different, please make it so we can toggle between them". It doesn't seem like there is much consensus about what "we" actually want here, just "all-time" and "top", which doesn't really address the issue of the current placeholders and how they are grouped.

That said, with the precious little time I have, I'm spread way too thin across the core plugin and the stats and placeholders extensions. My focus is on the core plugin, so if anyone wants to take a stab at this, I'm more than happy to help flesh it out and review PRs, etc. But if I have to do all the heavy lifting, it'll probably take a while.