Closed 1-800-thewolf closed 8 months ago
Please let us know what version of the extension you are using as the last version was not yet published on the marketplace is just available from GitHub published releases.
@DiasFranciscoA oh good point! I'm using 1.6.0. Is this fixed in 1.6.1?
Edited: I just updated to 1.6.1 and it does correctly trigger the Steam async event now! It still fails to display the correct stat, though.
Here's the output:
steam_get_stat_int: 8 GetGlobalStat Failed: TestStat steam_get_global_stat: 0 //steam_get_global_stat should result in a number over 8 as it's supposed to aggregate the total across all players.
I'm trying to figure out the reason GetGlobalStat Failed.
Ensure that the statistic you’re attempting to query is marked as “aggregatable” within the Steam dashboard settings. Not all statistics can be queried for global stats; they must be specifically flagged on the server side through the Steam dashboard for such queries to be possible.
Good question, but the stat is definitely marked as aggregated:
I'm definitely also referencing the same stat name in my code and it still shows 0 for the global stat:
I don't know if it matters, but steam_get_global_stat flags as wrong syntax. It says it takes no more than 0 arguments.
It also might not be obvious from the screenshot, but that version of the game is published and is what I'm using.
Is there some other initialization function I'm supposed to run or maybe a different setting in Steamworks? This is admittedly my first Steam game.
It looks like, according to Steam's documentation, we need to RequestCurrentStats before requesting global stats: https://partner.steamgames.com/doc/api/ISteamUserStats#RequestGlobalStats
I believe that's the same as "steam_stats_ready" though. and it looks like the request is successful according to the Steam Async output.
Hey @1-800-thewolf,
We have just updated the Steamworks extension v1.6.2 to meet with Steamworks standards on global stats and achievements. Please check this version as it will most likely solve your problem.
The old function steam_get_global_stat
was removed in favor of steam_get_global_stat_int
and steam_get_global_stat_real
your global stat is marked as an integer so you should use the steam_get_global_stat_int
as you do for non global stats.
Please close this issue if this solves your problem.
@DiasFranciscoA, you're my hero! It's indeed working beautifully. Thanks so much for putting so much work into getting this up and running.
I'm attempting to use the steam_request_global_stats function as demonstrated in the documentation example. steam_request_global_stats never triggers the async function, though.
steam_initialised returns true. steam_stats_ready returns true. steam_request_global_stats returns true steam_get_stat_int returns 6 which is the correct value for 1 user but is not the total aggregated value. The Steam Async event never triggers and I never see the _show_debug_message("{0}: {1}", _type, success) report.
I've given it multiple hours and still never triggers the async event. Is there something different that needs to be done to successfully retrieve global stats?