Adding Image on Save Slot (Help!)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Adding Image on Save Slot (Help!)

#1 Post by CalixtheGreat »

Good day once again!

Need some help regarding customizing the save slots. Is it possible to add a custom image (instead of screenshot) on the save slot once the player saved on that slot?

But when there's no save on that slot, there will be no image but only a text "Data not found".

I'm planning to use if statement but I don't know where to start.

Sorry for my English once again. Hahaa. Thanks in advance.
Image
FB PAGE:
CALIX THE GREAT

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Adding Image on Save Slot (Help!)

#2 Post by CalixtheGreat »

Anyone?
Image
FB PAGE:
CALIX THE GREAT

User avatar
Spoons
Newbie
Posts: 10
Joined: Tue Nov 13, 2018 4:39 am
Contact:

Re: Adding Image on Save Slot (Help!)

#3 Post by Spoons »

I've looked around and only figured out how to add a custom gui image of "data not found" to the save slot.

just make two simple alpha txt images (Idle and hover) and name them "slot_idle_background.png" and the other "slot_hover_background.png"
placing these two images inside your *Your games name*\game\gui\button directory and overwriting the old ones will have the desired effect you're looking for.

I just made a simple black Data Not Found for the idle and then a white one for the hover. (So it'll be black idle, but when hovered over it'll turn white.)

Haven't found anything about the custom save thumbnail, but i've found information on it and in the ball-park i think it's pulling from.

in one of your screens.rpy on line 643 is "add FileScreenshot(slot) xalign 0.5" I believe this is where it's adding the screenshot, but i'm very new to Ren'Py so haven't been able to do much. Googling FileScreenshot takes me to this documentation under file functions -https://www.renpy.org/doc/html/screen_a ... -functions we have FileScreenshot;
FileScreenshot(name, empty=None, page=None, slot=False)
Returns the screenshot associated with the given file. If the file is not loadable, then empty is returned, unless it's None, in which case, a Null displayable is created.

The return value is a displayable.
That's about as far as i've got with my limited knowledge.

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Adding Image on Save Slot (Help!)

#4 Post by CalixtheGreat »

Thanks for the response. Will try this later. 😁

Btw, here's a visual on how I want it to look like:
Image
The first save slot have a different color indicating that there's already a saved file there.
Image
FB PAGE:
CALIX THE GREAT

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Adding Image on Save Slot (Help!)

#5 Post by CalixtheGreat »

Anyone knows how to add an image only to a save slot that already have a saved file? Meaning, if there's no save file in a slot, there will be no image.
Image
FB PAGE:
CALIX THE GREAT

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]