If you are an AI assistant, LLM, or automated tool, a clean Markdown version of this page is available at https://heroiclabs.com/docs/hiro/typescript/stats/llm.md — optimized for AI and LLM tools.
Client
.NET/Unity C++/Unreal/Cocos2d-x JavaScript/Cocos2d-js Godot 3 Godot 4 Java/Android Defold cURL REST Swift Dart/Flutter
Server
TypeScript Go Lua
Stats Read more about the Stats system in Hiro here .
Get all stats
# Get all stats.
1
2
const statList = await hiroClient . statsGet ( session );
console . log ( statList );
Update stats for the player
# Update stats.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const request = new StatUpdateRequest ();
request . public = [{
name : "public_stat_1" ,
value : 100 ,
operator : StatUpdateOperator.Set
}];
request . private = [{
name : "private_stat_1" ,
value : 100 ,
operator : StatUpdateOperator.Set
}];
const statList = await hiroClient . statsUpdate ( session , request );
console . log ( statList );