Page 1 of 1

Steam Achievements

Posted: Fri Sep 22, 2017 3:29 pm
by Eyzi
I have a question regarding implementing Achievements.

It says that "If Steam support is available and enabled, achivement (misspelled in the docs, btw) information is automatically synchronized with Steam." This means that when I grant an achievement with a name, it will handle Steam unlocking of the same name, right?

In my script, I've added the line:

Code: Select all

$ achievement.grant("TRUE_END")
I have set an achievement on Steamworks with the API name "TRUE_END", but whenever I reach that line, the achievement doesn't seem to unlock.

About the game, all files are archived (archive.rpa) if that means anything. It is not released yet, so achievements don't appear on the Steam store page, but they do on the Library tab. I've asked in the Steam forum and I've been told that this shouldn't stop me from unlocking achievements.

Am I implementing this incorrectly? I would appreciate any help.

Side question: The game lags so hard when opening Steam overlay. Is this normal? Or is something wrong with my files? Or is it just my computer?

Re: Steam Achievements

Posted: Fri Sep 22, 2017 11:05 pm
by Divona
When you set and save achievement, have you publish them as well? You'll need to publish in order to test things like your game depot configuration, new builds, or new achievements you've added.
viewtopic.php?f=8&t=44797&p=459741&hili ... nt#p459741

The forum is right. Archive have nothing to do or affect Steam.

I have no issue with game lag when open Steam overlay. Have you tried it on another computer? Do other games lag when open Steam overlay?

Re: Steam Achievements

Posted: Sat Sep 23, 2017 2:33 am
by mikolajspy
Did you tried to delete persistent data? Sometimes it might cause troubles.
You can also try to add achievement.register somewhere.

Re: Steam Achievements

Posted: Sat Sep 23, 2017 2:41 am
by Eyzi
Thanks for the reply Divona! I really appreciate it. I just finished making changes.

The changes for achievements have been published. I can confirm this as I can see the achievements in my Library. All unlocked.

I have also added

Code: Select all

init python:
     achievement.Sync()
at the top of my scripts.rpy. I have also added $ achievement.Sync() after everytime I call $ achievement.grant(name).

Code: Select all

     $ achievement.grant("PROLOGUE")
     $ achievement.Sync()
Rebuilt and re-uploading the new build on the depot, and reinstalled the game in my library. Still, it does not unlock. I was wondering if there's a setting I missed or something. My Ren'Py version is 6.99.11.1749 if that's a necessary information.

The Steam overlay lag comes and goes. Sometimes it's normal, sometimes it lags. For other games, it doesn't lag at all.

Have a great day!

Re: Steam Achievements

Posted: Sat Sep 23, 2017 2:48 am
by Eyzi
mikolajspy wrote: Sat Sep 23, 2017 2:33 am Did you tried to delete persistent data? Sometimes it might cause troubles.
You can also try to add achievement.register somewhere.
Before building distributions, I always delete persistent and force recompile. I even make sure that I remove the 'save' folder before I upload the build.

If it's relevant, I'm also having a problem with setting initial config for the volumes. I have config.default_channel_volume = 0.5, but whenever I play it on a fresh install, it always sets all channel volumes to max. I figured it was something to do with the persistent data.

I'll try to add $ achievement.register("name") right before the grant function and see if that changes anything.

Edit: adding $ achievement.register("name") did not fix it, sadly. :(

Re: Steam Achievements

Posted: Sat Sep 23, 2017 7:17 am
by mikolajspy
Eyzi wrote: Sat Sep 23, 2017 2:41 am The changes for achievements have been published. I can confirm this as I can see the achievements in my Library. All unlocked.
If they're already unlocked, they won't appear again I think. I had this issue, and I simply deleted and added again achievements on Steam dev page.

If that's not it, check if you have correct steam_appid.txt file, what's inside and where's the file.

As for music, you can try putting this code in the beginning of options.rpy:

Code: Select all

define config.default_music_volume = 0.5
define config.default_sfx_volume = 0.5
It should stay at 0.5 regardless of persistent data.

Re: Steam Achievements

Posted: Sat Sep 23, 2017 3:35 pm
by Eyzi
Ah, my bad. I meant to say they are all locked, not unlocked.

Re: Steam Achievements

Posted: Sat Sep 23, 2017 4:12 pm
by Eyzi
Hi, guys! I have fixed the problem by simply updating to the latest Ren'Py version (6.99.12.4).

I'm not sure if this was a necessary step as well, but I downloaded a steam lib file (elided) and merged the 'lib' folder there with the 'lib' folder in the Ren'Py sdk. After that, everything worked perfectly. It also got rid of all the other issues I was having.

Thanks to everyone who replied and helped! I really appreciate it.