Menu Dialogue Question

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
Senpai88
Newbie
Posts: 8
Joined: Wed Feb 14, 2007 1:10 am
Location: The Dojo
Contact:

Menu Dialogue Question

#1 Post by Senpai88 »

Hey guys. :) I've been visiting this forum for about a month (since I found out about Ren'Py), but never bothered to register until now. I don't believe this question has been asked before, though I could be wrong... My question concerns preset dialogue of the menu screen.

I'm working on a kinetic novel, so I've disabled the load/save functions of my novel, deeming them unnecessary . When I'm "playing" the novel and I click the button to return to the main menu it tells me that my "unsaved progress will be lost." Seeing as the save function is disabled, this warning isn't needed.

Is there any way for me to take off that part of the message and simply ask if the user wants to return to the main menu? Can I use a translation function or something, or is that dialogue set in stone in the common files?

Your help in this matter would be greatly appreciated. Thanks!
Image

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#2 Post by monele »

First : I love your signature XD...

Second : how long will your novel be? If it's any longer than 10 minutes, it might not be a good thing to prevent saving.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#3 Post by PyTom »

I agree with monele... I'll also point out that you can customize the strings using library.translations. There should be an example in the Ren'Py cookbook.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Senpai88
Newbie
Posts: 8
Joined: Wed Feb 14, 2007 1:10 am
Location: The Dojo
Contact:

#4 Post by Senpai88 »

monele wrote:First : I love your signature XD...
Thanks! My novel is pretty short. I'm sure that for most people it'll 10 minutes or less. Since it's my first, I wanted to keep it fairly simple.
PyTom wrote:There should be an example in the Ren'Py cookbook.
Oh! Whoops! Found it. Forgot to try looking in the Cookbook... I knew about the translations for "Main Menu," "Preferences," etc. but didn't realize you could translate that kind of thing, as well. Thanks a lot, PyTom!

I look forward to your help again in the future. *bow*
Image

Senpai88
Newbie
Posts: 8
Joined: Wed Feb 14, 2007 1:10 am
Location: The Dojo
Contact:

#5 Post by Senpai88 »

Sorry for the double-post, but now I have another question. This one's a bit more of a toughie.

Since I've disabled saving, the user cannot create his or her own save files. Is there a way for me to create a kind of "chapter select" feature? That way the user wouldn't have to start the entire thing over to see one chapter.

I think I basically know what I need to do, but I'm a bit new to Ren'Py and not sure of the how. I think I need to create the chapter select screen and add it to the main menu, locking all chapters by default. Then, when a chapter is completed, I need to add a script that unlocks that particular chapter.

Is that about right? I'm still a little (okay, a lot) shaky on creating menus, etc... Thanks again for your help.
Image

absinthe
Regular
Posts: 194
Joined: Sat Dec 10, 2005 12:26 am
Contact:

#6 Post by absinthe »

I was actually thinking about how to go about that just the other day!

I think that's how I would do it -- remove the existing save/load screen completely, then use renpy.save() to set autosaves at the beginning of each chapter, and make a new, tailored load screen to reflect the chapters available.

I was poking around in the docs and the chapter on Saving/Loading had some interesting looking functions in it. The one on designing your own menu confuses me as to *why* it works, but it does work if you follow it step by step.

You might also take a look at the gallery unlock script (I think it's in the cookbook); it seems similar in theory to what you're thinking of doing?
My 2007 NaNo entry: Eidolon

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#7 Post by PyTom »

If it's purely a kinetic novel, then what you can do is to set labels at the start of each chapter, and then add a new entry to the main menu that brings the user to a menu that lets them jump to a chapter.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Senpai88
Newbie
Posts: 8
Joined: Wed Feb 14, 2007 1:10 am
Location: The Dojo
Contact:

#8 Post by Senpai88 »

This is where I get a little confused. I'm pretty sure I can set the labels and jumps without any problems, but I'm not sure how to create my own menu. I've looked through the docs, but I'm obviously not doing things right, since it doesn't work... :(

Would it be too much trouble to ask someone to create a very simple example of a custom menu screen that I can mess with until I get it how I want it?
Image

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#9 Post by DaFool »

Code: Select all

init:
    $ library.main_menu.insert(2, ("Chapter2", "chapter2", 'persistent.ch1_clear'))
    $ library.main_menu.insert(3, ("Chapter3", "chapter3", 'persistent.ch2_clear'))

#...much later

#end of chapter 1
    $ persistent.ch1_clear = True

label chapter2:
#stuff for chapter 2
    $ persistent.ch2_clear = True
Note: Not tested, but taken directly from working examples.

Senpai88
Newbie
Posts: 8
Joined: Wed Feb 14, 2007 1:10 am
Location: The Dojo
Contact:

#10 Post by Senpai88 »

Thankyouthankyouthankyou!!!

Now to get to work...
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]