Allowing saving during splashscreen

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.
Message
Author
User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Allowing saving during splashscreen

#1 Post by Coren » Sun Sep 02, 2018 9:37 pm

I'm interested in making a splashscreen before the main menu, but allowing the player to save during it - how should I go about doing that? (Imagine something like Fate/Stay Night, where you can save during the prologue that plays before the main menu.)

Thanks!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Allowing saving during splashscreen

#2 Post by Imperf3kt » Sun Sep 02, 2018 10:17 pm

What is there to save? The game hasn't even started at the splashscreen.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#3 Post by Coren » Mon Sep 03, 2018 12:14 am

I mean if I am trying to make a long prologue that occurs before the main menu, using the label splashscreen command. How do I allow the player to save during the prologue instead of having to wait until they reach the main menu?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Allowing saving during splashscreen

#4 Post by Imperf3kt » Mon Sep 03, 2018 1:14 am

You should be using the main_menu label for that.
https://www.renpy.org/doc/html/label.ht ... ial-labels

Code: Select all

label main_menu:
    "your prologue here"
    return
label start:
    return
label foo:
    "your main story. This replaces the start label."
    return
Then in the navigation menu, adjust the action of the start button.

Code: Select all

textbutton _("Start") action Start("foo")
Last edited by Imperf3kt on Mon Sep 03, 2018 1:34 am, edited 3 times in total.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#5 Post by Coren » Mon Sep 03, 2018 1:16 am

I plan on having the game bring the player to the actual main menu after the prologue. How can I do that if I remove the main menu altogether?

I'm looking for something like in this thread: viewtopic.php?t=2400 but the code here seems outdated. Do you know if there's a newer code that will work that does the same function? Thank you!!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Allowing saving during splashscreen

#6 Post by Imperf3kt » Mon Sep 03, 2018 1:20 am

Using label main_menu doesn't remove the main menu, it just makes the game start there.
label main_menu
If it exists, this label is called instead of the main menu. If it returns, Ren'Py will start the game at the start label. For example, the following will immediately start the game without displaying the main menu.
You just need to make some minor changes.
I edited my prior post to add an example usage.
Last edited by Imperf3kt on Mon Sep 03, 2018 1:34 am, edited 1 time in total.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#7 Post by Coren » Mon Sep 03, 2018 1:25 am

I gave it a try, and yes it skipped the main menu. The return command brings the game to label start, which is after the main menu, so this label replaces the main_menu rather than adds on to it, which is not what I am trying to do. I'm trying to have a main menu and also have a prologue that plays the first time before it, like in Fate/Stay Night. Would that be possible?

That's why I phrased my question as how to save during the splashscreen, because label splashscreen does exactly what I want - play the prologue then go to the main menu after. The downside is just that saving is disabled during the splashscreen, and I want to enable it.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Allowing saving during splashscreen

#8 Post by Imperf3kt » Mon Sep 03, 2018 1:28 am

Sorry about that, I misread the quoted text.

I have adjusted my posts and believe it should work if used as shown.


You could also try placing it at the very end of your script file without a return.


Looking at the linked thread, that should work.
Last edited by Imperf3kt on Mon Sep 03, 2018 1:36 am, edited 1 time in total.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#9 Post by Coren » Mon Sep 03, 2018 1:34 am

Thanks for trying to help - I'm a complete newb though so I don't know how to change actions.

The main menu text in screens looks like this:

Code: Select all

        if main_menu:

            textbutton _("Start") action Start()
What should I change it to?

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#10 Post by Coren » Mon Sep 03, 2018 1:37 am

Do you by any chance know how to make the following code

Code: Select all

$ _game_menu_screen = "_save_screen"
Work with the newest version of Ren'py? When I use it it causes an error, saying _save_screen cannot be found.

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#11 Post by Coren » Mon Sep 03, 2018 1:39 am

Also the main_menu tag also doesn't work unfortunately - I just tried it and I still cannot save during the prologue sequence.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Allowing saving during splashscreen

#12 Post by Imperf3kt » Mon Sep 03, 2018 1:40 am

Just make a new label and have Start action, start there. Start ("new_label")
I may have edited it after you saw, I apologise for that. I am at work and replying in the few moments break I find here and there, if I leave something out, it usually takes me many minutes to edit it in.


I'll have a try when home. ~3 hours
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
Coren
Mindscrew Driver
Posts: 1691
Joined: Fri Sep 18, 2009 9:24 am
Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
Organization: Soyasushi Productions
Tumblr: CorenBaili
Deviantart: CorenB
Skype: coren.baili
Contact:

Re: Allowing saving during splashscreen

#13 Post by Coren » Mon Sep 03, 2018 1:49 am

Hey thanks for all your replies! I *think* I have managed to sort it out by tweaking the _save_screen label to make saving possible, but I'll just test it out a few more times before making sure.

User avatar
MaydohMaydoh
Regular
Posts: 101
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: Allowing saving during splashscreen

#14 Post by MaydohMaydoh » Mon Sep 03, 2018 3:23 am

I think Imperf3kt's method would work best. If you use a persistent variable in the main menu label to call the main menu screen if the prologue has been seen and use the start label as the prologue.

Code: Select all

label main_menu:
    if persistent.prologue:
        call screen main_menu
    else:
        return
        
label start:
    "Prologue goes here."
    $ persistent.prologue = True
    return
    
screen main_menu()
    textbutton "Start" action Start("new_start")
    
label new_start:
    "Game goes here."

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Allowing saving during splashscreen

#15 Post by Imperf3kt » Mon Sep 03, 2018 4:24 am

I had a quick trial and it indeed seems to completely ignore the main menu (even when calling it, bringing up the game menu instead)

Will look into this more later, but can say for now, the suggested methods don't work as intended.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

Post Reply

Who is online

Users browsing this forum: hapciupalit