Sourcecode: Main menu music issues (Solved)

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
WatchJessieGo
Regular
Posts: 107
Joined: Wed Apr 04, 2012 4:51 pm
Projects: A Flower Remains, Requiem for You
Location: United States
Contact:

Sourcecode: Main menu music issues (Solved)

#1 Post by WatchJessieGo »

Alright, so I'm trying to get some music to play at the main menu, but it ain't really going well.

I went to options.rpy, found this code

Code: Select all

# config.main_menu_music = "main_menu_theme.ogg"
and changed main_menu_theme to the file that I wanted. The file is in the game directory, but for some reason, it does not play at the main menu. I tried using the play command, but it gives me an error message stating that "play requires a file." Does this have anything to do with the fact that I'm trying to use an .mp3 file?

I'm pretty stumped... Can anyone possibly help me? D:
Last edited by WatchJessieGo on Fri Apr 06, 2012 2:53 pm, edited 1 time in total.

User avatar
Hijiri
Eileen-Class Veteran
Posts: 1519
Joined: Sun Mar 25, 2012 6:35 pm
Completed: Death Rule:lost code Overdrive Edition, Where the White Doves Rest-Tsumihanseishi
Projects: Death Rule: Killing System
Organization: MESI Games
IRC Nick: Hizi
Tumblr: mesigames
Skype: kurotezuka
itch: hijiri
Location: Los Angeles
Contact:

Re: Sourcecode: Main menu music issues

#2 Post by Hijiri »

Get rid of the # symbol.
Image Image
"Perfection goal that always changes. Can pursue, cannot obtain."

WatchJessieGo
Regular
Posts: 107
Joined: Wed Apr 04, 2012 4:51 pm
Projects: A Flower Remains, Requiem for You
Location: United States
Contact:

Re: Sourcecode: Main menu music issues

#3 Post by WatchJessieGo »

I tried it, but it still isn't playing. D:

User avatar
Hijiri
Eileen-Class Veteran
Posts: 1519
Joined: Sun Mar 25, 2012 6:35 pm
Completed: Death Rule:lost code Overdrive Edition, Where the White Doves Rest-Tsumihanseishi
Projects: Death Rule: Killing System
Organization: MESI Games
IRC Nick: Hizi
Tumblr: mesigames
Skype: kurotezuka
itch: hijiri
Location: Los Angeles
Contact:

Re: Sourcecode: Main menu music issues

#4 Post by Hijiri »

Is it indented properly? (As in, is it in line with all the other options in the code?)
Image Image
"Perfection goal that always changes. Can pursue, cannot obtain."

User avatar
Ziassan
Veteran
Posts: 231
Joined: Thu Jun 09, 2011 8:14 pm

Re: Sourcecode: Main menu music issues

#5 Post by Ziassan »

I used this code and all works good, so I only can be something like your name being wrong somewhere (big/small letters or space), or your directory, or the pattern (is your file an .ogg ? if not had you changed it in the code ?)

(On my side I tried to play multiple tracks (like both a water sound and a track) but that seems to be hard)

Anima
Veteran
Posts: 448
Joined: Wed Nov 18, 2009 11:17 am
Completed: Loren
Projects: PS2
Location: Germany
Contact:

Re: Sourcecode: Main menu music issues

#6 Post by Anima »

You use a mp3 file, but your filename ends with .ogg
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

WatchJessieGo
Regular
Posts: 107
Joined: Wed Apr 04, 2012 4:51 pm
Projects: A Flower Remains, Requiem for You
Location: United States
Contact:

Re: Sourcecode: Main menu music issues

#7 Post by WatchJessieGo »

Yeah, it's indented properly. The code currently looks like this:

Code: Select all

config.main_menu_music = "Earnest.mp3"
Does it need to be an .ogg file or something?

(Sorry if my questions seem a bit stupid, I'm just starting out learning to code...)

Raindrops
Regular
Posts: 40
Joined: Fri Jan 27, 2012 4:18 pm
Projects: My Secret Spring (Co-writer & Proofreader), [Secret]
Contact:

Re: Sourcecode: Main menu music issues

#8 Post by Raindrops »

There shouldn't be any problems with using a .mp3 file - when you say the game directory do you mean directly in the game folder and not a folder within the game folder? Also, did you erase the space after deleting the #? Those could cause problems and would be why the music isn't playing.
TOPofBB
All my life, my heart has yearned for a thing I cannot name.
- Andre Breton

WatchJessieGo
Regular
Posts: 107
Joined: Wed Apr 04, 2012 4:51 pm
Projects: A Flower Remains, Requiem for You
Location: United States
Contact:

Re: Sourcecode: Main menu music issues

#9 Post by WatchJessieGo »

Nevermind, I got it to work. Thank you everybody for your help!

User avatar
Ziassan
Veteran
Posts: 231
Joined: Thu Jun 09, 2011 8:14 pm

Re: Sourcecode: Main menu music issues (Solved)

#10 Post by Ziassan »

You should explain what was your problem, think about the ones that will make the same mistake as you and read this topic, it could be an good help.

WatchJessieGo
Regular
Posts: 107
Joined: Wed Apr 04, 2012 4:51 pm
Projects: A Flower Remains, Requiem for You
Location: United States
Contact:

Re: Sourcecode: Main menu music issues (Solved)

#11 Post by WatchJessieGo »

When backspacing to make it properly indented, I accidentally missed a space. ^^"

Post Reply

Who is online

Users browsing this forum: Ocelot