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.

Modifying Stats

All 3 types of stat can be modified with an Action that corresponds with each stat type. The "Change Player Stat", "Change Global Stat", and "Change Team Stat" Actions each contain a stat key input, a mathematical "Mode" (operation), and an "Amount" value to serve as the operand. The "Amount" input only accepts integer values and Placeholders. Additionally, the "Change Team Stat" action contains a setting for which Team the team stat should apply to.

Change stat actions currently support five mathematical operations: Increment, Decrement, Set, Multiply, and Divide. The "Amount" value is used as the operand for the supplied mathematical equation, following the function x := ƒ(x, y) where x is the supplied stat's value, y is the "Amount" value, and ƒ is the operand's function.

This can largely be read in plain text as self-explanatory:

> Stat "Kills" ; Mode "Multiply" ; Amount "2"

This "change stat" action will act as the following C/C++ code:

> Kills = Kills * 2 or > Kills *= 2

Limits

Player stats are limited to 200 keys per player. Global stats are limited to 200 keys per House. Team stats are limited to 200 keys per Team.

Placeholders

All stats can be referenced within Placeholders, which allows their values to be parsed into text. This can be used to show stats in chat, titles, or most other text displays. This can also be used to modify a stat by another stat value.

The placeholder for player stats is %stat.player/<key>%, or %%stat_<key>%%. The latter is now deprecated.

The placeholder for global stats is %stat.global/<key>%, or %%globalstat_<key>%%. The latter is now deprecated.

The placeholder for Team stats is %stat.team/<key> <team name>%.