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.
define gui.LOADING = "Loading will lose unsaved progress. Is this OK?"
define gui.MAIN_MENU = "Returning to the Main Menu will lose unsaved progress. Is this OK?"
I only need these two messages changed, by the way, cause they're too big in the font + size I want to use for my confirm screen. I didn't touch the other messages.
When I restart the game, they still use the default messages.
I've also tried using 'default' instead of 'define' to no avail. What am I doing wrong?
WIP AllxAll game with turn based fighting (Demo 2.0 out!)
if message == layout.OVERWRITE_SAVE:
text "{b}Overwrite Data?{/b}" #title (delete if not needed)
text "Previous data will be lost." #subtext
textbutton "Yes" action yes_action
textbutton "No" action no_action
I think you would just add it into already existing code. Since it's an if statement it should override the previous if you are using the command indicated such as saving or loading. I use this code for all my messages as they all have different text so I haven't tested it with the original yes/no prompt code.
If you want to edit the text (idk how to edit textbutton without effecting all) you can create a style for them.
label _(message):
if (message == "Loading will lose unsaved progress.\nAre you sure you want to do this?") or (message == "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."):
style "confirm_prompta"
else:
style "confirm_prompt"
I just copy-pasted the confirm_prompt style and relabeled it as confirm_prompta, but I changed the size for the font.
I did try setting the message within that if to what I want, but I was getting errors.
If someone has a more elegant solution, please let me know, I'd love to try it ;w;
WIP AllxAll game with turn based fighting (Demo 2.0 out!)