Stats are a system of storing integer values. There are three types of stats within Housing: Player Stats(sometimes referred to as just "stats"), Global Stats, and Team Stats. Stats do not need to be initialized, and instead default to the value 0, only being stored in memory once a stat's value is changed to be non-zero.

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>%.