[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

#61 Post by xXimmaeatjooXx »

I'm really really new to this fourm and ren'py in general, I can't find a search on the fourm so I figured to ask here, is there any possible way to put music on the main 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

#62 Post by Aleema »

@Wright1000: No idea, I don't have 6.13 so I haven't worked with the new quick buttons yet.
@xXimmaeatjooXx: You could do with a good Tutorial reading. :) A lot of configurations are in your options.rpy file. You have to open it and read the comments. To add music, you place your file name in this line of code:

Code: Select all

config.main_menu_music = "main_menu_theme.ogg"
You have to uncomment it first by deleting the # symbol in front of it.

P.s. the search is in the upper right corner next to "faq", "members", and "user control panel"

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

Re: [Tutorial] Customizing Menus

#63 Post by xXimmaeatjooXx »

I tried that and all that came up was

File "game/script.rpy", line 22: play requires a file
play music


I have it imported into the game gallery thing but is there a certain way I have to type it or something..?

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

#64 Post by Aleema »

Why are you typing "play music"? That code will assign MM music without any additional line of code. And you're getting that error because "play music" doesn't know what music to play until you tell it: play music "my_song.ogg"

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

Re: [Tutorial] Customizing Menus

#65 Post by xXimmaeatjooXx »

i'm not typing play music..it's just what comes up on the error message thingy ;-;

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

#66 Post by Aleema »

Look at line 22 of your script.rpy. If you don't see it, post what code inside of it and I can show you the problem.

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

Re: [Tutorial] Customizing Menus

#67 Post by xXimmaeatjooXx »

there's nothing for 22 on the script one, i was editing in the options one...i'm hopelessly confused now OTL

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

#68 Post by Aleema »

xXimmaeatjooXx wrote:there's nothing for 22 on the script one, i was editing in the options one...i'm hopelessly confused now OTL
The error says there's something here, so if you could, could you please post your script.rpy file (or just the code in it)?

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

Re: [Tutorial] Customizing Menus

#69 Post by xXimmaeatjooXx »

Alright then
# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"

# Declare characters used by this game.
define p = Character('PeacockButt', color="#C0A545", what_color="#74138C")
define s = Character('SkullFucker', color="#3923D6", what_color="#660066")
define x = Character('Xim', color="# 0099FF", what_color="#6FFF44")
define w = Character('Wonderbolt', color="#CC99CC", what_color="#339933")
define c= Character('Christmas', color="#03F3AB", what_color="#FF6600")
define g = Character('GreenHood', color="#1F88A7", what_color="CC0000")
define r = Character('Ravey', color="#3366CC", what_color="#660000")
define b = Character('The Butler', color="#C0E7F3", what_color="#000000")
define m = Character('Marelady', color="#FF97CB", what_color="#5757FF")
define pd = Character('Pediatrician', color="#CCCCCC", what_color="#CCFFFF")
define d = Character('Darkscale', color="#000033", what_color="#FFFDFD")
define gr = Character('Groove', color="#FDF2FF", what_color="#003300")

# The game starts here.
label start:


"It was a normal day today. Just like any other day of days. The sun shined today, just like everyday."
"Christmas was out on her normal daily run that she does every day."
"Whilst zooming around the city, she noticed a girl dressed up like a doctor playing with little babies!"
"In a panic mode, she swupt down to the scene of the crime and violently ripped the babies out of the hands of THE PEDIATRITION"
there's all 27 lines

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

#70 Post by Aleema »

Eh, you're right. Weird error. Maybe post the whole error next time, just in case that was a mistake on copy/paste's part. Is there an instance of "play music" *anywhere* in your script? You can search by hitting Find and then toggle "all buffers" and search.

If you're continuing to have problems, you'll need to post what you've modified (so I can see how you established the sound).

Also, that snippet made me laugh. :)

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

Re: [Tutorial] Customizing Menus

#71 Post by xXimmaeatjooXx »

yes, thats me and my friends being stupid XD anyway, I'm on the options tab and I put this down for lines 190-195:
# config.main_menu_music =
"play" "05- Panty & Stocking with Garterbelt OST - Beverly Hills Cock"
( "fadeout" simple_expression )?
( "fadein" simple_expression )?
( "loop" | "noloop" )?
( "if_changed" )?

please correct my stupidity x_X

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

#72 Post by Aleema »

Whoa, what is all that? Haha, okay. There's your problem.

First of all, remember that I asked you to remove the #? That comments out the line, meaning it's invisible. Delete that # symbol (but make sure the line lines up with all the other lines still).

Next, you can only define the file name here. Nothing else. No fades, looping, etc. Please make that line look like this:

Code: Select all

config.main_menu_music = "05- Panty & Stocking with Garterbelt OST - Beverly Hills Cock.mp3"
Umm, but, what is the extension of your song? Is it an mp3? I put mp3 on the end just in case. If it's .wav or .ogg or something, make sure you change that.

Did you get all that? See if it works now.

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

Re: [Tutorial] Customizing Menus

#73 Post by xXimmaeatjooXx »

AH! THANK YOU SO MUCH /cling

and yea it was MP3

ahhh i'm so happy now >u<

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

Re: [Tutorial] Customizing Menus

#74 Post by xXimmaeatjooXx »

Okay, here's another stupid question that i probably missed the answer to while skimming, how do i add an image to the main 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

#75 Post by Aleema »

You should check the "basics" part of the opening post again. It shows you how to set the BG of your main menu, which I believe is what you're asking.

Post Reply

Who is online

Users browsing this forum: No registered users