How to redirect the screen?

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
Vladimir_P
Newbie
Posts: 11
Joined: Wed Jun 28, 2017 7:48 am
Contact:

How to redirect the screen?

#1 Post by Vladimir_P »

Hello! Sorry for my English. I am Ukrainian.
I'm making a little mod for one game on Ren'Py. After that, I'll make the game.

I want to change the main menu of the game. But for this I have to REDIRECT the main menu screen to my, because I have to create mod WITHOUT changes in game files (I have some reasons for this).
My question is: How to redirect the system screen (at least the main menu screen) to my screen, WITHOUT ANY CHANGES in game files? Only creating my own files.
I changed line " _main_menu_screen = "main_menu" " to my ( _main_menu_screen = "my_main_menu" ) and created the my_main_menu screen, but after return game open default main_menu. :(
Please, help!

If you need any part of the code, please tell me about it.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How to redirect the screen?

#2 Post by Ocelot »

You probably meant _game_menu_screen variable - there is no _main_menu_screen. It is only to define which menu appears when you press ESC in-game. It does not control which menu appears when game is statet, or where control goes after it finishes.

The only options are to either edit main_menu screen or main_menu label.
< < insert Rick Cook quote here > >

User avatar
Vladimir_P
Newbie
Posts: 11
Joined: Wed Jun 28, 2017 7:48 am
Contact:

Re: How to redirect the screen?

#3 Post by Vladimir_P »

Ocelot wrote:You probably meant _game_menu_screen variable - there is no _main_menu_screen. It is only to define which menu appears when you press ESC in-game.
No. I meant exactly _main_menu_screen.
Ocelot wrote:The only options are to either edit main_menu screen or main_menu label.
You meant I can't redirect the main_menu screen without edit file screens.rpy? :(

P.S. If this is important, I am making mod for the game Everlasting Summer (maybe you known... [your avatar of Lena]).

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How to redirect the screen?

#4 Post by Ocelot »

_main_menu_screen is not mentioned anywhere in documentations. If it even exist, it is some internal variable, which is better left alone.

You can try defining main_menu label, it it wasn't defined by the base game. It has priority over main_menu screen. In this label you can do anything you like: show screens, dialogue, etc.

Here I used it to essentually have two main menus, and choose, what to show, depending on previous user actions: viewtopic.php?f=8&t=43102&start=15#p448216
< < insert Rick Cook quote here > >

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: How to redirect the screen?

#5 Post by vollschauer »

As Ocelot said there is NO variable "_main_menu_screen" to change or redirect the main_menu
I actually can just guess where you looked at (00start.rpy?)
But I don't wanna know what dirty hack you plan ;) to someone else's game, but have a look at:

Code: Select all

label main_menu:
https://www.renpy.org/doc/html/label.ht ... ial-labels

User avatar
Vladimir_P
Newbie
Posts: 11
Joined: Wed Jun 28, 2017 7:48 am
Contact:

Re: How to redirect the screen?

#6 Post by Vladimir_P »

Ocelot wrote:_main_menu_screen is not mentioned anywhere in documentations. If it even exist, it is some internal variable, which is better left alone.

You can try defining main_menu label, it it wasn't defined by the base game. It has priority over main_menu screen. In this label you can do anything you like: show screens, dialogue, etc.

Here I used it to essentually have two main menus, and choose, what to show, depending on previous user actions: viewtopic.php?f=8&t=43102&start=15#p448216
vollschauer wrote:As Ocelot said there is NO variable "_main_menu_screen" to change or redirect the main_menu
I actually can just guess where you looked at (00start.rpy?)
But I don't wanna know what dirty hack you plan ;) to someone else's game, but have a look at:

Code: Select all

label main_menu:
https://www.renpy.org/doc/html/label.ht ... ial-labels

Thank you! How could I forget about this? I've already read about the main_menu label! Now I can realize what I wanted. :D

Post Reply

Who is online

Users browsing this forum: Imperf3kt, Ocelot