• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Steam Trying to get Steam Achievements working.

E

ElBebo

Guest
Hello everyone, since the day I got my game greenlit I'm looking to create Steam achievements for it and make them work.

I followed this article (https://help.yoyogames.com/hc/en-us...sing-The-Steamworks-SDK-With-GameMaker-Studio) step-by-step but I probably set up something wrong.

Once uploaded my game build on Steam, everything works except steam_stats_ready(), because it always returns '0' (false), so the achievements cannot be unlocked and even viewed within the game. I read some previous topics on this forum and it seems many problems are caused by wrong versions of the Steam SDK and GameMaker: Studio itself.

In the article, the author suggests to choose the Steam SDK version according to the GM:S version used by the user, but on the Requiered SDKs page (https://help.yoyogames.com/hc/en-us/articles/216753748-SDK-Version-Support) it is clearly written to just use the 1.35a version of the SDK. It seems contradictory.. and my achievements aren't working.

Thank you everyone in advance for your help! :)

My GM:S version: 1.4.1767 (r42001)
 
E

ElBebo

Guest
Should I install GameMaker:Studio again but within Steam?

Or should I use an older version of GameMaker: Studio?
 
W

Wintermute()

Guest
Did you get achievements working OK ?

I'm currently putting in achievements for my game which is currently on Steam, not visible or launched yet, still building the store etc.

far as I can tell, you need to use Steam SDK 141 with GMS 1.4. I've been able to produce steam builds, download or play my game directly from steam so far using 141 (latest) steam sdk.

if this is not correct, somebody please shout out, I'd also like to know before I start doing all the coding for the cheeves..

Thanks,
W
 

Mick

Member
W

Wintermute()

Guest
The correct version to use is 1.35a according to this page: https://help.yoyogames.com/hc/en-us/articles/216753748-SDK-Version-Support. It is working for me (achievements etc.). On the linked page it says "Please only use this version".
Thanks for that, I think you saved me some heartache. I better grab that SDK 1.35a and upload a new build before setting up all my achievements.

Mick, given you have cheeves working, can you please clarify my thinking about them working in GMS, i've never done this before. I've used the GMS help for steam and have come up with the following workflow:

After I have setup all the achievments in Steamworks and have the correct names and calls in this interface, and have uploaded the icons:

steamworks achievements interface.JPG

NB: do i check the 'set by client' dropdown here ?

Then in my game/GMS where I have trigger points to call the achievments, game events that happen etc:

at the start of my game (title screen) check to see that Steam is initialised on the client PC and set the variable to true:

Code:
global.steam_api = false;
if steam_initialised()
{
if steam_stats_ready() && steam_is_overlay_enabled()
{
global.steamapi = true;
}
}
Then to trigger the achievements in steam [after checking the steam variable is true] check to see the cheeve hasn't been awarded, and award if so:

Code:
// if [game event here]
{
if !steam_get_achievement("my_cheeve_1")
{
steam_set_achievement("my_cheeve_1");
}
}
Sorry if these are dumb questions, this is very new to me...!

Thanks,
W
 
Last edited by a moderator:

Mick

Member
NB: do i check the 'set by client' dropdown here ?
Yep.

at the start of my game (title screen) check to see that Steam is initialised on the client PC and set the variable to true:

Code:
global.steam_api = false;if steam_initialised(){if steam_stats_ready() && steam_is_overlay_enabled(){global.steamapi = true;}}
Yes, but I first did these checks in the create event of an init instance in the init room (first step of the game that is), and this didn't work, seems like Steam is not initialised exactly at game start. Now I have these checks in room start of a controller object instance (persistent) and it all works.

Then to trigger the achievements in steam [after checking the steam variable is true] check to see the cheeve hasn't been awarded, and award if so:

Code:
// if [game event here]{if !steam_get_achievement("my_cheeve_1"){steam_set_achievement("my_cheeve_1");}}
Looks good.

Sorry if these are dumb questions, this is very new to me...!
Glad I could help!
 
W

Wintermute()

Guest
Yep.


Yes, but I first did these checks in the create event of an init instance in the init room (first step of the game that is), and this didn't work, seems like Steam is not initialised exactly at game start. Now I have these checks in room start of a controller object instance (persistent) and it all works.
So, if I put the check in a persistant object that is always present in the gameplay rooms (say my obj_score) then all should be sweet ?

Edit: never mind, I tried it in my obj_score after setting up in Steamworks and it worked, just unlocked my first cheeve :) now to get some clear cheeve code in there too for testing.
 
Last edited by a moderator:
C

CreativeBand124

Guest
Guys i am using GMS2 and i can't make it work...

steam_stats_ready() - not working

Can you please someone help me ?

I just try to check it and every time it's false.. I do all other stuffs and only steam_initialised() are true...
 

Mick

Member
Guys i am using GMS2 and i can't make it work...

steam_stats_ready() - not working

Can you please someone help me ?

I just try to check it and every time it's false.. I do all other stuffs and only steam_initialised() are true...
Hmm, are you doing this instantly when the game starts? Maybe you need to wait a bit before doing the check, like after a splash/company logo screen or something.
 

Yal

šŸ§ *penguin noises*
GMC Elder
You also should've made your own topic instead of bumping a 3-year-old topic talking about a system that's now deprecated... people tend to just read the OP's first post and then reply to that, instead of your question which is somewhere in the middle.
 
Top