[Tutorial] Customizing Menus

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
xXimmaeatjooXx
Newbie
Posts: 15
Joined: Sun Oct 02, 2011 3:27 pm
Contact:

Re: [Tutorial] Customizing Menus

#76 Post by xXimmaeatjooXx »

It didnt work ;-;
it says

File "game/screens.rpy", line 182: expected a ketword argument, colon, or end of line.
style "mm_root" (arrow)= "Adventures_title_screen_1.png"

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing Menus

#77 Post by Aleema »

Did you forget your comma at the end?

xXimmaeatjooXx
Newbie
Posts: 15
Joined: Sun Oct 02, 2011 3:27 pm
Contact:

Re: [Tutorial] Customizing Menus

#78 Post by xXimmaeatjooXx »

i added a comma and nothing happened o-o

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing Menus

#79 Post by Aleema »

Copy/paste the line of code directly from your options.rpy file and not just the error. Right now, there's this "(arrow)" thing and I don't know if that's in the error or actually in the code. o_O But it's not supposed to be there.

xXimmaeatjooXx
Newbie
Posts: 15
Joined: Sun Oct 02, 2011 3:27 pm
Contact:

Re: [Tutorial] Customizing Menus

#80 Post by xXimmaeatjooXx »

oh that's the error XD here's the code

The background of the main menu.
window:
style "mm_root" = "Adventures_title_screen_1.png"

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing Menus

#81 Post by Aleema »

Okay, now I'm confused. I think you're combining two approaches here on accident. What you want to do is go to your options.rpy, find the area of code that looks like this:

Code: Select all

        mm_root = "#dcebff",
And then make it look like this:

Code: Select all

        mm_root = "Adventures_title_screen_1.png",
That's it. All that window/style stuff is for something else entirely, namely your screens.rpy file.

xXimmaeatjooXx
Newbie
Posts: 15
Joined: Sun Oct 02, 2011 3:27 pm
Contact:

Re: [Tutorial] Customizing Menus

#82 Post by xXimmaeatjooXx »

okay, did that, launched, and got an entire screen of errors

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing Menus

#83 Post by Aleema »

That code isn't wrong, so there's something wrong with how you pasted it. Something you'll learn about this coding language, and any language, is that it's fickle and requires specific spacing and placement and such. Also, it helps when you tell us what the error says exactly, too. Just telling me it doesn't work doesn't really help you. :)


User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing Menus

#85 Post by Aleema »

Aww, lol ... you didn't have to make a screencap like that. ^^; Next time you can hit "open traceback" and it will open in the editor and you can copy/paste it here. Sorry!

All that code, and it says it simply can't find your file! Have you tried everything listed in this FAQ entry to see if you can fix it? It's just a basic checklist to make sure Ren'Py can find your file.

xXimmaeatjooXx
Newbie
Posts: 15
Joined: Sun Oct 02, 2011 3:27 pm
Contact:

Re: [Tutorial] Customizing Menus

#86 Post by xXimmaeatjooXx »

AHAHA! XD okay, one last annoying question (for now)
how do I make the music stop after navigating away from the title menu?

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing Menus

#87 Post by Aleema »

It's supposed to stop on it's own, but for some reason that isn't always the case ... People fix it by simply saying "stop music" after the start label, like this:

Code: Select all

label start:
    stop music
You can add a fade if you want, too.

xXimmaeatjooXx
Newbie
Posts: 15
Joined: Sun Oct 02, 2011 3:27 pm
Contact:

Re: [Tutorial] Customizing Menus

#88 Post by xXimmaeatjooXx »

and thank you so much for helping the hopeless me!

Variasaber
Newbie
Posts: 16
Joined: Sat Sep 24, 2011 11:35 pm
Completed: Ex Nihilo Unum (http://users.wpi.edu/~bmoriarty/imgd100 ... loUnum.rar)
Organization: 12000 Bombs
Location: Worcester Polytechnic Institute
Contact:

Re: [Tutorial] Customizing Menus

#89 Post by Variasaber »

A moderator or admin should sticky (is that what they call it here?) your tutorials, Aleema, they are fantastic.
I know finding them is just a matter of searching for "[Tutorial]", but not everyone knows that. Are you one of the higher-ups on the forum, or is it simply that you've been posting for several years and have lots of Ren'Py experience?
Image

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: [Tutorial] Customizing Menus

#90 Post by Milkymalk »

I have a really hard time finding any tutorials or documentations on how to make entirely new screens instead of just modifying the style of existing ones. How to make buttons that you can select (instead of just click for a result), how to change the contents of text labels or buttons depending on variables (i.e. clicking on a button so it changes its text) etc.

Can you point me to such a ressource?

Post Reply

Who is online

Users browsing this forum: No registered users