Ren'Py Changing default menu

udogu

Member
May 20, 2019
137
241
This is probably a very basic question, but my experience with programming is very limited.

There is a game I'm playing that has the right mouse button default to the game's menu, but unlike most other Ren'py games I've played, it doesn't open the save menu, but rather the preferences screen.

I find that annoying, so I'd like to be able to tweak the code that sets that particular behavior. However, I don't know how to do that. I know how to change the buttons, but I don't know how to change what the game considers to be the "game_menu" to the save menu.

Anyone have any ideas?
 

Meaning Less

Engaged Member
Sep 13, 2016
3,540
7,070
Edit the variable _game_menu_screen it should be set as "save_screen" or something.
 

Meaning Less

Engaged Member
Sep 13, 2016
3,540
7,070
That would be in the 00gamemenu.rpy file, correct?
Could be on different places depending on where the dev is editing it, you would have to run a search inside the game folder to know for sure.

You could also try editing it while playing, just open the console and type _game_menu_screen = "save_screen" in it.
 
  • Like
Reactions: udogu

udogu

Member
May 20, 2019
137
241
Could be on different places depending on where the dev is editing it, you would have to run a search inside the game folder to know for sure.

You could also try editing it while playing, just open the console and type _game_menu_screen = "save_screen" in it.
I found where the variable was, and it was in that file. I changed the variable you suggested at lines 168 and 169, and it worked perfectly. Right clicking now goes directly to the save screen.

Thank you for your help.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,266
15,082
Next time, don't loose time searching.

Open a text editor, whatever which one, and write:
Code:
init 1000 python:
    _game_menu_screen = "save_screen"
Save it under whatever name you want, as long as the extension is "rpy". Then put the file in the "[path to game]/game" directory (where there's the rpa/rpy/rpyc files). It will do the same.