Please Help Me :(( (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.
Message
Author
User avatar
vocaloidimai
Regular
Posts: 26
Joined: Sat May 05, 2012 10:38 am
Contact:

Re: Please Help Me :((

#16 Post by vocaloidimai »

Alex wrote:To change the mouse cursor you need to play with <config.mouse>.

Code: Select all

init:
    $ config.mouse = { "default" : [ ("cur1.png", 5, 7), ("cur2.png", 5, 7) ]  }
http://www.renpy.org/doc/html/config.ht ... nfig.mouse

And there you can read a great tutorial on how to customize menus - http://lemmasoft.renai.us/forums/viewforum.php?f=51
Thank You ^^
How to add icon game after the game is finish ? ^^!
A - Can you help me how to make Load and Save like this picture ? o_O ?
Image

tuna_sushi
Veteran
Posts: 299
Joined: Thu Jul 07, 2011 9:33 am
Projects: BloomingBlossoms
Contact:

Re: Please Help Me :((

#17 Post by tuna_sushi »

That image looks familiar... Oh yeah!- *remembers that thread*
You should read the whole thread, but this post is what you're looking for.

User avatar
vocaloidimai
Regular
Posts: 26
Joined: Sat May 05, 2012 10:38 am
Contact:

Re: Please Help Me :((

#18 Post by vocaloidimai »

tuna_sushi wrote:That image looks familiar... Oh yeah!- *remembers that thread*
You should read the whole thread, but this post is what you're looking for.
Is working but i have a problem with this :(
Image

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

Re: Please Help Me :((

#19 Post by Alex »

Hm, odd looking...
Couldn't you build a distribution of this project to let people find out what's wrong?

User avatar
vocaloidimai
Regular
Posts: 26
Joined: Sat May 05, 2012 10:38 am
Contact:

Re: Please Help Me :((

#20 Post by vocaloidimai »

Alex wrote:Hm, odd looking...
Couldn't you build a distribution of this project to let people find out what's wrong?
I don't understand :((
Image

User avatar
vocaloidimai
Regular
Posts: 26
Joined: Sat May 05, 2012 10:38 am
Contact:

Re: Please Help Me :((

#21 Post by vocaloidimai »

Please Help Me ? :(

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

Re: Please Help Me :((

#22 Post by Alex »

You need to add a margin for file picker frame

Code: Select all

init -2 python:
    layout.scrolling_load_save()
    style.file_picker_frame = Style(style.menu_frame)
    style.file_picker_frame.right_margin = 400

User avatar
vocaloidimai
Regular
Posts: 26
Joined: Sat May 05, 2012 10:38 am
Contact:

Re: Please Help Me :((

#23 Post by vocaloidimai »

Alex wrote:You need to add a margin for file picker frame

Code: Select all

init -2 python:
    layout.scrolling_load_save()
    style.file_picker_frame = Style(style.menu_frame)
    style.file_picker_frame.right_margin = 400
Thank You Very Much ^^
Can you help me ?
How to custom theme Music Room ?
Custom menu Music Room like this Video ^^!
http://www.youtube.com/watch?v=knnYtLYSMNk

How to make Menu start game Center like this picture ? ^^!
(1) ~> (2)
Image

I'm forget about this o_O
What happens after i change Menu with that o_O
Can you help me after i change Menu on Picture (2)
Menu loads still like that picture (3) ?
Menu Picture (2) just for Open Start Game ^^!
Image

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

Re: Please Help Me :((

#24 Post by Alex »

2) Open "screens.rpy" and find "screen main_menu:", then change the position of main menu frame

Code: Select all

# The main menu buttons.
    frame:
        style_group "mm"
        xalign .5
        yalign .8
1) Mmm, it is a bit complicated. Here is the code for music room - http://www.renpy.org/doc/html/rooms.html#music-room
You can freely customize "screen music_room:" the way you need. So, the code might look like

Code: Select all

init python:

    # Step 1. Create a MusicRoom instance.
    mr = MusicRoom(fadeout=1.0)

    # Step 2. Add music files.
    mr.add("track1.ogg", always_unlocked=True)
    mr.add("track2.ogg")
    mr.add("track3.ogg")
    mr.add("track4.ogg")
    mr.add("track5.ogg")
    mr.add("track6.ogg")


# Step 3. Create the music room screen.
screen music_room:

    tag menu
    
    
    add Solid("#fff") # or add "my_music_room_bg.png"

    vbox:
        xalign 0.1 yalign 0.1 
        
        hbox:
            vbox:
                xminimum 250 xmaximum 250
                yminimum 70 ymaximum 70
                frame:
                    bar value Preference("music volume") xalign 0.0 yalign 0.1    # copy/pasted from screens.rpy
                    text "VOLUME" size 10 xalign 1.0 yalign 1.0
                    
            null width 5
            
            # Buttons that let us advance tracks.
            textbutton "Previous" action mr.Previous()
            textbutton "Play" action mr.Play()
            textbutton "Stop" action mr.Stop()
            textbutton "Next" action mr.Next()
            
        null height 10

        grid 3 2:
        
            # The buttons that play each track.
            # First row
            textbutton "Track 1" action mr.Play("track1.ogg")
            textbutton "Track 2" action mr.Play("track2.ogg")
            textbutton "Track 3" action mr.Play("track3.ogg")
            
            # Second row
            textbutton "Track 4" action mr.Play("track4.ogg")
            textbutton "Track 5" action mr.Play("track5.ogg")
            textbutton "Track 6" action mr.Play("track6.ogg")

        null height 10


        # The button that lets the user exit the music room.
        textbutton "Main Menu" action ShowMenu("main_menu")

    # Start the music playing on entry to the music room.
    on "replace" action mr.Play()

    # Restore the main menu music upon leaving.
    on "replaced" action Play("music", "track1.ogg")
(put this code to any rpy-file of your project)

Then add "music room" button to main menu (edit "screen main_menu:")

Code: Select all

        textbutton _("Start Game") action Start()
        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Help") action Help()
        textbutton _("Music Room") action ShowMenu("music_room")
        textbutton _("Quit") action Quit(confirm=False)
http://www.renpy.org/doc/html/screens.html#hbox
http://www.renpy.org/doc/html/screens.html#vbox
http://www.renpy.org/doc/html/screens.html#frame

User avatar
vocaloidimai
Regular
Posts: 26
Joined: Sat May 05, 2012 10:38 am
Contact:

Re: Please Help Me :((

#25 Post by vocaloidimai »

Alex wrote:2) Open "screens.rpy" and find "screen main_menu:", then change the position of main menu frame

Code: Select all

# The main menu buttons.
    frame:
        style_group "mm"
        xalign .5
        yalign .8
1) Mmm, it is a bit complicated. Here is the code for music room - http://www.renpy.org/doc/html/rooms.html#music-room
You can freely customize "screen music_room:" the way you need. So, the code might look like

Code: Select all

init python:

    # Step 1. Create a MusicRoom instance.
    mr = MusicRoom(fadeout=1.0)

    # Step 2. Add music files.
    mr.add("track1.ogg", always_unlocked=True)
    mr.add("track2.ogg")
    mr.add("track3.ogg")
    mr.add("track4.ogg")
    mr.add("track5.ogg")
    mr.add("track6.ogg")


# Step 3. Create the music room screen.
screen music_room:

    tag menu
    
    
    add Solid("#fff") # or add "my_music_room_bg.png"

    vbox:
        xalign 0.1 yalign 0.1 
        
        hbox:
            vbox:
                xminimum 250 xmaximum 250
                yminimum 70 ymaximum 70
                frame:
                    bar value Preference("music volume") xalign 0.0 yalign 0.1    # copy/pasted from screens.rpy
                    text "VOLUME" size 10 xalign 1.0 yalign 1.0
                    
            null width 5
            
            # Buttons that let us advance tracks.
            textbutton "Previous" action mr.Previous()
            textbutton "Play" action mr.Play()
            textbutton "Stop" action mr.Stop()
            textbutton "Next" action mr.Next()
            
        null height 10

        grid 3 2:
        
            # The buttons that play each track.
            # First row
            textbutton "Track 1" action mr.Play("track1.ogg")
            textbutton "Track 2" action mr.Play("track2.ogg")
            textbutton "Track 3" action mr.Play("track3.ogg")
            
            # Second row
            textbutton "Track 4" action mr.Play("track4.ogg")
            textbutton "Track 5" action mr.Play("track5.ogg")
            textbutton "Track 6" action mr.Play("track6.ogg")

        null height 10


        # The button that lets the user exit the music room.
        textbutton "Main Menu" action ShowMenu("main_menu")

    # Start the music playing on entry to the music room.
    on "replace" action mr.Play()

    # Restore the main menu music upon leaving.
    on "replaced" action Play("music", "track1.ogg")
(put this code to any rpy-file of your project)

Then add "music room" button to main menu (edit "screen main_menu:")

Code: Select all

        textbutton _("Start Game") action Start()
        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Help") action Help()
        textbutton _("Music Room") action ShowMenu("music_room")
        textbutton _("Quit") action Quit(confirm=False)
http://www.renpy.org/doc/html/screens.html#hbox
http://www.renpy.org/doc/html/screens.html#vbox
http://www.renpy.org/doc/html/screens.html#frame
Thanks You ^^
But how i can add image button Play, Next,.ect.....?
& show title music when i click to play ?

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

Re: Please Help Me :((

#26 Post by Alex »

But how i can add image button Play, Next,.ect.....?
That's not so hard - http://www.renpy.org/doc/html/screens.html#imagebutton

Code: Select all

imagebutton:
    idle "idle_next_button.png"
    hover "hover_next_button.png"
    selected_idle "hover_next_button.png"  # or different image
    selected_hover "hover_next_button.png" # or different image
    action mr.Next()
& show title music when i click to play ?
That's not a default feature, as far as I know (but, I might be wrong). So, you have two options:
1. rewrite musicroom class to add this
2a. do not use it
2b. do it like

Code: Select all

screen music_room:

    tag menu
    
    default track_name = "tr_1"  # name of first "always unlocked" track that will play automatically when player enters musicroom
    add Solid("#fff") # or add "my_music_room_bg.png"

    vbox:
        xalign 0.1 yalign 0.1 
        vbox:
                xminimum 250 xmaximum 250
                yminimum 70 ymaximum 70
                frame:
                    text "[track_name]" xalign 0.0 yalign 0.1
                    text "TRACK NAME" size 10 xalign 1.0 yalign 1.0
                    
        null width 5
        
        hbox:
            vbox:
                xminimum 250 xmaximum 250
                yminimum 70 ymaximum 70
                frame:
                    bar value Preference("music volume") xalign 0.0 yalign 0.1    # copy/pasted from screens.rpy
                    text "VOLUME" size 10 xalign 1.0 yalign 1.0

... ... ...

            textbutton "Track 1" action [mr.Play("track1.ogg"), SetScreenVariable("track_name", "tr_1")]
            textbutton "Track 2" action [mr.Play("track2.ogg"),SetScreenVariable("track_name", "tr_2")]
            textbutton "Track 3" action [mr.Play("track3.ogg"), SetScreenVariable("track_name", "tr_3")]
and you should avoid of using "next" and "previouse" buttons, 'cause they will change the track, but not change the track name to display - player must click each track button to change the track.

User avatar
Michiyo6918
Veteran
Posts: 262
Joined: Fri Nov 11, 2011 12:26 am
Projects: ╮(╯▽╰)╭
Location: Look behind you
Contact:

Re: Scrolling load/save

#27 Post by Michiyo6918 »

Sorry for disturbing but...

@Alex: Excuse me but can I ask you something?

I do exactly what you told us and successfully got the scrolling load/save effect but this happen:

Image

How can I move the screen and the menu bar to the right size? My game's resolution is 1280x720
Tumblr | DA | Honest Critique
“如果那个人是神。
他想渎神。
——【黑匣子】”

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

Re: Please Help Me :((

#28 Post by Alex »

The list of "things" you could adjust in save/load layout (taken from "\renpy-6.13.0\common\_layout\scrolling_load_save.rpym"):

Code: Select all

    # The number of normal save slots.
    config.load_save_slots = 50

    # The number of autosave slots.
    config.load_save_auto_slots = 5

    # The number of quicksave slots.
    config.load_save_quick_slots = 5

    # How we format time in a file entry.
    config.time_format = "%b %d, %H:%M"

    # How we format a file entry.
    config.file_entry_format = "%(time)s\n%(save_name)s"

    # Set the default size of thumbnails.
    config.thumbnail_width = 320
    config.thumbnail_height = 240

    # The default empty slot thumbnail.
    config.load_save_empty_thumbnail = None
    
    # Styles.
    style.file_picker_frame = Style(style.frame, help="frame containing the file picker")
    style.file_picker_side = Style(style.default, help="ui.side containing the file picker and the scrollbars")
    style.file_picker_viewport = Style(style.viewport, help="viewport containing the file picker entries")
    style.file_picker_box = Style(style.vbox, help="box containing the file picker entries")
    style.file_picker_entry = Style(style.large_button, help="the buttons containing information about each file")
    style.file_picker_text = Style(style.large_button_text, help="the text inside a file picker entry.")
    style.file_picker_scrollbar = Style(style.vscrollbar, help="the text inside a file picker entry.")

    style.thumbnail_frame = Style(style.frame, help="the style of the frame containing a thumbnail")


    # Position things correctly.
    style.file_picker_frame.xmaximum = 0.5
    style.file_picker_frame.xmargin = 6
    style.file_picker_frame.ymargin = 6
    style.file_picker_frame.yfill = True
    
    style.file_picker_entry.xfill = True
    style.file_picker_entry.yminimum = 58
    
    style.thumbnail_frame.ymargin = 6
    style.thumbnail_frame.xpos = 0.75
    style.thumbnail_frame.xanchor = 0.5
So, you need to add this line to "init -2:" block (do not change "scrolling_load_save.rpym" itself)

Code: Select all

style.thumbnail_frame.xpos = 0.95  # or any value that will fit better
Menu bar is "navigation" (screen-based or layout-based one).
1. in "screens.rpy"

Code: Select all

screen navigation:

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    frame:
        style_group "gm_nav"
        xalign .98                                     # <======== you can change its position
        yalign .98
2. Change the style of navigation frame - add this line to "init -2:" block

Code: Select all

style.gm_nav_frame.xpos = 5.0/6.0    # < ==== change the value

Post Reply

Who is online

Users browsing this forum: Google [Bot], Ocelot