Page 1 of 1

How to redirect the screen?

Posted: Wed Jun 28, 2017 8:32 am
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.

Re: How to redirect the screen?

Posted: Wed Jun 28, 2017 11:25 am
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.

Re: How to redirect the screen?

Posted: Wed Jun 28, 2017 11:59 am
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]).

Re: How to redirect the screen?

Posted: Wed Jun 28, 2017 12:53 pm
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

Re: How to redirect the screen?

Posted: Wed Jun 28, 2017 1:00 pm
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

Re: How to redirect the screen?

Posted: Wed Jun 28, 2017 1:07 pm
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