Making menu, several aspects not understood...

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
YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Making menu, several aspects not understood...

#1 Post by YiuKorochko »

I tired reading through the manual to see how to create a custom Main Menu/Theme for a Ren'Py game, but I've just confused myself even more by doing so.

I have two images on this page. The one on the left is what I want to use as my Main Menu's backdrop, where the image on the right is what I would use under each text label, as buttons.
The thing is, I have no clue as to how to go about this...

That, and I was wondering if I can include a background for the Main Menu with an animated character who slides on-screen from the left and then loops him breathing...I'm not sure if this can be done on the main menu screen, but after playing some Mega-Man X Series games, I feel a little inspired by the subtly animated Menu.

One more thing...I made a frame for the in-game text and although it looks great and does what I tell it to, I made it semi-transparent when I designed it, but in the RP emulator, it stays solid, even though the transparent border is taken out which makes NO SENSE...?

Help is highly appreciated. :D
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

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

Re: Making menu, several aspects not understood...

#2 Post by Alex »

Just my two cents...
If you attempting to customize "clasic" main menu, then the answer is styles.
You can use style inspector (shift + i) to see style names of an element that is pointed with cursor. Then you can change this styles whatever way you want, like

Code: Select all

init:
    $ style.mm_button.background = "Button.png"
    $ style.mm_button.ypos = 20 # or change top_padding of the frame, containing buttons
    $ style.mm_button_text.xpos = 75
    $ style.mm_menu_frame.background = "Menu_List.png"
    #$ style.mm_menu_frame.top_padding = 20
### It's better not to use spaces in file names, I think..., and also, python is case sensitive, so all that capital letters... oh... - it's so easy to make a mistake that will be damn hard to find and correct.

Well, in "options.rpy" you also can find how to change main menu background

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 = "#dcebff",
but it can't be an animation...(

The other way of customization is using of imagemaps or totally custom main menu.
For an imagemap you can use Animation for hover and idle pictures and don't need to place each button on the screen separately.

http://www.renpy.org/wiki/renpy/doc/ref ... y.imagemap
http://www.renpy.org/wiki/renpy/doc/ref ... /Animation

If you want something above imagemaps abilities, then make label "main_menu" and place your own script there.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: Making menu, several aspects not understood...

#3 Post by YiuKorochko »

Alex wrote:Just my two cents...
Thanks, much appreciated!
All I need now are how to make the text frame (in-game) transparent and how to add a little line end animation.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

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

Re: Making menu, several aspects not understood...

#4 Post by Alex »

At the picture it looks quite transparent... I now nothing about this problem, but if you post your image someone could say what's wrong with it.

And little picture at the end of line - is a "Click-to-continue" indicator (ctc). You can adjust it when declare your characters (including narrator).
http://www.renpy.org/wiki/renpy/doc/ref ... /Character

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: Making menu, several aspects not understood...

#5 Post by YiuKorochko »

Alex wrote:"Click-to-continue" indicator (ctc). You can adjust it when declare your characters (including narrator).
Awesome...
Appears that it must be an image file, but it cannot be a predefined animation...

Code: Select all

init:
    image clicktocont:
        "CTC1.png"
        pause renpy.random.random()
        "CTC2.png"
        pause 0.1
        "CTC3.png"
        pause 0.1
        repeat
    if lang == "Japanese":
        # Declare characters used by this game.
        $ mind = Character('気', color="000000", ctc = clicktocont, what_prefix='"', what_suffix='"')
Try to run it and it says that clicktocont isn't defined so I'll have to find a workaround...
Alex wrote:if you post your image someone could say what's wrong with it.
Frame for Sakkaku ni Dasu
Frame for Sakkaku ni Dasu
Attached :D
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: Making menu, several aspects not understood...

#6 Post by YiuKorochko »

YiuKorochko wrote:
frame.png
Attached :D
Now, if you view it in GIMP or Photoshop, you can see that it only has an opacity level of 85, but it appears completely solid while in-game.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

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

Re: Making menu, several aspects not understood...

#7 Post by Jake »

YiuKorochko wrote: Now, if you view it in GIMP or Photoshop, you can see that it only has an opacity level of 85, but it appears completely solid while in-game.
I tried it, and it looks completely solid at first glance. If you don't set a background in a recent version of Ren'Py and get the checkerboard pattern, then you can definitely just about make out the squares behind it, it's just difficult 'cause it's so opaque.

If you want it to be transparent enough that you can easily see stuff through it, you probably need to take the opacity down to something more like 66%, maybe 50%.
Server error: user 'Jake' not found

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

Re: Making menu, several aspects not understood...

#8 Post by PyTom »

I'll note that there was a fix in the pre-release Ren'Py that could be relevant here. (I'm travelling and don't have time to investigate fully, as it only matters if one or both of the frame border sizes is zero.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

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

Re: Making menu, several aspects not understood...

#9 Post by Alex »

Everything is ok, but you'll be laughing or crying - use quotation marks when you tell Ren'Py to use displayables...))
And you trying to use random pause length for your image... I'm afraid it won't work like expected. You declare image at init block and random pause will be settled, but it will be the same each time you use ctc - it will change only when you re-run your game (init block will be executed and new value for pause will be taken).

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: Making menu, several aspects not understood...

#10 Post by YiuKorochko »

Alex wrote:You declare image at init block and random pause will be settled, but it will be the same each time you use ctc - it will change only when you re-run your game (init block will be executed and new value for pause will be taken).
Wow damn...so will I be able to declare all the characters in the start label to get a random value each time...?
Because I do know that people have declared characters with random blinking times...or at least very long loops with random blinks in it :L
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

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

Re: Making menu, several aspects not understood...

#11 Post by Jake »

YiuKorochko wrote: Wow damn...so will I be able to declare all the characters in the start label to get a random value each time...?
Because I do know that people have declared characters with random blinking times...or at least very long loops with random blinks in it :L
It doesn't matter where you declare an image - it will automatically be put into an init block regardless, so that won't change anything.

If you want to have dynamic random choices in your displayables, use the 'choice' statement in ATL. If you declare a sequence of choice statements indented to the same level, Ren'Py will pick one of them at random to display and ignore the others.

If you want to make some choices more likely than others, you can weight the choice statement with a number, like so:

Code: Select all

image sara:
        "sara normal"
        choice 3.0:
            "sara normal"
        choice 1.0:
            "sara normal blink"
        pause 3.0
        repeat
Server error: user 'Jake' not found

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: Making menu, several aspects not understood...

#12 Post by YiuKorochko »

Jake wrote:If you want to have dynamic random choices in your displayables, use the 'choice' statement in ATL. If you declare a sequence of choice statements indented to the same level, Ren'Py will pick one of them at random to display and ignore the others.
Ah I remember reading about that. This seems a lot better, giving much more control as to how long to pause for...
I'll see if this sorts out the ctc image once and for all.
As for the transparency, I'll drop the transparency to 20% of the 85% it's already at and see what happens. If there's no change, I'll make a copy of the project and import it to the 6.11.2 pre-release.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: Making menu, several aspects not understood...

#13 Post by YiuKorochko »

YiuKorochko wrote:I'll see if this sorts out the ctc image once and for all.
Working like a charm~!
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

Post Reply

Who is online

Users browsing this forum: No registered users