Page 1 of 1

Ren'Py Steam Achievement Guide

Posted: Thu May 10, 2018 5:35 pm
by Geckos
Hello!
I am by no means a master, and there are likely better/cleaner ways to do this. This is how I got simple achievements for my game working on Steam.


Getting the Steam Support Library

Firstly, you will need to contact PyTom in order to get the Steam Support Library from him, for Ren’Py.


The code for your script.

Second, put this in your code as needed, numbered and titled how you want it in order to represent each achievement.

Code: Select all

$achievement.grant("Achievement01_Start")
init: 
    $achievement.register("Achievement01_Start")
    $achievement.sync()

$achievement.sync()
code_example.jpg

Adding a txt to your game folder

Add a file called
steam_appid.txt
Into your game folder with your game’s .exe

Steam_appid.txt should contain your app id from Steam
steamapp_id_txt_example.jpg
steamapp_id_txt_example.jpg (22.77 KiB) Viewed 14960 times

Example of where to put the .txt file
example_of_appid_txt_placement.jpg
example_of_appid_txt_placement.jpg (23.77 KiB) Viewed 14960 times
Get the right Ren’Py
Make sure you have the latest version of Ren’Py, or at least version 6.99.14.3

Building your distributions.

Delete persistent data.

Build distributions for your project.

Once your distributions have been made, pull the game folder out of the .zip (I title mine with the date and a letter for how many builds I’ve made that day.)

unzip.jpg

Take the Steam Library Support folder you got and paste it into your build.

copy_your_lib.jpg

On to Steam!

From there, upload your build to Steam, set up your builds/depots if you haven’t. There’s a good amount of steam documentation on that process, so I won’t go into it here.

Find your Achievements page, and set them up using the same names as in your script.

achievement_sample.jpg


Publish your build, and test!

I was able to unlock these achievements by progressing through the story, and getting to the point where the code for unlocking them is.

Hopefully this helps a few souls who are struggling with getting these working!

Re: Ren'Py Steam Achievement Guide

Posted: Thu May 10, 2018 6:05 pm
by Mutive
This is crazy helpful. :) I'm hoping to get a game onto Steam sometime-ish (with achievements) and am super grateful for you creating such a clear and easy to use guide!

Re: Ren'Py Steam Achievement Guide

Posted: Thu May 10, 2018 11:10 pm
by Geckos
Mutive wrote: Thu May 10, 2018 6:05 pm This is crazy helpful. :) I'm hoping to get a game onto Steam sometime-ish (with achievements) and am super grateful for you creating such a clear and easy to use guide!
I hope it makes the process easier for you~! ^^

Re: Ren'Py Steam Achievement Guide

Posted: Sun Feb 10, 2019 6:05 am
by sunsetpoet
Excuse me, can you please clarify something for me?
I'm going to publish my first Renpy vn in Steam soon and can't get the achievements working (I used other guide then).

1) Is there a way to get Steam Support Library without disturbing Tom? And what is this anyway? Steam libs from sdk? Or some specific codes from Tom?

2) How to get working the achievement that unlocks when other achievements are already unloked?

3) How to test when I'm done? My game isn't even on approval now, considering this will achievements work or the game must be "ready for publish state"? Steam is very confusing...

Re: Ren'Py Steam Achievement Guide

Posted: Mon Feb 11, 2019 12:53 pm
by Marionette
sunsetpoet wrote: Sun Feb 10, 2019 6:05 am Excuse me, can you please clarify something for me?
I'm going to publish my first Renpy vn in Steam soon and can't get the achievements working (I used other guide then).

1) Is there a way to get Steam Support Library without disturbing Tom? And what is this anyway? Steam libs from sdk? Or some specific codes from Tom?

2) How to get working the achievement that unlocks when other achievements are already unloked?

3) How to test when I'm done? My game isn't even on approval now, considering this will achievements work or the game must be "ready for publish state"? Steam is very confusing...
1. If i remember correctly its a set of libs that allow the use of the Steam SDK for renpy. I'm not 100% whats special about them but as far as i'm aware you have to get them from Tom.

2. You'll want to check out the achievement help for more details on specific types of achievements: https://www.renpy.org/doc/html/achievement.html

3. I don't think it's possible to properly test steam achievements without at least having your game up on steam, even if its not publicly available, since you'll want to be testing that your code is actually activating the achievements, and the easiest way is to see them show up in steam when you complete them.

Re: Ren'Py Steam Achievement Guide

Posted: Mon Feb 11, 2019 4:41 pm
by sunsetpoet
Marionette wrote: Mon Feb 11, 2019 12:53 pm 1. If i remember correctly its a set of libs that allow the use of the Steam SDK for renpy. I'm not 100% whats special about them but as far as i'm aware you have to get them from Tom.

2. You'll want to check out the achievement help for more details on specific types of achievements: https://www.renpy.org/doc/html/achievement.html

3. I don't think it's possible to properly test steam achievements without at least having your game up on steam, even if its not publicly available, since you'll want to be testing that your code is actually activating the achievements, and the easiest way is to see them show up in steam when you complete them.
Thank you for the reply. I will think something up :)

Re: Ren'Py Steam Achievement Guide

Posted: Sun May 17, 2020 3:56 pm
by Rainvillain
This is a wonderful tutorial, thank you so much. My PC build now works perfectly but trophies aren't popping up for the Mac version. Do you know if the location for the lib folder is different on Mac?

Re: Ren'Py Steam Achievement Guide

Posted: Fri Oct 02, 2020 9:15 pm
by parttimestorier
Thanks so much for this tutorial! I was really confused about how to add steam achievements before, but following these instructions worked perfectly.

Re: Ren'Py Steam Achievement Guide

Posted: Wed Oct 28, 2020 6:35 am
by Morhighan
Thank you for sharing this. If I ever put out games on steam again it'll be nice to have this to refresh my memory.

Re: Ren'Py Steam Achievement Guide

Posted: Sat Apr 17, 2021 2:40 pm
by Dollarluigi
I'm afraid it's not working for me. I keep getting errors for stuff that usually works in Renpy. I'm now getting stuff like "Sayer X is not defined" even though it is. Other times, I get errors about the indentation, even when I follow the exact directions here.

Re: Ren'Py Steam Achievement Guide

Posted: Tue Nov 02, 2021 4:09 pm
by Bertran
Oof, thank you very much! I will try and use it for my game.