Stats
Stats are a mechanic in Housing that allow you to store non-decimal numbers (integers) for extended periods of time. They can be saved to a team or to the house for an indefinite amount of time, or to a player for up to 14 days (365 days with Housing+). Stats are only stored if their value is not equal to 0, as is this their default value.
Interacting with stats
All types of stats can be modified using their relevant actions, such as Change Player Stat for player stats. These actions follow a template where you are able to define various options. These include the stats key (name), the operation to perform on the key, and the value to use in the operation such as setting the stat to the provided value. The Change Team Stat action also allows a target team to be provided, defaulting to the player's current team.
There are currently 5 operations, these include incrementation (+), subtraction (-), setting (=), multiplication (×) and division (÷). As mentioned previously, these take the value and use it as an operand alongside the stat's original value. This is with the exception of setting a stat, which is always going to overwrite the current value.
Displaying and referencing stats
Stats can be displayed and referenced using placeholders. These can be used in contexts such as holograms, but also as a value when interacting with stats or conditionals.
%stat.player/<key>% %stat.global/<key>% %stat.team/<key> <team name>%
Limits
By default, there can only be 40 stat keys stored for each type of stat. This limit is applied on a team basis for team stats. For Housing+, this limit is upped to 200. Stats with a value of 0 do not count towards the limit. You can go past the limit on certain types of stats up to a certain point. This is unsupported and may cause immense performance issues as well as stats randomly disappearing or not being loaded properly.
Player Stats can only be stored for up to 14 days after the player was last seen in your house, or 365 days with Housing+. You can change the default duration for how long a stat is stored for offline players in your houses's settings.