
RenPy Achievements
A downloadable project
Have you ever wanted a clean and flexible way of handling achievements inside your RenPy game?
Easy! I have made things a lot easier for those looking to add achievements to their RenPy games with a lot less hassle. The source code contains comments describing each element so you won't get confused or lost. But if in case you do I am happy to assist.
Included in the download file are a simple tutorial and source code
| Status | Released |
| Category | Other |
| Rating | Rated 5.0 out of 5 stars (4 total ratings) |
| Author | Angel Seraph |
| Genre | Visual Novel |
| Tags | code, Ren'Py, sourcecode, Tutorial |
Install instructions
To try out the demo, add the achievements project to your RenPy project game folder (the same folder with all your other projects).
Download
Download
Achievements (v1.0.3).zip 1 MB
Development log
- File update (1.0.3)53 days ago
- File update (1.0.2)99 days ago

Comments
Log in with itch.io to leave a comment.
Hello!
I would like to know if there is any way to increase the size of achievements for mobile devices? I recently tested the game on Android and the achievements turned out to be too small even for a 6.5-inch screen.
Hello.
Thank you for letting me know. In that regard, I'll spend some time working on the "responsive" mobile version in the next few days or so. Will update the file when completed.
Thank you so much for that! I'll be looking forward to it.
Hello!
How are things going with the development of the mobile version of this script?
Hello, apologies for the late response. I've had a little dabble around and... found a potential solution, though I'm not able to fully test it on my end.
Hello! Thank you so much for what you're doing. I am testing mobile versions on Android, so as soon as you publish a script optimized for mobile devices, I will test it and send screenshots here.
Hello! In my opinion, the achievements have remained very small on mobile devices. I attach screenshots.
I managed to adjust the size for the mobile version of achievements! Now they are big and should look normal. As soon as I test and see the result, I will immediately send you screenshots and a link to the script I changed so that you can optionally update your script with the mobile version I configured.
Thank you so much again!
Hey, sorry this response is late.
That's great the hear. And, yes, please do feel free to send a screenshot as well as the solution so I can add it to the code.
Thank you!
Hello!
I have this problem: VPGrid is not fully filled. I tried changing the value of "cols" to 1 and 3, but it didn't help me much. At the value of 1, many achievements are simply not displayed, and at 3, the last row of achievements is cut off.
I will be waiting for your answer.
With best wishes,
Pavel.
Hello, thank you for bringing this to my attention. I found the solution to the problem, which I'll update in the download file.
Add this line somewhere (preferably in options.rpy)
define config.allow_underfull_grids = True
That should solve the problem.
Also, remove ysize 1080 as that's not needed. Will upload the updated code.
Thank you very much for the quick response! I'll try it as soon as I'm at the computer.
I checked, it works now. Thank you very much for the quick fix of the problem and for the script itself.
I wish you a good day and all the best!
Hello! Love the achievement setup and everything, but me being the dummy rookie RenPy coder I am, I seem to have misunderstood the technicalities of the actual code, so how do I actually easily set up the achievements
Hello,
What part are you misunderstanding or having trouble with?
Hey ! Thanks for this achievement system, I use it to make Don't Screw This Up !
Thank you! Much appreciated.
Hello...I love your code but I run into a minor problem:
My game has 11 achievements, but there are only 7 visible. I've modified your code in that way, thats there only one column of achievements. Could you give me a hint, what could be the problem?
Hello! Could you share what you've modified?
A quick solution:
Try 'Delete persistent' then ''Force recompile' from the RenPy launcher.
If the problem still persist, could you contact me directly on DIscord. My Discord name is Just A Concept#9599
Hello an thank you for your quick response
the only thing, I modified was in this section of your code:
frame:
background None
padding (20, 20, 20, 20)
align (0.0, 0.0)
ysize 1080
vpgrid:
cols 1 # my modification
spacing 10
## Granted achievements
for t in persistent.my_achievements:
if achievement.has(t.name):
frame:
background Solid('#08A')
hbox:
yalign 0.5
xysize (100, 100)
add t.image size (100, 100) yalign 0.5
null width 20
vbox:
spacing 0
yfill False
text t.name style 'achievements_label' color '#000'
text t.message color '#000'
I'll give the delete persistent and force recompile a chance
Hello there. Any updates on the issue? Or did you managed to resolve it?
Sorry for the late reply - I wasn`t here for some days. I tried to delete the persistent and force recompile, but the achievement screen only show 7 achievements. I've no idea where's the problem. But to be fair: I'm a noob in python and ren'py ;-)
Hey there
I ran into the same issue the original commenter had of only having a fraction of the total achievements show up on the achievements screen. So I tried the "quick solution" you suggested for pinupsandpulp, and now I can no longer open my project.
Below is the error I was given:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00keymap.rpy", line 396, in script
init -1100 python:
File "renpy/common/00keymap.rpy", line 396, in script
init -1100 python:
File "renpy/common/00keymap.rpy", line 407, in <module>
game_menu = _invoke_game_menu,
NameError: name '_invoke_game_menu' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "renpy/bootstrap.py", line 326, in bootstrap
renpy.main.main()
File "renpy/main.py", line 515, in main
renpy.game.context().run(node)
File "renpy/common/00keymap.rpy", line 396, in script
init -1100 python:
File "renpy/common/00keymap.rpy", line 396, in script
init -1100 python:
File "renpy/ast.py", line 922, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "renpy/python.py", line 2218, in py_exec_bytecode
exec(bytecode, globals, locals)
File "renpy/common/00keymap.rpy", line 407, in <module>
game_menu = _invoke_game_menu,
NameError: name '_invoke_game_menu' is not defined
If you could help me fix this issue, that would be amazing
Could you DM me on discord so we can go through it thoroughly - Angel Seraph#9599
EDIT: Not sure why that part has been affected. It really shouldn't have. Hm...
I ended up having to delete the entire RenPy folder as the console where you access projects completely broke. So I removed both of the achievement scripts from my game, zipped up my game file, and redownloaded RenPy.
I'm going to try using the achievement scripts again, and if the problem still persists I'll contact you on Discord soon after
And if I end up finding a solution, I'll try to figure out what it was and let you know ASAP
Thanks. No problem. It'd be good for me to know what caused or how that problem even occurred. I look forward to hearing your results.
Hello I tried test running your project in ren'py and got an error message:
"
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00start.rpy", line 189, in script
python:
File "renpy/common/00start.rpy", line 189, in script
python:
File "renpy/common/00start.rpy", line 190, in <module>
renpy.execute_default_statement(True)
File "game/acheivements.rpy", line 50, in set_default
default achievements = Achievement()
File "game/acheivements.rpy", line 50, in <module>
default achievements = Achievement()
File "game/acheivements.rpy", line 9, in __init__
self.image = Transform('gui/trophy_icon.png', fit='contain')
Exception: Unknown transform property: 'fit'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "D:\ren'py\renpy-7.3.5-sdk\renpy\bootstrap.py", line 316, in bootstrap
renpy.main.main()
File "D:\ren'py\renpy-7.3.5-sdk\renpy\main.py", line 578, in main
run(restart)
File "D:\ren'py\renpy-7.3.5-sdk\renpy\main.py", line 143, in run
renpy.execution.run_context(True)
File "D:\ren'py\renpy-7.3.5-sdk\renpy\execution.py", line 908, in run_context
context.run()
File "renpy/common/00start.rpy", line 189, in script
python:
File "renpy/common/00start.rpy", line 189, in script
python:
File "D:\ren'py\renpy-7.3.5-sdk\renpy\ast.py", line 914, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\ren'py\renpy-7.3.5-sdk\renpy\python.py", line 2028, in py_exec_bytecode
exec bytecode in globals, locals
File "renpy/common/00start.rpy", line 190, in <module>
renpy.execute_default_statement(True)
File "D:\ren'py\renpy-7.3.5-sdk\renpy\exports.py", line 3495, in execute_default_statement
i.set_default(start)
File "game/acheivements.rpy", line 50, in set_default
default achievements = Achievement()
File "D:\ren'py\renpy-7.3.5-sdk\renpy\python.py", line 2052, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/acheivements.rpy", line 50, in <module>
default achievements = Achievement()
File "game/acheivements.rpy", line 9, in __init__
self.image = Transform('gui/trophy_icon.png', fit='contain')
File "D:\ren'py\renpy-7.3.5-sdk\renpy\display\transform.py", line 603, in __init__
raise Exception("Unknown transform property: %r" % k)
Exception: Unknown transform property: 'fit'
Windows-8-6.2.9200
Ren'Py 7.3.5.606
Achievements 1.0
Tue Aug 31 02:47:29 2021"
I'm very new to ren'py scripting and can't solve the problem on my own...I would appreciate your help
Hello, thank you for reaching out. I believe the problem may have to do with the version of Ren'Py you're using. Try updating to version 7.4.0 (or higher). That should solve the issue.
Thank you for your reply...I'll try it with a newer version
Ok...I've tried the newest version but the error message is the same :(
Hm. Okay, I'll take a quick look and do some tests and get back to you later today.
Thank you