main menu background did not want to change

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
Aizzah
Newbie
Posts: 11
Joined: Thu Apr 04, 2013 1:59 pm
Location: Indonesia
Contact:

main menu background did not want to change

#1 Post by Aizzah » Wed Apr 17, 2013 10:01 am

First, I want to say sorry because of my bad english.

Then, this is my problem :
I want to make image below to be my main menu background
menu main.jpg
But it did not work, at least t it become like this
Snap 2013-04-17 at 21.51.30.png
I was thought that my code wasn't right. The code is like this

Code: Select all

mm_root = "menu main.jpg",
But there was nothing any error with my game and my picture's name was right.
Does anyone know how to fix it?

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: main menu background did not want to change

#2 Post by Alex » Wed Apr 17, 2013 10:29 am

Looks like your image size doesn't match the screen size (image is bigger). In options.rpy you can set the screen size for your game

Code: Select all

    ## These control the width and height of the screen.

    config.screen_width = 800
    config.screen_height = 600
This means that your background images should be 800x600 pxls to fit the screen (you can change this values if needed).

To change the image size you can use any photoshop-like programm.

User avatar
Aizzah
Newbie
Posts: 11
Joined: Thu Apr 04, 2013 1:59 pm
Location: Indonesia
Contact:

Re: main menu background did not want to change

#3 Post by Aizzah » Wed Apr 17, 2013 8:08 pm

Sorry but it didn't work. Do you know another way?

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: main menu background did not want to change

#4 Post by Alex » Thu Apr 18, 2013 4:18 am

Mmm... could you be more specific what was changed and what is wrong now?
(check if you have image with piano but without title and credits and, if so, try to find out why Ren'Py using it)

User avatar
Aizzah
Newbie
Posts: 11
Joined: Thu Apr 04, 2013 1:59 pm
Location: Indonesia
Contact:

Re: main menu background did not want to change

#5 Post by Aizzah » Thu Apr 18, 2013 6:08 am

Actually, I used picture without credit for my game menu and picture with credit and title for my main menu.
But, my main menu always using picture for my game menu. At least both of my picture have diffrent name.

Then, I try to changed my game menu background with picture below.
back-simfonihitam.jpg
It didn't work again. My main menu background changed but it using picture for my game menu background.

So, I try to changed my theme and change background for main menu and game menu. Again, my main menu background want not changed with picture I want.

I don't know what was wrong. But, really, my main menu background always using picture for my game menu background. Although I tried to change my game menu background with very diffrent picture for my main menu bakground.

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: main menu background did not want to change

#6 Post by Alex » Thu Apr 18, 2013 6:16 am

Post your script in options.rpy so people would try to find out what's wrong.

User avatar
Aizzah
Newbie
Posts: 11
Joined: Thu Apr 04, 2013 1:59 pm
Location: Indonesia
Contact:

Re: main menu background did not want to change

#7 Post by Aizzah » Thu Apr 18, 2013 6:35 am

Code: Select all

########################################
    # Themes
    
    ## We then want to call a theme function. themes.roundrect is
    ## a theme that features the use of rounded rectangles. It's
    ## the only theme we currently support.
    ##
    ## The theme function takes a number of parameters that can
    ## customize the color scheme.

    theme.bordered(
        ## Theme: Bordered
        ## Color scheme: Colorblind
                                    
        ## The color of an idle widget face.
        widget = "#898989",

        ## The color of a focused widget face.
        widget_hover = "#464646",

        ## The color of the text in a widget.
        widget_text = "#CCCCCC",

        ## The color of the text in a selected widget. (For
        ## example, the current value of a preference.)
        widget_selected = "#F2F2F2",

        ## The color of a disabled widget face. 
        disabled = "#898989",

        ## The color of disabled widget text.
        disabled_text = "#666666",

        ## The color of informational labels.
        label = "#c2c2c2",

        ## The color of a frame containing widgets.
        frame = "#252525",

        ## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        mm_root = "menu main.jpg",

        ## The background of the game menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        gm_root = "menu game-back.jpg",

        ## If this is True, the in-game window is rounded. If False,
        ## the in-game window is square.
        rounded_window = False,

        ## And we're done with the theme. The theme will customize
        ## various styles, so if we want to change them, we should
        ## do so below.            
        )

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: main menu background did not want to change

#8 Post by Alex » Thu Apr 18, 2013 1:13 pm

The code looks ok... didn't you change main menu screen? Also, try to set mm_root to a color and see if it will work - if so, then something wrong with your image.

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: main menu background did not want to change

#9 Post by OokamiKasumi » Thu Apr 18, 2013 4:33 pm

Aizzah wrote:...I want to make image below to be my main menu background, But it did not work. I was thought that my code wasn't right. But there was nothing any error with my game and my picture's name was right. Does anyone know how to fix it?
The problem is in how you are declaring your Background Images.

The Main Menu background, all of the Save/Load backgrounds, and the Preferences background are normally set as Color Number in options.rpy.

Code: Select all

        ## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        mm_root = "#F7F7FA",

        ## The background of the game menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        gm_root = "#F7F7FA",
The way you change this to an image, is by going into script.rpy and declaring gm_root and mm_root as an image, (just like all your other images.):

Code: Select all

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

image mm_root = "mm_root.jpg"
image gm_root = "gm_root.jpg"
Then change the entry in option.rpy, like so: (Don't forget the COMMA at the end!)

Code: Select all

        ## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        mm_root = "bg_mm",

        ## The background of the game menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
        gm_root = "bg_gm",
This should fix your problem.
-- Unless you're using a Main Menu SCREEN.

If you are using a Main Menu Screen, the the problem is:
-- Your GROUND image is Covering your Hotspot Menu.

The FIX is this:
-- In screens.rpy:

Code: Select all

##############################################################################
# Main Menu 

# Note: In general, don't use ShowMenu() to show "screens" other than
# menu screens ("save", "load", etc). Just use a plain Show(). If you're
# showing Labels though, that's different.

screen main_menu:
    tag menu

    window:
        style "mm_root" 
        #This is your Main Menu IMAGE. 

    imagemap:
        ground "ui/mm_ground.png" 
        # THIS is your Special main menu Background image, 
        # or the Special Text meant to appear Over the Main Menu image. 

        idle "ui/mm_idle.png" 
        # THIS is your buttons when Not Selected

        hover "ui/mm_hover.png" 
        # THIS is your buttons when cursor Hovers over buttons.
        
        alpha False 
        # This allows Transparent backgrounds to be Invisible to the Mouse. 
       
        # Your Hot Spot coordinates. 
        hotspot (827, 74, 107, 77) action Start() 
        hotspot (815, 155, 140, 57) action ShowMenu("load") 
        hotspot (795, 221, 173, 81) action ShowMenu("preferences") 
        hotspot (830, 443, 107, 65) action Help() 
        hotspot (827, 515, 110, 59) action Quit(confirm=False)
        
init -2 python:

    # Make all the main menu buttons be the same size.
    style.mm_button.size_group = "mm"
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
Aizzah
Newbie
Posts: 11
Joined: Thu Apr 04, 2013 1:59 pm
Location: Indonesia
Contact:

Re: main menu background did not want to change

#10 Post by Aizzah » Fri Apr 19, 2013 2:22 am

:shock: It really works! Thank you so much :)

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: main menu background did not want to change

#11 Post by OokamiKasumi » Fri Apr 19, 2013 5:20 pm

Aizzah wrote::shock: It really works! Thank you so much :)
Excellent!
-- You're welcome.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

Post Reply

Who is online

Users browsing this forum: No registered users