Skip to content

Steamworks Stats Setup

This section explains how to create and configure stats in Steamworks so they can be accessed and unlocked through the Steam Stats subsystem.


Stats are configured in the Steamworks dashboard for your application.

To access the achievements configuration:

  • Open the Steamworks dashboard and select your application
  • Open the application checklist and navigate to Edit Steamworks Settings
  • Open the Stats & Achievements section and select Stats

Creating a New Stat

To create a new stat, click New Stat on the Stats page in the Steamworks dashboard.

Each stat is defined by a set of fields that control its data type, update rules, limits, and API integration.


Stat Fields Overview

Type

The Type defines the underlying data type of the stat.

Supported stat types include:

  • INT - integer value, commonly used for counters, scores, kills, wins, or progress values.
  • FLOAT - floating-point value, typically used for averages, ratios, or precision-based metrics.

The selected type must match the type used when updating the stat via the API.

API Name

The API Name is the identifier used by the Steam API and must exactly match the Stat ID used in code.

This value is case-sensitive and should be treated as a stable identifier that is not changed after publishing.

Set By

The Set By field defines which system is allowed to modify the stat.

For most games, this should remain set to Client, allowing the game to update stats locally through the Steam API.

Server-authoritative stats are only required for specific multiplayer or anti-cheat use cases.

Increment Only

When enabled, the stat can only be increased and cannot be decreased.

This is commonly used for lifetime counters such as total kills, total matches played, or total collectibles found.

If disabled, the stat can be freely set to any value through the API.

Max Change

The Max Change field limits how much the stat value can change in a single update.

This helps prevent accidental large jumps caused by bugs or invalid data.

If left empty, no per-update limit is enforced.

Min Value

The Min Value defines the minimum allowed value for the stat.

Any attempt to set the stat below this value will be clamped by Steam.

This field is optional and can be left empty if no minimum is required.

Max Value

The Max Value defines the maximum allowed value for the stat.

Any attempt to set the stat above this value will be clamped by Steam.

This field is commonly used for progress-based stats linked to achievements.

Window

The Window field is used for rolling or time-based stats.

It defines the aggregation window over which values are calculated.

For most standard stats, this field should be left empty.

Default Value

The Default Value is the initial value assigned to the stat for new users.

If not specified, the stat defaults to zero.

Aggregated

When enabled, the stat is treated as an aggregated stat by Steam.

Aggregated stats are primarily used for global or backend-driven statistics and are not commonly required for standard gameplay stats.

Display Name

The Display Name is the player-facing name shown in community pages and stat listings.

This value supports localization through Steamworks localization features.


Integer vs Floating-Point Stats

Integer stats are best suited for discrete values such as counts, scores, and progress tracking.

Floating-point stats are better suited for values that require precision, such as averages or performance metrics.

The stat type cannot be changed after publishing, so it should be chosen carefully.


Stats and Achievements Integration

Stats are often used as the backbone for incremental achievements.

When a stat is linked to an achievement as a Progress Stat, the achievement unlocks automatically once the stat reaches its configured maximum value.

In this case, the stat must be updated consistently and monotonically if Increment Only is enabled.


Publishing Stats

Stats must be published in Steamworks before they become available at runtime.

Unpublished stats will not appear in the Steam API and cannot be read or written.

After publishing, changes may take a short time to propagate to all Steam clients.


Common Configuration Mistakes

  • API Name does not match the Stat ID used in code
  • Stats were created but not published
  • Stat type does not match the type used in API calls
  • Increment Only enabled while attempting to decrease the stat
  • Max Value is too low for the intended use case
  • Testing is performed with the wrong App ID or without Steam running