Set Local (Cached) Stats (Batch)

Writes multiple user stats into the local Steam cache in one call. Each array item selects the stat’s API name and type (Integer / Float / Average). Call Store User Stats & Achievements afterward to persist.
Inputs
Pin |
Type |
Description |
|---|---|---|
Stats To Set |
TArray<FSAL_StatWrite> |
Array of writes. For each element: • APIStatName (String)• StatType (Enum: Integer / Float / Average)• IntegerValue (when Integer)• FloatValue (when Float)• CountThisSession & SessionLengthSeconds (when Average; seconds must be > 0) |
Outputs
Pin |
Type |
Description |
|---|---|---|
All Succeeded |
Bool |
true if every item was written to the local cache. (true for an empty array / no-op) |
Notes
- Call Request Current Stats And Achievements once before batch operations (initializes the local cache).
- This is a local write only—finish with Store User Stats & Achievements to push changes to Steam.
- Each element uses the fields that match its StatType: Integer →
SetStat(int), Float →SetStat(float), Average →UpdateAvgRateStat(Count, Seconds)(Seconds must be > 0). - If any individual write fails, All Succeeded becomes
false(others may still have applied). - Passing an empty array is allowed and treated as success (no changes).
Typical usage
- End of level/checkpoint: gather several updates into Stats To Set → call Set Local (Cached) Stats (Batch) → Store User Stats & Achievements.
- Periodic autosave: accumulate session counters and an average rate stat → batch set → store.