The default game model created by Renpy has an infinite amount of save slots and 6 autosave and quicksave. My main goal is to limit the manual save slots to only 6 in 1 page, as opposed to 6 saves per unlimited pages.
So, in the gui I have by default
define gui.file_slot_cols = 3
define gui.file_slot_rows = 2 which puts me nicely at 6 slots per page.
I have been trying for the past hour so limit the number of pages by different methods :
define gui.file_slot_pages = 1
define gui.file_slot_pages = max(1)
define gui.file_slot_pages = (max = 1)
define Filepagenext = (max = 1) and several other functions but none have worked. I'm not sure how to proceed. Any ideas?
How to limit save slots?
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.
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.
-
- Newbie
- Posts: 2
- Joined: Sat Jan 12, 2019 2:45 pm
- Contact:
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: How to limit save slots?
You can just remove the paging system from the file_slots screen. No need to fiddle with max saves if you only want one page - remove the ability to go to page 2, 3, 4 etc, and the player only has access to the save slots on the first page.
Just be sure to leave a way to access the quick load and quick save and maybe automatic saves/loads screens.
Removing the ability to save and limiting it to six is quite the unpopular thing to do, are you absolutely sure you should do this?
Just be sure to leave a way to access the quick load and quick save and maybe automatic saves/loads screens.
Removing the ability to save and limiting it to six is quite the unpopular thing to do, are you absolutely sure you should do this?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 2
- Joined: Sat Jan 12, 2019 2:45 pm
- Contact:
Re: How to limit save slots?
I'm not sure what lines I should write to remove the ability to go to further pages. Could you please give me an example?Imperf3kt wrote: ↑Sat Jan 12, 2019 3:15 pm You can just remove the paging system from the file_slots screen. No need to fiddle with max saves if you only want one page - remove the ability to go to page 2, 3, 4 etc, and the player only has access to the save slots on the first page.
Just be sure to leave a way to access the quick load and quick save and maybe automatic saves/loads screens.
Removing the ability to save and limiting it to six is quite the unpopular thing to do, are you absolutely sure you should do this?
I am not going to completely remove quicksave and autosave. I just want to limit the number of manual saves, since I think that for the particular game I have in mind anything more than that would be excessive. In any case, even if I decide to increase the number of saves allotted, I still think it'll be useful to know how to do this.
Thank you for the response!
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: How to limit save slots?
In screen.rpy look for
then where the [textbutton and for] is just put this ## in front of textbutton it will cancel it out
it should look like this
Code: Select all
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
it should look like this
Code: Select all
## range(1, 10) gives the numbers from 1 to 9.
##for page in range(1, 10):
##textbutton "[page]" action FilePage(page)
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: In addition
the same code (for one page):
https://www.renpy.org/doc/html/screen_a ... lePageNext
Code: Select all
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 2):
textbutton "[page]" action FilePage(page)
textbutton _(">") action FilePageNext(max=1)
Who is online
Users browsing this forum: henne