Main menu music

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
Tyler
Regular
Posts: 68
Joined: Thu Aug 19, 2004 12:15 am
Contact:

Main menu music

#1 Post by Tyler » Mon Sep 27, 2004 10:44 pm

Is there a way to have music in the main menu?

User avatar
PyTom
Ren'Py Creator
Posts: 15476
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:

#2 Post by PyTom » Mon Sep 27, 2004 11:07 pm

Yes, in 4.2, although it's not as nice as it should be.

To do this, you want to write your own main menu, which then jumps to the library main menu. For example:

Code: Select all

label main_menu:

    $ renpy.music_start('background.mp3')
    jump _library_main_menu
You can use this technique to do anything you want before the main menu.

Hope this helps.

Tyler
Regular
Posts: 68
Joined: Thu Aug 19, 2004 12:15 am
Contact:

#3 Post by Tyler » Mon Sep 27, 2004 11:11 pm

Thank you :)

khell
Newbie
Posts: 6
Joined: Sat Jan 05, 2008 3:49 am
Contact:

Re: Main menu music

#4 Post by khell » Sat Jan 05, 2008 3:54 am

3 years after....

lol

in options.rpy I put the music I want in main_menu like this:

config.main_menu_music = "music_I_wanna_hear_in_main_menu.ogg"

but it doesn't sound

is there anything else I need to change in options.rpy ?
or in another place?

thxs.

User avatar
Raikiri
Regular
Posts: 58
Joined: Mon Jan 29, 2007 10:32 am
Location: Sweden
Contact:

Re: Main menu music

#5 Post by Raikiri » Sat Jan 05, 2008 8:47 am

Are you sure the line doesn't start with an #?

IIRC, many of the lines in options.rpy are commented out by default, you have to uncomment it for it to work.
Lucifer status:
It Will Be Done When It's Done™

khell
Newbie
Posts: 6
Joined: Sat Jan 05, 2008 3:49 am
Contact:

Re: Main menu music

#6 Post by khell » Sun Jan 06, 2008 3:55 am

yep , I'm absolutely sure about that XD


EDIT:

I just changed the name(in the ogg file and in the option.rpy) and it worked
I switched both to the old name and they didn't work again

the name that didn't work was "Sample17.ogg"
was it because I started with a capital character? or maybe because it had a number in it, or meybe it didn't alowed the word "sample" inside the name?

well, If anyone know what exactly happened, please tell me, even if it was a bug XD

well, thanks anyway.

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Main menu music

#7 Post by Jake » Sun Jan 06, 2008 9:11 am

khell wrote: the name that didn't work was "Sample17.ogg"
was it because I started with a capital character? or maybe because it had a number in it, or meybe it didn't alowed the word "sample" inside the name?
Probably more relevantly, the numbers aren't normal ASCII numbers but unicode numbers from some odd other part of the unicode range. And in my experience, Ren'Py is only happy loading files which are named entirely in ASCII. So rename your "Sample17.ogg" to "Sample17.ogg" and try it again...

...the other thing to note is that while capital letters in filenames are fine, some of the systems Ren'Py runs on (e.g. Linux) have case-sensitive filesystems, so you should always use the exact same case in the script as the file has - capital letters where there are capital letters in the filename. Personally, I prefer to just name all of my files entirely in lowercase all the time to avoid confusion.
Server error: user 'Jake' not found

khell
Newbie
Posts: 6
Joined: Sat Jan 05, 2008 3:49 am
Contact:

Re: Main menu music

#8 Post by khell » Sun Jan 06, 2008 10:30 am

yeah, maybe was unicode, because that ogg file was the name of a song from a ost where almost all the songs where named in japanese (it was umineko 1 ost) XD

thanks ^^

User avatar
000
Regular
Posts: 94
Joined: Mon Dec 24, 2007 11:09 am
Projects: Ren'Py Russian distributive
Location: Уфа, РБ, Россия
Contact:

Re: Main menu music

#9 Post by 000 » Sun Jan 06, 2008 11:21 am

khell wrote:yeah, maybe was unicode, because that ogg file was the name of a song from a ost where almost all the songs where named in japanese (it was umineko 1 ost) XD
Are you 100% adamant on using something that not ffu in your work? People around here tend to look at copyright seriously...

But then again, it perfectly makes sense to use OST of something in doujin work on it. And it is pretty much acceptable.
<feels sowwy for his Engrish>

khell
Newbie
Posts: 6
Joined: Sat Jan 05, 2008 3:49 am
Contact:

Re: Main menu music

#10 Post by khell » Sun Jan 06, 2008 11:42 am

000 wrote:
khell wrote:yeah, maybe was unicode, because that ogg file was the name of a song from a ost where almost all the songs where named in japanese (it was umineko 1 ost) XD
Are you 100% adamant on using something that not ffu in your work? People around here tend to look at copyright seriously...
don't worry, I'm just getting started using renpy, so all the little games I'm doing now are only to learn renpy and to teach a friend how to use it, not for release XD

000 wrote:But then again, it perfectly makes sense to use OST of something in doujin work on it. And it is pretty much acceptable.
but Umineko is 07th Expansion first release as a non doujin game makers, so It won't be good to use those musics in released games

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], hell_oh_world