Skip to main content

Basic Setup

After installing, navigate to "Edit/Plugins". Enable 'Player Statistics' and restart the editor.

Setting

All configuration is performed inside the Player Statistics projects settings menu. To find this menu, simply select “Edit/Project Settings”, it can then be found under the ‘Game’ section.

Settings

Defining Statistics/Statistic Groups

Within the first section of the settings menu a list of all player statistics can be found. Each of these is broken into a Group/Category with a list of all stats related to it. All stats must have a unique key to ensure that they can easily be referenced in blueprint code/C++. Define all stats you wish to have in your game here.

Define Data

There are a number of properties which can be set to customise each player statistic. These are described below.

Statistic Group

PropertyDescription
Display NameThe name of the statistic group which the player will see in-game.
DescriptionA description of the type of statistics within this group. The player will see this in-game.
StatsAn array of all statistics part of this group. See Player Statistic. for more information

Player Statistic

PropertyDescription
KeyA unique key used to identify a player statistic in blueprint/C++ code.
SuffixA string to add to the end of a statistic when viewing on the UI.
PrefixA string to add to the beginning of a statistic when viewing on the UI.
TypesControls how a player statistic is adjusted/displayed to the player. There are 8 options to select from. See Types for more information.
AsTimeTreat the current statistic as a time. This works for any number based type. Displays the value in a formatted time converting from milliseconds

Types

PropertyDescription
AverageTakes all values added and displays the average.
Examples : Average score, Average completion time.
Binary PercentageTakes a number of bools and displays the percentage of true inputs.
Examples : Bullet hit accuracy, Kill Death ratio (KD).
Int CounterSimple int counter.
Examples : Bullets Shot, Jumps made, Total Kills.
Float CounterSimple float counter.
Examples : Distance Traveled, Money Collected.
Custom TextStores a custom string value which can be set to anything.
Examples : Last Visited Town. Most used weapon.
High ScoreOnly updates saved value if larger than previous.
Examples : Furthest Distance traveled, Most points in one game.
Low ScoreOnly updates saved value if smaller than previous.
Examples : Worst performance, Least damage taken in single game.
TimerAutomatically keeps track of time passed between two defined points.
Examples : Total Playtime, Total time spent in taverns.
danger

After adding, removing or rearranging any player statistic or group from the list, you must delete the save file from ** “ProjectName/Save/NameOfSaveFile.sav” **. Failure to do this may result in unexpected behaviour.


Other Settings

SettingDescription
SaveGameNameThe name of the save game slot used to keep track of player statistics states.
UseAutoSaveIf true the states of all player statistics will be saved to a SaveGame at every SaveFrequency seconds.
SaveFrequencyThe number of seconds between each auto save.
SaveOnExitIf true, all player statistics will be saved as the game shuts. Should be used with AutoSave or manual saving to prevent data loss if the application force exits or crashes.
SaveAnLoadTimersOnExitIf true, all active timers will be saved when exiting the game and restarted automatically next launch.
TimerUpdateFrequencyThe frequency that timers recalculate and add the amount of time passed.
DisplayShortTimeIf true UI representations of time will be shortened e.g. Minutes becomes Mins.
FloatingPointPrecisionRound all floating point representations to this number of decimal places.
ConstantlyUpdateOnUIListIf true, the values of all player states including timers will be updated to the UI constantly while viewing the statistics list.