Skip to content

Player Badge system

Dev edited this page Jun 18, 2023 · 7 revisions

As of release v2.9(.1), I added a feature to the TCDCommons API mod called the "Player Badge system". This feature allows mods to assign to players what's known as "badges", and is primarily used by this mod, betterstats. Badges are intended to be kind of like advancements, but more special, as they're supposed to highlight a player's special achievements. Keep in mind that the system is not intended to be a replacement for advancements, or feature any badges that are similar to an advancement.

betterstats's statistics screen implements a GUI that displays a list of badges that are assigned to a given player. This mod also features some of its own badges, all of which are "client-side".

Badge types

  • Regular badge: This type of badge is present on both ends (client and server). Both the server and client "register" the same badge on their ends, the server then assigns that badge to a player of its choice, after which that player aka client is able to see they have that badge assigned to them by the server.
    • betterstats does not implement any of such badges, as it aims to be as "client-side" as possible.
  • Client-side badge: These are technically non-functional, and they do nothing. It's basically a type of badge that is only "registered" on the client, but not on the server. This means a server cannot assign such badges to its players. So what a client can do is, when it receives a list of badges from the server, it can put its own client-side badges into that list as well.
    • betterstats does implement some client-side badges. They are based on a given player's statistics. So for example, if you obtain the dragon egg or if you play for long enough, betterstats will render an extra badge on your list of badges.
  • Http-client-side (exclusive to betterstats): These are some special client-side badges that belong to betterstats. The difference here is that they are not granted by the client (aka stat-based) or the server, instead they are granted by this mod's repository. May sound strange at first, but what this means is, the client will send an HTTP GET request to this repository to check if it grants the target player any badges (don't worry, the client also performs in-memory caching, so you don't have to worry about traffic bandwidth).
    • Altho exclusive to betterstats in this case, it technically is possible for any mod to implement such a thing.

Disabling all of this

Some people might not like it, not want it, or just simply don't feel like this feature would fit their mod-packs. If you wish to disable this feature, then you will have to create a config file for the tcdcommons mod, and disable it from there. Here's how:

  1. Go to .minecraft/config. Keep in mind that .minecraft represents the directory where you have the game installed, so if you installed it elsewhere, then go there instead.
  2. Create a file named tcdcommons.json if there isn't one already.
  3. Write this text into it: { "enablePlayerBadges": false }. If you cannot open .json files, then make sure you are trying to open it with a notepad app. Also, make sure the JSON syntax in the file is valid. If you make a JSON syntax error, then the config file will likely be ignored.

Once disabled, the feature will be treated as if it doesn't exist at all.
tcdcommons will not use the S2C network protocol to send player badges, betterstats will not display their statistics, the /badge command will be disabled, and betterstats will not send any HTTP GET requests to this repository to obtain extra badges.
However, tcdcommons will make sure that players who have been granted badges keep those badges by saving/loading them whenever needed. This is to prevent data loss.

Better Statistics Screen's badges

As mentioned earlier, as of v2.9(.1), all badges betterstats adds are client-side. In v2.9(.1), three of them are client-side, and another three are http-client-side. These badges are intended to reward players for their progress.

Stat-based badges

Badges shown for people who have certain statistics.

❔ No badges

ID: badgeless
Type: client-side
GUI Icon v2.9(.1): A gray question mark. There is an easter egg where the badge icon would change to something else depending on the current day of the year.

This badge indicates the player has no badges assigned to them. The reason I initially added it was to fill in the empty space that would appear if absolutely zero badges were to be displayed on the statistics screen. Later, I figured it has more uses, such as letting people know of the "Player badge system"'s existence.

⬛ Dedication

ID: dedication
Type: client-side
GUI Icon v2.9(.1): A gray/iron-like colored redstone-clock item.

This badge rewards those who have played on a world or server for at least 12 days (equivalent to 288 real-life hours).

⬛ Loyalty

ID: loyalty
Type: client-side
GUI Icon v2.9(.1): A yellow/gold-like colored redstone-clock item.

This badge rewards those who have played on a world or server for at least 24 days (equivalent to 576 real-life hours).

⬛ The Next Generation

ID: the_next_generation
Type: client-side
GUI Icon v2.9(.1): I tried drawing a pixel-art dragon egg. I did my best, okay?

This badge acknowledges players who "Have held the symbol of ultimate triumph - the Dragon Egg." (v2.9(.1) badge description).

This repository's badges

Badges that are intended to encourage contributions to this repository. They are intended to be obtainable by pretty much anyone who contributes in one way or another.
If you qualify for one of those badges, either I will notify you, or you can let me know as well. Also you qualify even if you made a contribution prior to this feature being released.

Important: Because I do not have the resources to privately host these on my own servers or stuff like that, I decided to host them on this GitHub repository instead (plus it feels safer here). Because of that, all information about people that were granted repository badges is fully public for anyone to see. Even if you choose to ask me to remove your badges, anyone can still view the Git commit history. As a privacy measure, I do SHA256 people's UUIDs to make it harder to tell who a set of badges truly belong to, but that's just "security through obscurity". If you are comfortable with everyone being able to see what badges were assigned to your Minecraft account, then you may be granted those badges.

❤ Better Stats supporter

ID: bss_supporter
Type: http-client-side
GUI Icon v2.9(.1): A heart-shaped object with a simplified BSS logo on it.

(as of v2.9(.1)) I don't really have a use for this one yet, but it's intended for people that show support for this mod or its development. I am still yet to define what "support" means in this context. I want it to be something anyone can achieve, so as to not "gate-keep" people away like Mojang does with capes.

⚪ Better Stats bug hunter

ID: bss_debugger
Type: http-client-side
GUI Icon v2.9(.1): A circle with a simplified BSS logo on it.

Granted to those who report an issue. It can be anything (so long as it's a proper issue and not spam or invalid). You could report a bug, a crash, or report a typo you spotted, issues with this wiki, and so on..

📖 Better Stats translator

ID: bss_translator
Type: http-client-side
GUI Icon v2.9(.1): An opened book with the letter T as in "translation" and a simplified BSS logo.

Granted to those who contribute to translating the mod. Translations to a language should be complete, and not just a few translated texts.

Clone this wiki locally