Disable and enable Saves [SOLVED]

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
neometalero
Veteran
Posts: 202
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Disable and enable Saves [SOLVED]

#1 Post by neometalero »

I need a way to disable and enable the save screen on the game. There is any way I could do this?
Last edited by neometalero on Tue May 21, 2024 2:44 pm, edited 1 time in total.
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

User avatar
m_from_space
Eileen-Class Veteran
Posts: 1030
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Disable and enable Saves

#2 Post by m_from_space »

neometalero wrote: Mon May 20, 2024 11:39 am I need a way to disable and enable the save screen on the game. There is any way I could do this?
There is a variable for this purpose:

Code: Select all

# disable access to the game menu:
$ _game_menu_screen = None

# reset access to the game menu:
$ _game_menu_screen = "save"

User avatar
neometalero
Veteran
Posts: 202
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Re: Disable and enable Saves

#3 Post by neometalero »

m_from_space wrote: Tue May 21, 2024 5:09 am
neometalero wrote: Mon May 20, 2024 11:39 am I need a way to disable and enable the save screen on the game. There is any way I could do this?
There is a variable for this purpose:

Code: Select all

# disable access to the game menu:
$ _game_menu_screen = None

# reset access to the game menu:
$ _game_menu_screen = "save"
That worked, but still I can save the game from the little bar on the bottom of the screen. Any way to disable that?
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

jeffster
Veteran
Posts: 494
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Disable and enable Saves

#4 Post by jeffster »

neometalero wrote: Tue May 21, 2024 2:01 pm That worked, but still I can save the game from the little bar on the bottom of the screen. Any way to disable that?
You can use Displayable Inspector: point that little bar with the mouse and press Shift-i.

You could see that it's screen quick_menu.

Examine the file screens.rpy looking for "quick_menu".

You will find:

Code: Select all

screen quick_menu():

    ## Ensure this appears on top of other screens.
    zorder 100

    if quick_menu:

        hbox:
            style_prefix "quick"

            xalign 0.5
            yalign 1.0

            textbutton _("Back") action Rollback()
            textbutton _("History") action ShowMenu('history')
            textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
            textbutton _("Auto") action Preference("auto-forward", "toggle")
            textbutton _("Save") action ShowMenu('save')
            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Prefs") action ShowMenu('preferences')
Here "if quick_menu:" means that you can turn off that bar with

Code: Select all

    $ quick_menu = False
and switch it back on with

Code: Select all

    $ quick_menu = True
Apart from that, you can change the lines

Code: Select all

            textbutton _("Save") action ShowMenu('save')
            textbutton _("Q.Save") action QuickSave()
to

Code: Select all

            if save_on:
                textbutton _("Save") action ShowMenu('save')
                textbutton _("Q.Save") action QuickSave()
Set that variable to normally allow saves:

Code: Select all

default save_on = True
And you could hide those textbuttons ("Save", "Q.Save") with

Code: Select all

    $ save_on = False
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

User avatar
neometalero
Veteran
Posts: 202
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Re: Disable and enable Saves

#5 Post by neometalero »

I managed to hide and activate the save when needed. I will play around a little bit more and see if I can do it in a more elegant way, but this was all of the information I needed. Thanks a lot for your help! Both of you!
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot]