[SOLVED]How to make a custom save screenshot with images?

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
kawaiinekochama
Regular
Posts: 30
Joined: Sat Jun 03, 2017 12:00 am
Projects: Change Me!
Organization: nekollection
itch: nyankochama
Contact:

[SOLVED]How to make a custom save screenshot with images?

#1 Post by kawaiinekochama »

Hello. I've planned to use a custom image instead of screenshot when you save a game. And the image is also depends on whose route you're playing.
I've tried to implement the codes myself but I kept getting errors. This is the example from the game Amnesia Crowd on PSP.

Image

I'm sorry if someone has already asked this question. I hope that any of you can guide or help me. Thank you. :)
Last edited by kawaiinekochama on Fri Sep 20, 2019 12:26 pm, edited 1 time in total.
My first game :
Image
My website :
Image

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: How to make a custom save screenshot with images?

#2 Post by isobellesophia »

Maybe you can put a image on the save slot line in screens.rpy, i also would like to make a custom one too, maybe you can do anything about it, you need to find the save file line. And find the line where did the file saves, and maybe you can put a path about your image one..

like this line, find this in screens.rpy, about in the save file slots with the hashtags.

Code: Select all

add FileScreenshot(slot) xalign 0.5
and change it to

Code: Select all

add "images/myupimage.png" xalign 0.5
and try if it is works.


Sry for bad english.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: How to make a custom save screenshot with images?

#3 Post by hell_oh_world »

kawaiinekochama wrote: Thu Sep 19, 2019 1:20 am Hello. I've planned to use a custom image instead of screenshot when you save a game. And the image is also depends on whose route you're playing.
I've tried to implement the codes myself but I kept getting errors. This is the example from the game Amnesia Crowd on PSP.

Image

I'm sorry if someone has already asked this question. I hope that any of you can guide or help me. Thank you. :)
My idea for here is to store the route on the save_name variable then create a condition in the file_slots that will show a custom screenshot of the save file depending on the save_name stored in that save file.

Code: Select all

## In script.rpy

label start:
	$ save_name = "route_1" ## Save the current route in the save_name variable
	
	## Saves from this point and onwards will have a save_name route 1.
	
	"Route 1"
	
label route_2:
	$ save_name = "route_2" ## Save the current route in the save_name variable
	
	## Saves from this point and onwards will have a save_name route 2.
	
	"Route 1"

## In screens.rpy

screen file_slots(title):

	## Some codes before the screenshot of the save file...

                    button:
                        action FileAction(slot)

                        has vbox

			if FileSaveName(slot) == "route_1":
                        	add "route_1.png" xalign 0.5
                        elif FileSaveName(slot) == "route_2":
                        	add "route_2.png" xalign 0.5
                        ## And so on...
	
	

User avatar
kawaiinekochama
Regular
Posts: 30
Joined: Sat Jun 03, 2017 12:00 am
Projects: Change Me!
Organization: nekollection
itch: nyankochama
Contact:

Re: How to make a custom save screenshot with images?

#4 Post by kawaiinekochama »

hell_oh_world wrote: Thu Sep 19, 2019 6:29 am
kawaiinekochama wrote: Thu Sep 19, 2019 1:20 am Hello. I've planned to use a custom image instead of screenshot when you save a game. And the image is also depends on whose route you're playing.
I've tried to implement the codes myself but I kept getting errors. This is the example from the game Amnesia Crowd on PSP.

Image

I'm sorry if someone has already asked this question. I hope that any of you can guide or help me. Thank you. :)
My idea for here is to store the route on the save_name variable then create a condition in the file_slots that will show a custom screenshot of the save file depending on the save_name stored in that save file.

Code: Select all

## In script.rpy

label start:
	$ save_name = "route_1" ## Save the current route in the save_name variable
	
	## Saves from this point and onwards will have a save_name route 1.
	
	"Route 1"
	
label route_2:
	$ save_name = "route_2" ## Save the current route in the save_name variable
	
	## Saves from this point and onwards will have a save_name route 2.
	
	"Route 1"

## In screens.rpy

screen file_slots(title):

	## Some codes before the screenshot of the save file...

                    button:
                        action FileAction(slot)

                        has vbox

			if FileSaveName(slot) == "route_1":
                        	add "route_1.png" xalign 0.5
                        elif FileSaveName(slot) == "route_2":
                        	add "route_2.png" xalign 0.5
                        ## And so on...
	
	
Ohh! It works! Thank you so much! :D This question is solved then!
My first game :
Image
My website :
Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]