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.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
I'm trying to create a custom Main Menu in Ren'Py. I've figured out how to program the various elements, but I'm not sure how to combine them all into a Main Menu.
The side menu (Start, Load, Quit, etc).
A slideshow of images of various objects that dissolve from one to another. The player "unlocks" what images appear, by finding different endings. (If/Else switch and ending Flags).
An image with transparency, to show the layer beneath it.
An animated looping pattern.
I'm using Ren'Py's default UI code for the Main Menu and the Side Menu.
image slideshowfade:
"gui/main menu item 1.png" with dissolve
2.0
"gui/main menu item 2.png" with dissolve
2.0
"gui/main menu item 3.png" with dissolve
2.0
repeat
show slideshowfade
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Imperf3kt wrote: ↑Thu Apr 11, 2019 4:06 pm
Just use "add" as if they were regular images.
Place the ones you want in front, nearer the bottom.
Where in Ren'Py's default code for the Main Menu (screens.rpy file) should I insert them? I've tried playing the slideshow code in places like right under the
background "gui/overlay/main_menu.png"
code, but I keep getting "end of line expected" error messages. Ren'Py won't even display the VN at that point.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
image slideshowfade:
"gui/main menu item 1.png" with dissolve
2.0
"gui/main menu item 2.png" with dissolve
2.0
"gui/main menu item 3.png" with dissolve
2.0
repeat
show slideshowfade
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/screens.rpy", line 403: expected a keyword argument or child statement.
"gui/main menu item 1.png" with dissolve
^
Ren'Py Version: Ren'Py 7.2.2.491
Thu Apr 11 20:49:36 2019
File "game/screens.rpy", line 403: expected a keyword argument or child statement.
Might be an indentation error? It says it's expecting a statement after the : for slideshowfade.
My only other thought is if you want it to be the whole page change the add to slideshowfade instead of the image. Add acts as the background so if you put the image call there maybe that will work?
Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
In a screen you don't use show "image" and don't use transitions, those things are used inside the game.
For what you want to do, you first have to define the image outside any label or screen with atl. Your code for that seems right, but better check it if you're not sure.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Matalla wrote: ↑Thu Apr 11, 2019 9:52 pm
In a screen you don't use show "image" and don't use transitions, those things are used inside the game.
For what you want to do, you first have to define the image outside any label or screen with atl. Your code for that seems right, but better check it if you're not sure.
Optionally you can include the position or other parameters directly or applying a transform with "at"
I've now changed show slideshowfade to add slideshowfade , but I still can't figure out where to put the atl block of code. I've tried placing it before the Main Menu screen, but I keep getting a "slideshowfade not defined" error.
Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
Katy133 wrote: ↑Thu Apr 11, 2019 10:21 pm
I've now changed show slideshowfade to add slideshowfade , but I still can't figure out where to put the atl block of code. I've tried placing it before the Main Menu screen, but I keep getting a "slideshowfade not defined" error.
Put it anywhere outside a label or a screen. I'd put it at the start of the script, where you declare variables with default and such things. No indentation.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Matalla wrote: ↑Thu Apr 11, 2019 11:47 pm
Put it anywhere outside a label or a screen. I'd put it at the start of the script, where you declare variables with default and such things. No indentation.
label start:
image slideshowfade:
"gui/main menu item 1.png" with dissolve
2.0
"gui/main menu item 2.png" with dissolve
2.0
"gui/main menu item 3.png" with dissolve
2.0
repeat
But unfortunately, I'm still getting a "'slideshowfade' is not defined" error.
Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
image slideshowfade:
"gui/main menu item 1.png" with dissolve
2.0
"gui/main menu item 2.png" with dissolve
2.0
"gui/main menu item 3.png" with dissolve
2.0
repeat
label start:
"Whatever"
return
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
image slideshowfade:
"gui/main menu item 1.png" with dissolve
2.0
"gui/main menu item 2.png" with dissolve
2.0
"gui/main menu item 3.png" with dissolve
2.0
repeat
label start:
"Whatever"
return
Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
My bad, I never did something like this. What I said would work to put it in a label (with show instead of add). You have to define it as a transform in order to put in the main menu, Same method, though. Outside label or screen, no indentation.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Matalla wrote: ↑Fri Apr 12, 2019 12:11 pm
My bad, I never did something like this. What I said would work to put it in a label (with show instead of add). You have to define it as a transform in order to put in the main menu, Same method, though. Outside label or screen, no indentation.