(Persistent) Ren'Py Achievements w/ Download link
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.
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.
- Angelo Seraphim
- Regular
- Posts: 36
- Joined: Tue May 21, 2019 8:00 am
- Completed: Enamored Risks (NaNoReNo 2020)
- Projects: 616 Charagma
- Organization: GLSUoA
- Deviantart: glsuoa
- itch: glsuoa
- Location: London, UK
- Discord: Angel Seraph#9599
- Contact:
(Persistent) Ren'Py Achievements w/ Download link
Latest update (5 / JULY / 21)
Hello, everyone!
I've decided to make an achievement system using RenPy Achievements.
UPDATE (I figured it'd be easier to create a downloadable file including a short tutorial and the code.)
Here's a quick video of what it looks like in my game so you can get an idea.
Some screenshots. The first is the screen of what it looks like in my game, and the second is showing the notification displayed at the top of the screen.
Downloads
Itch.io: https://glsuoa.itch.io/renpy-achievements
Direct:
If you run into any problems feel free to let me know over on Discord - @Angel Seraphim#9599
Hello, everyone!
I've decided to make an achievement system using RenPy Achievements.
UPDATE (I figured it'd be easier to create a downloadable file including a short tutorial and the code.)
Here's a quick video of what it looks like in my game so you can get an idea.
Some screenshots. The first is the screen of what it looks like in my game, and the second is showing the notification displayed at the top of the screen.
Downloads
Itch.io: https://glsuoa.itch.io/renpy-achievements
Direct:
If you run into any problems feel free to let me know over on Discord - @Angel Seraphim#9599
Last edited by Angelo Seraphim on Sun Aug 22, 2021 3:27 am, edited 23 times in total.
- bonnie_641
- Regular
- Posts: 133
- Joined: Sat Jan 13, 2018 10:57 pm
- Projects: Código C.O.C.I.N.A.
- Deviantart: rubymoonlily
- Contact:
Re: Using Ren'Py Achievements and making them persist
Thank you!
I watched the video and it looks great.
I really wish you would give an example of how to use each part of this wonderful tutorial (with persistent data).
I appreciate your effort and time spent.
Regards.
It is impressive!From: https://www.youtube.com/watch?v=j89RDm0nNAs
For all the trophy/achievement hunters.
This took me a long time to figure out, but I'm happy to have got it working.
If anybody is interested in learning how to create a persistent list I will create a simple walkthrough tutorial on the RenPy Lemmasoft forum soon.
I watched the video and it looks great.
I really wish you would give an example of how to use each part of this wonderful tutorial (with persistent data).
I appreciate your effort and time spent.
Regards.
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question.
I try my best to give an answer according to your question.
- Angelo Seraphim
- Regular
- Posts: 36
- Joined: Tue May 21, 2019 8:00 am
- Completed: Enamored Risks (NaNoReNo 2020)
- Projects: 616 Charagma
- Organization: GLSUoA
- Deviantart: glsuoa
- itch: glsuoa
- Location: London, UK
- Discord: Angel Seraph#9599
- Contact:
Re: Using Ren'Py Achievements and making them persist
Thank you!bonnie_641 wrote: ↑Thu Feb 11, 2021 5:58 am Thank you!
It is impressive!From: https://www.youtube.com/watch?v=j89RDm0nNAs
For all the trophy/achievement hunters.
This took me a long time to figure out, but I'm happy to have got it working.
If anybody is interested in learning how to create a persistent list I will create a simple walkthrough tutorial on the RenPy Lemmasoft forum soon.
I watched the video and it looks great.
I really wish you would give an example of how to use each part of this wonderful tutorial (with persistent data).
I appreciate your effort and time spent.
Regards.
I'm still working to perfect it.
However, I've come across a small problem where for example if you earn, let's say, 10 achievements in a "new" save and you go back to an old save those achievements don't show up, as in, they are locked as if you never earned them at all, but they are actually there, just not in older save files.
I'm looking to see how I could fix that as it may come across as concerning to see your achievements just suddenly disappear.
If anyone has any idea on how to solve this I'd be more than happy.
- Angelo Seraphim
- Regular
- Posts: 36
- Joined: Tue May 21, 2019 8:00 am
- Completed: Enamored Risks (NaNoReNo 2020)
- Projects: 616 Charagma
- Organization: GLSUoA
- Deviantart: glsuoa
- itch: glsuoa
- Location: London, UK
- Discord: Angel Seraph#9599
- Contact:
Re: Using Ren'Py Achievements and making them persist
UPDATE 12th FEB 2021
Okay, so I've figured out the problem.
So, in the screen that displays the achievements, instead of:
... do:
Use the persistent variable defined earlier. This will display the achievements correctly even after loading a save.
Okay, so I've figured out the problem.
So, in the screen that displays the achievements, instead of:
Code: Select all
## Granted trophies
for t in Trophy.Trophies: ## Change this line...
if achievement.has(t.name):
...
Code: Select all
## Granted trophies
for t in persistent.my_victories: ## ... to this.
if achievement.has(t.name):
...
- bonnie_641
- Regular
- Posts: 133
- Joined: Sat Jan 13, 2018 10:57 pm
- Projects: Código C.O.C.I.N.A.
- Deviantart: rubymoonlily
- Contact:
Re: Using Ren'Py Achievements and making them persist
Thank you for updating the topic.
I will try to incorporate this into my game.
Thank you very much <3
I will try to incorporate this into my game.
Thank you very much <3
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question.
I try my best to give an answer according to your question.
- Angelo Seraphim
- Regular
- Posts: 36
- Joined: Tue May 21, 2019 8:00 am
- Completed: Enamored Risks (NaNoReNo 2020)
- Projects: 616 Charagma
- Organization: GLSUoA
- Deviantart: glsuoa
- itch: glsuoa
- Location: London, UK
- Discord: Angel Seraph#9599
- Contact:
Re: Using Ren'Py Achievements and making them persist
UPDATE 4th MARCH 2021
I've done a few more testing. There are times when the achievement is rewarded but doesn't show up in the achievement screen.
The changes;
For the __eq__ you can do;
This seems to work more consistently. (Still currently testing.)
If you run into any problems feel free to let me know over on Discord - @Angel Seraphim#9599
I've done a few more testing. There are times when the achievement is rewarded but doesn't show up in the achievement screen.
The changes;
For the __eq__ you can do;
Code: Select all
def __eq__(self, value):
return all((self.name == value.name, self.message == value.message))
If you run into any problems feel free to let me know over on Discord - @Angel Seraphim#9599
-
- Newbie
- Posts: 6
- Joined: Wed Jun 23, 2021 4:50 am
- Github: Siege-Wizard
- Contact:
Re: Using Ren'Py Achievements and making them persist
In the class "__init__" method, you may want to provide a "fit" property to the "Transform", as the default ("fill") will mess with aspect ratios.
- "contain" avoids messing with aspect ratio, will use 100 for the big dimension and keep the other one the corresponding ratio (a 200x150 image will be transformed to 100x75 instead of 100x100)
- "scale-down" does the same but if the image is already small enough it doesn't enlarge it.
- Angelo Seraphim
- Regular
- Posts: 36
- Joined: Tue May 21, 2019 8:00 am
- Completed: Enamored Risks (NaNoReNo 2020)
- Projects: 616 Charagma
- Organization: GLSUoA
- Deviantart: glsuoa
- itch: glsuoa
- Location: London, UK
- Discord: Angel Seraph#9599
- Contact:
Re: Using Ren'Py Achievements and making them persist
Thanks for this. I will amend the code to reflect this change.SiegeWizard wrote: ↑Fri Jun 25, 2021 3:51 am In the class "__init__" method, you may want to provide a "fit" property to the "Transform", as the default ("fill") will mess with aspect ratios.https://www.renpy.org/doc/html/atl.html ... operty-fit
- "contain" avoids messing with aspect ratio, will use 100 for the big dimension and keep the other one the corresponding ratio (a 200x150 image will be transformed to 100x75 instead of 100x100)
- "scale-down" does the same but if the image is already small enough it doesn't enlarge it.
Who is online
Users browsing this forum: No registered users