Stats

The Hiro Stats system is a versatile feature designed to enhance player experience by managing and displaying player statistics. It allows players to have both public and private stats, catering to the diverse needs of game dynamics and player preferences.
Public stats are visible to all, fostering a competitive and interactive gaming environment, while private stats are confined to individual players, allowing them to monitor their personal progress.
The system is highly flexible, enabling updates through various operators such as delta, set, min, or max, providing a comprehensive approach to stat management. Whether it’s setting a new value, adjusting by a certain amount, or determining minimum or maximum values, the Hiro Stats system ensures seamless and dynamic stat modifications to enrich gameplay.
The public stats are stored in the player’s Nakama account metadata and the private stats are stored in Nakama storage.
Customization parameters #
The following JSON represents the customization parameters you can use to configure the default user experience for the Stats system.
| |
Stats #
| Property | Type | Description |
|---|---|---|
stats_public | {}string, StatsConfigStat | A dictionary where the key is the stat ID and the value is the StatsConfigStat. |
stats_private | {}string, StatsConfigStat | A dictionary where the key is the stat ID and the value is the StatsConfigStat. |
StatsConfigStats #
| Property | Type | Description |
|---|---|---|
value | int64 | Default initial value |
AdditionalProperties | {}string, interface | A dictionary of additional properties. |
