Ren'Py Steam Achievement Guide

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
Geckos
Veteran
Posts: 469
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Ren'Py Steam Achievement Guide

#1 Post by Geckos » Thu May 10, 2018 5:35 pm

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 1982 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 1982 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!
Last edited by Geckos on Sat May 12, 2018 5:21 pm, edited 2 times in total.
Image ImageImage

Mutive
Regular
Posts: 188
Joined: Tue Nov 21, 2017 2:23 am
Completed: Minion!, Love Furever
Contact:

Re: Ren'Py Steam Achievement Guide

#2 Post by Mutive » 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!
Enjoy Minion!, my free to play game at: https://mutive.itch.io/minion or Love Furever at: https://mutive.itch.io/love-furever

User avatar
Geckos
Veteran
Posts: 469
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Re: Ren'Py Steam Achievement Guide

#3 Post by Geckos » Thu May 10, 2018 11:10 pm

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~! ^^
Image ImageImage

sunsetpoet
Newbie
Posts: 2
Joined: Sat Feb 09, 2019 8:34 pm
Contact:

Re: Ren'Py Steam Achievement Guide

#4 Post by sunsetpoet » 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...

User avatar
Marionette
Regular
Posts: 126
Joined: Thu Apr 21, 2011 12:04 pm
Completed: ChimeraTail
Projects: Nova, Cupid, Snowdrop
Deviantart: rexx9224
Skype: super_marionette
itch: marionette
Location: Ireland
Contact:

Re: Ren'Py Steam Achievement Guide

#5 Post by Marionette » Mon Feb 11, 2019 12:53 pm

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.

sunsetpoet
Newbie
Posts: 2
Joined: Sat Feb 09, 2019 8:34 pm
Contact:

Re: Ren'Py Steam Achievement Guide

#6 Post by sunsetpoet » Mon Feb 11, 2019 4:41 pm

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 :)

Post Reply

Who is online

Users browsing this forum: No registered users