Skip to main content

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

ParameterTypeDescription
valueintThe successful attempts (e.g., hits, headshots).
totalintThe 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

ParameterTypeDescription
killsintThe number of kills.
deathsintThe number of deaths.

Usage

Basic example:

{{ "50" | kd(120) }}

Using dynamic values:

{{ player.stats.kills | kd(player.stats.deaths) }}