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.
I changed the Yes/No Prompt background to a transparent one so the screen gets darker when the message appears. It works fine except when pressing the X in windows mode to exit just as you can see in the picture. Is there anyway to change this?
Basically I want to see how the screen gets darker instead of changing completly, no matter if I'm in the middle of the novel or in any menu.
You're lucky. In Ren'py 6.16, clicking the 'X' there just gives me an error message (regular quitting works fine though). At least you can click it without crashing your game. I suspect something changed in newer versions of Ren'py that made clicking the 'X' call the screen differently than activating "Quit()" because in the version I first got (6.13), it didn't have that error message problem. Clicking the 'X' functioned 100% the same as Quitting in any other fashion. It also did the darker message thing that you wanted perfectly fine for me.
I often find that when the background changes like that, it's an issue with the fact that it's a menu. When Ren'py calls a menu, it calls it as a brand new screen, erasing any other open menus (including the main menu). If you try for a transparent BG, you'll end up getting that checkerboard behind it because there is no background under your new menu. Sometimes even with simple prompts, it can get confused and resort to this behavior. Without re-doing the way the screens function significantly, you pretty much can't see anything behind a menu unless the only thing under it was the game itself. If you go from a menu to another menu, you lose that game behind it effect.
Thanks for replying.
I tried this but it doesn't seem to work, and I haven't made any changes on the code for the Yes/No Prompt so I don't really think I messed anywhere In fact, in any other menu or part of the game, it seems to work fine, it only changes the background completly when I press the X to exit. Pics related:
Crazy Li wrote:You're lucky. In Ren'py 6.16, clicking the 'X' there just gives me an error message (regular quitting works fine though). At least you can click it without crashing your game. I suspect something changed in newer versions of Ren'py that made clicking the 'X' call the screen differently than activating "Quit()" because in the version I first got (6.13), it didn't have that error message problem. Clicking the 'X' functioned 100% the same as Quitting in any other fashion. It also did the darker message thing that you wanted perfectly fine for me.
I often find that when the background changes like that, it's an issue with the fact that it's a menu. When Ren'py calls a menu, it calls it as a brand new screen, erasing any other open menus (including the main menu). If you try for a transparent BG, you'll end up getting that checkerboard behind it because there is no background under your new menu. Sometimes even with simple prompts, it can get confused and resort to this behavior. Without re-doing the way the screens function significantly, you pretty much can't see anything behind a menu unless the only thing under it was the game itself. If you go from a menu to another menu, you lose that game behind it effect.
So, maybe it's something related with the new version? I just updated to it so maybe is related
So only yes/no when you click the X? If you click your "Salir" button, that yes/no prompt works right? If that's the case, I really do suspect the version is the culprit.
Crazy Li wrote:So only yes/no when you click the X? If you click your "Salir" button, that yes/no prompt works right? If that's the case, I really do suspect the version is the culprit.
Exactly, if I press "Salir" it works fine. It doesn't really make any sense
Yep, that's my problem. Except worse because it won't even show the yes/no prompt, instead just giving me an error message. Something about overlays or something. I just stick to my older version because it works without errors.
But what should I do if I want previous background to stay without changes? Yes/no prompt should appear in front of all layers, right?(modal True) Why this screen clears all layers behind it in case of "red x" click?
Just like what xela suggested...
In the Ren'Py documentation:config.quit_action
First, use the bit of code as DesertFox suggested and then add this in options.rpy under init python...
"Destiny is a no matter of chance
It is a matter of choice
It is not a thing to be waited for
It is a thing to be achieved..."
-William Jennings Bryan
If you can dream and not make dreams your master;
If you can think and not make thoughts your aim,
If you can meet with Triumph and Disaster;
And treat those two impostors just the same,
Only then can you ever win against yourself...