Forum


Notifications
Clear all

MCPE/Bedrock Statistics

McBedrock
(@mcbedrock1)
Illustrious Member Admin

Statistics

Ever wanted to know how many blocks you have mined or how many days you have spent in the nether? What about how much damage you have taken from falling or how many innocent dolphins you have needlessly slaughtered? Well good news, now you can see all of these and many many more!

 

Info:

If you are like me and are still hoping for a parity update to bring in-game statistics to Bedrock, fret to more, as this addon gives players this feature now while we are patiently waiting for an official release!

This behavior pack uses the experimental GameTest Framework to capture in-game events, dynamic properties to store them, and makes them viewable through custom in-game menus. There are also options to track specific event types in the action bar, how frequently to display them, and track them in the display scoreboard.

This scoreboard tracking also means you can do things like challenge your friends to “first to mine 1 thousand blocks” or whatever you can dream up.

This behavior pack is intended to be as minimalistic and non-intrusive as possible, so it is all contained in a single custom javascript file, which allows for it to work with most other behavior packs as it does not override any vanilla game files.

 

As there is limited space in the dynamic properties and GameTest Framework is still in beta, not all events are tracked, and some common in-game scenarios do not yet have events that can be tracked.

!!WARNING!!

GameTest Framework is currently experimental and in beta. So, make a backup of your world before adding this addon, and you may want to make frequent backups.

 

Viewing the statistics:

To view the custom statistics menu, the player must enter a custom command into the chat window. To do this, first open the chat window (default is the “T” or “Enter” keys), then enter “!s” (without the quotes) into the chat and send it (default “Enter” key).

Also, approximately 10 seconds after a player joins the world, then will be sent the following message, to alert them of this information.

Once the !s message is sent in the chat, the following message will be displayed.

Then, as the message says, exit the chat and right-clicking on any block in the world (or right-clicking the air with an item equipped) to view the statistics menu.

 

Features:

Player statistics – Tracked events that are specific to each player individually.

Global statistics – Tracked events that are shared and contributed to by all players.

Statistics progress display – Specific to each player, defines which statistics updates are displayed during gameplay.

Player progress display interval – Specific to each player, defines how often player statistics updates are displayed during gameplay.

Global progress display interval – Specific to each player, defines how often global statistics updates are displayed during gameplay.

Admin – Additional options for displaying scoreboard updates to all players.

 

Player statistics:

The tracked player events are broken out into subcategories, so that can be more easily found. There is very limited space for player dynamic properties, so not all events are tracked. Subcategories are:

General – Time played, crops harvested, distance traveled, etc.

Blocks Broken/Placed – Dirt broken, stone broken, obsidian placed, etc.

Blocks Interactions – Interactions with blocks like crafting table, furnace, chest, etc.

Items – Ender pearls thrown, eyes of ender used, etc.

Damage – Damage from/to various sources.

Kills – Killing blows from/to various sources.

 

Global statistics:

AD

The tracked global events are broken out into subcategories, so that can be more easily found. There is ten times more space available in global dynamic properties than what is in player, but there is still not enough to track every event with 100% granularity, so still not all events are tracked. Global also has most of the same ones as the player section, but has the total from across all players. Subcategories are:

General – Cat gifts, damage from magma blocks, etc.

Blocks Broken/Placed – Crying obsidian broken, copper blocks placed, etc.

Blocks Interactions – Doors opened/closed, levers flipped, etc.

Items – Rotten flesh eaten, arrows fired, etc.

Damage – Damage from/to various sources.

Kills – Killing blows from/to various sources.

 

Statistics progress display:

Both the player and the global event progress can be displayed in the actionbar. Each player can choose which ones they want to see. The options are:

No progress display – None of the player nor the global events will be shown.

Player progress display – Only the player events will be shown, the global events will not be shown.

Player(no block total) progress display – Same as “Player progress display”, except the player total blocks broken and the player total blocks placed will not be shown.

Global progress display – Only the global events will be shown, the player events will not be shown.

Global(no block total) progress display – Same as “Global progress display”, except the global total blocks broken and the global total blocks placed will not be shown.

Player & Global progress display – Both the player and the global events will be shown.

Player(no block total) & Global progress display – Same as “Player & Global progress display”, except the player total blocks broken and the player total blocks placed will not be shown.

Player & Global(no block total) progress display – Same as “Player & Global progress display”, except the global total blocks broken and the global total blocks placed will not be shown.

Player(no block total) & Global(no block total) progress display – Same as “Player & Global progress display”, except the total blocks broken and the total blocks placed will not be shown for either the player or the global.

 

Player progress display interval:

This works in conjunction with the “Statistics progress display”, and allows each player to define how often they want to see the player event progress messages. The available options are:

Scaling – Event numbers 1 through 10 are displayed, then every 10th number until 100, then every 100th number until 1000, etc.

Every 1000 – Event number 1000 is displayed, then 2000, then 3000, etc.

Every 100 – Event number 100 is displayed, then 200, then 300, etc.

Every 10 – Event number 10 is displayed, then 20, then 30, etc.

All – All event numbers are displayed

 

Global progress display interval:

This works in conjunction with the “Statistics progress display”, and allows each player to define how often they want to see the global event progress messages. The available options are:

Scaling – Event numbers 1 through 10 are displayed, then every 10th number until 100, then every 100th number until 1000, etc.

Every 1000 – Event number 1000 is displayed, then 2000, then 3000, etc.

Every 100 – Event number 100 is displayed, then 200, then 300, etc.

Every 10 – Event number 10 is displayed, then 20, then 30, etc.

All – All event numbers are displayed

