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: 471
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 »

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 14332 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 14332 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
Veteran
Posts: 344
Joined: Tue Nov 21, 2017 2:23 am
Completed: Eidolon, Minion!, Love Furever, Epilogue
Contact:

Re: Ren'Py Steam Achievement Guide

#2 Post 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!
Enjoy Eidolon, my free to play game at: https://mutive.itch.io/eidolon, Minion! at: https://mutive.itch.io/minion or Epilogue at: https://mutive.itch.io/epilogue

User avatar
Geckos
Veteran
Posts: 471
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 »

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: 4
Joined: Sat Feb 09, 2019 8:34 pm
Contact:

Re: Ren'Py Steam Achievement Guide

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

User avatar
Marionette
Regular
Posts: 128
Joined: Thu Apr 21, 2011 12:04 pm
Completed: https://marionette.itch.io/
Projects: Get Meowt of Here
Deviantart: rexx9224
itch: marionette
Location: Ireland
Discord: Marionette#2995
Contact:

Re: Ren'Py Steam Achievement Guide

#5 Post 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.

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

Re: Ren'Py Steam Achievement Guide

#6 Post 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 :)

User avatar
Rainvillain
Regular
Posts: 76
Joined: Thu Mar 05, 2015 11:27 am
Contact:

Re: Ren'Py Steam Achievement Guide

#7 Post 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?

User avatar
parttimestorier
Veteran
Posts: 429
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: Ren'Py Steam Achievement Guide

#8 Post 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.
ImageImageImage

User avatar
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: Ren'Py Steam Achievement Guide

#9 Post 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.

User avatar
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

Re: Ren'Py Steam Achievement Guide

#10 Post 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.
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

User avatar
Bertran
Regular
Posts: 33
Joined: Tue May 02, 2017 12:58 pm
Projects: Run, Kitty!
Deviantart: bertranway
Skype: bertranway
Contact:

Re: Ren'Py Steam Achievement Guide

#11 Post by Bertran »

Oof, thank you very much! I will try and use it for my game.

Post Reply

Who is online

Users browsing this forum: No registered users