how to add background and sound on the main menu?

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
User avatar
xelacroix
Regular
Posts: 68
Joined: Mon Jul 25, 2011 2:28 am
Projects: beautiful girls
Contact:

how to add background and sound on the main menu?

#1 Post by xelacroix » Wed Aug 03, 2011 1:06 am

i know simple things about renpy in story telling, but my main menu is plain. i want to add backgrund wallpaper and song. can someone help me with the coding?

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

Re: how to add background and sound on the main menu?

#2 Post by Anima » Wed Aug 03, 2011 4:30 am

You'll have to change to entries in your games options file. The picture or music file must be in the game directory.
For the background:
mm_root = "picture.png"

For the music:
# config.main_menu_music = "main_menu_theme.ogg"
Just uncomment the line and change the filename.
config.main_menu_music = "music.ogg"

The "" are necessary, pay also attention to the indention of the music line. It has to be same as all the other config lines.
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

User avatar
xelacroix
Regular
Posts: 68
Joined: Mon Jul 25, 2011 2:28 am
Projects: beautiful girls
Contact:

Re: how to add background and sound on the main menu?

#3 Post by xelacroix » Wed Aug 03, 2011 7:57 am

thx! i try it up!!! i have finished my kinetik novel with 2 ending only! bad and good! since its just 2 choice....hmmmmmmmmmmm!!!

i have plenty more question..pls help me tq

btw, how to save our game that has complete? build distribution? then where the distribution been saved? i cant seem to find it...

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

Re: how to add background and sound on the main menu?

#4 Post by Anima » Wed Aug 03, 2011 8:11 am

It should be in the folder you've chosen as the projects folder. If you click Options in the Launcher and then on Projects Directory it should have the right directory selected. The game is packed, probably in a zip file with the games name.
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

User avatar
xelacroix
Regular
Posts: 68
Joined: Mon Jul 25, 2011 2:28 am
Projects: beautiful girls
Contact:

Re: how to add background and sound on the main menu?

#5 Post by xelacroix » Wed Aug 03, 2011 8:46 am

/// You'll have to change to entries in your games options file. The picture or music file must be in the game directory.
For the background:
mm_root = "picture.png" ///

i cant make this. but im successfully put the music works. thx

the cover is it in png or jpg format? i put png but it clash with gm_root

User avatar
xelacroix
Regular
Posts: 68
Joined: Mon Jul 25, 2011 2:28 am
Projects: beautiful girls
Contact:

Re: how to add background and sound on the main menu?

#6 Post by xelacroix » Wed Aug 03, 2011 9:25 am

ok problem solved! thx Anima!!! can u please help me on the picture on options problems? thx

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

Re: how to add background and sound on the main menu?

#7 Post by Anima » Wed Aug 03, 2011 9:29 am

I'm not sure what your problem is. Could you elaborate?
The gm_root variable is for the game menu, that's the menu you get when you right click in the game.
You can use either png or jpg, depends on the format of the file you want to use.
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

User avatar
xelacroix
Regular
Posts: 68
Joined: Mon Jul 25, 2011 2:28 am
Projects: beautiful girls
Contact:

Re: how to add background and sound on the main menu?

#8 Post by xelacroix » Wed Aug 03, 2011 10:12 am

actually it has , at the end

mm_root = "picture.png",

and for gm root, i put same picture, just rename it picture2 both has , at the end..

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

Re: how to add background and sound on the main menu?

#9 Post by Anima » Wed Aug 03, 2011 10:27 am

True, I missed it yesterday when I copied the line. The , are supposed to be there.
The correct line would be:
mm_root = "picture.png",

Does it work with the ,?
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

User avatar
xelacroix
Regular
Posts: 68
Joined: Mon Jul 25, 2011 2:28 am
Projects: beautiful girls
Contact:

Re: how to add background and sound on the main menu?

#10 Post by xelacroix » Wed Aug 03, 2011 10:32 am

ya it works like charm

and thx for telling me the gm root is for right click ingame...now i have 2 different picture ;)

do u know how to use DSE?

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

Re: how to add background and sound on the main menu?

#11 Post by Anima » Thu Aug 04, 2011 9:55 am

Great that it's working now.
Unfortunately I can't help you with the DSE. You could create a new topic if you have DSE specific problems.
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

Post Reply

Who is online

Users browsing this forum: No registered users