How would I go about adding an image to the top right of the screen when you earn an achievement? I have my achievements defined but I cant quite figure out how to add the words up at the top either
A (hopefully) easy way to add achievements to your Ren'Py game · By
Adding the description is easy if you use the sample screen (remember to set BOBCACHIEVEMENT_SCREEN_NAME):
screen bobcachievement_samplescreen(achievement_title, achievement_description): timer 5.0 action Hide("bobcachievement_samplescreen", transition=BOBCACHIEVEMENT_SCREEN_TRANSITION) vbox: xanchor 1.0 xpos 0.95 yanchor 0.0 ypos 0.05 style_prefix "bobcachievement" text BOBCACHIEVEMENT_NOTIFY_PREFIX text_align 1.0 xalign 1.0 text achievement_title text_align 1.0 xalign 1.0 text achievement_description text_align 1.0 xalign 1.0
Unfortunately, adding an image is going to be harder because I didn't pass the achievement names to the screen, so you'd have to update that:
Change line 75 to
renpy.show_screen(BOBCACHIEVEMENT_SCREEN_NAME, achiname, BOBCACHIEVEMENTS_MAP[achiname][0], BOBCACHIEVEMENTS_MAP[achiname][1])
And then this screen (or something like it) should work:
screen bobcachievement_samplescreen(achiname, achievement_title, achievement_description): timer 5.0 action Hide("bobcachievement_samplescreen", transition=BOBCACHIEVEMENT_SCREEN_TRANSITION) hbox: xanchor 1.0 xpos 0.95 yanchor 0.0 ypos 0.05 add "images/achievements/" + achiname + ".png" vbox: style_prefix "bobcachievement" text BOBCACHIEVEMENT_NOTIFY_PREFIX text_align 1.0 xalign 1.0 text achievement_title text_align 1.0 xalign 1.0 text achievement_description text_align 1.0 xalign 1.0
Yeah... any customization is possible, but I think screen language is beyond the scope of this topic
I'd join the official Ren'Py discord and see if you can get some general pointers on screen language (or just google some tutorials)... the achievements screen is just a standard Ren'Py menu screen (similar to the Preferences or About screens) so you can customize it in any way you can customize those screens