For all options that can skip numbers, a number may be displayed that is not an exact multiple. This will happen when the increase amount pushes the new value over the display threshold. (i.e. current damage total is 95 and the player does 10 points of damage with one hit, then the value 105 will be shown instead of 100)

 

Admin:

In order to set the scoreboard display or change the update interval, the player must be designated as an admin. As the API currently does not give access to the player’s operator status, this has been implemented via an “admin” tag. Any player with this tag can change these options at any time and can add or remove admin status from any other player. To make sure these options can be changed without needing a super-user or server commands, the first player to enter the world will get the admin tag assigned to them.

 

(Admin)Clear scoreboard display:

If the scoreboard is currently displaying, this option will stop if from displaying. (This option will not be available if the scoreboard is not displaying)

  

(Admin)Scoreboard progress display player:

Any of the player tracked events can also be displayed in the scoreboard. The submenu pages follow the same layout structure as the “Player statistics” submenu.

 

(Admin)Scoreboard progress display global:

Any of the global tracked events can also be displayed in the scoreboard under the name “GLOBAL”. The submenu pages follow the same layout structure as the “Global statistics” submenu. If the selected global tracked event is also tracked in a player dynamic property (like total blocks broken), then all online players will also be displayed in the scoreboard.

 

(Admin)Progress update interval:

By default, all dynamic properties that are updated over time are updated once every 5 seconds. This menu option will allow the admin to drop the update loop as low as once every second. This will mean that properties like distance travelled will be much more accurate and there will be less potential delay between an event and when the scoreboard updates, but as some properties require calculations this can create lag spikes.

 

(Admin)Admin players:

Allows the admin to remove admin status from any admin player currently online. (including themselves)

 

(Admin)Non-Admin players:

Allows the admin to grant admin status to any non-admin player currently online.

 

Additional info:

1.       Note for mobile users and users on slower devices. Since 1.19.20, there has been a watchdog time out to make sure addons don’t hang the game. This addon catches the watchdog, if it fires, and cancels it so as to allow all platforms to attempt to use this addon.

2.       As of 1.19.30, number dynamic properties have a maximum value of 999999986991104, but they lose precision when they get over 10 million. So, all numbers are currently capped at 10 million … sorry, no “first to mine 999 trillion blocks” challenges yet.

3.       As previously stated, there is limited space in the dynamic properties and GameTest Framework is still in beta, so not all events are tracked and some common in-game scenarios do not yet have events that can be tracked. (for example: stair blocks are not tracked individually, neither are slabs, … there is no event yet for player death, …)

4.       This also mean that if you are using another behavior pack that also stores data in dynamic properties, then there will likely be conflicts between them.

 

5.       The scoreboard does not always space things nicely, and I have not yet found a way to adjust its formatting.

6.       The scoreboard will continue to display offline player’s info (until there is a server/world restart or the event being tracked is changed). I actually prefer it this way, but if enough people prefer it to only show online players, then I will consider adding an option to make this configurable.

7.       If any of the “Statistics progress display” options that include the player events display are chosen, the real-world and Minecraft days played is also flashed in the title/subtitle as new days are completed. As with the previous bullet-point, if enough people want to not have this with these options, then I will consider adding an option to make this configurable as well.

8.       Each of the scoreboard options to display days with a percentage are shown in the following format: <playername><days><0><percentage-complete-of-current-day>, with percentage being 0-99. Because the scoreboard truncates leading zeros, the display until the first day is completed will be in this format: <playername><percentage-complete-of-first-day>. For example, in the image above, the display is “MC days player(day 0 %)” and the first player has a value of “109082”, which translates to 109 days played & 82% done with day 110. Percentage is based on a 20-minute Minecraft day.

9.       The dynamic properties are stored as integers, but many values in the event are floats. Because of this, some precision will be lost and although rare there can be times when a value is either not recorded or one higher. 

 

Required minimum Minecraft Bedrock version:

This addon was developed for the latest stable version of the Gametest Framework (1.0.0-beta) and requires version 1.19.30 or higher.

 

This pack requires the following experimental game toggles to be on:

GameTest Framework must be enabled and, since this is a behavior pack, achievements cannot be earned with this addon.

 

Compatibility with other addon packs:

This pack uses only a single custom .js file. So, it is highly likely that it will work with other addons, as it does not override any vanilla behavior files (like player.json). But, if the other pack also uses dynamic properties, then it is highly likely that it will not play nicely.

 

Credit:

If you make a review, gameplay, or showcase about this addon, please give credit and/or put a link to this page.

Thanks, good luck, and enjoy!

 

 

As this likely is not the first addon pack you have tried (and there are numerous links and YouTube videos on the subject), you probably do not need installation steps … but just in case you do, here are some verbose instructions.

From the .zip file:

Download the .zip file.

Rename the file extension from .zip to .mcpack.

 

From the .mcpack file:

Download the .mcpack file.

Installing:

Make sure Minecraft is closed(not required, but is suggested), then double click on the .mcpack file.
Minecraft will run and, once the title screen loads, it will install the pack.

Creating a world with the pack included:

Go to the create world screen and configure your desired settings as you normally would.

BEFORE CREATING THE WORLD, go to the Experiments section, turn on GameTest Framework, and click “Turn on Experiments anyway” on the pop-up warning.

Go to Behavior Packs, click on the Available tab, find the pack, click on it, and click the Activate button.

The pack should now show up under the Active tab.

Finally, click on the button to create the world.

 

creator: https://twitter.com/BedrockChalleng                   

Installation

Pack requires version 1.19.30 or higher

Quote
Topic starter Posted : 06/10/2022 12:28 pm
Share: