Game Stats Functions
These filters are designed to calculate and format statistical values related to user and server data on your website.
accuracy (Filter)
Calculates accuracy as a percentage based on two values.
Parameters
Parameter | Type | Description |
---|---|---|
value | int | The successful attempts (e.g., hits, headshots). |
total | int | The total attempts (e.g., shots fired, kills). |
Usage
Basic example:
{{ "50" | accuracy(120) }}%
Using dynamic values:
{{ player.stats.headshots | accuracy(player.stats.kills) }}%
kd (Filter)
Calculates a ratio between two values, commonly used for win/loss, success/failure, or similar statistics.
Parameters
Parameter | Type | Description |
---|---|---|
kills | int | The number of kills. |
deaths | int | The number of deaths. |
Usage
Basic example:
{{ "50" | kd(120) }}
Using dynamic values:
{{ player.stats.kills | kd(player.stats.deaths) }}