How to Make an 'Extra Scene' Gallery?

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
ArizaLuca
Regular
Posts: 118
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen
Tumblr: aa-games
Deviantart: ArizaLuca
itch: arizaluca
Contact:

How to Make an 'Extra Scene' Gallery?

#1 Post by ArizaLuca » Mon Apr 16, 2018 8:34 am

I know there's like image galleries, music rooms, and other things like that, but I want to make a gallery where you can unlock extra scenes, like the ones in Valentine's Otome by Synokoria... does anybody have any idea how to do that? Thanks.

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1950
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to Make an 'Extra Scene' Gallery?

#2 Post by Imperf3kt » Mon Apr 16, 2018 9:21 am

make a screen with links to each 'chapter'

(very basic)example using three different actions:

Code: Select all

screen extras():
    if persistent.end:
        vbox:
            textbutton _("Secret after ending scene 01") action Start("secret_01")
            textbutton _("Secret after ending scene 02") action Jump("secret_02")
            textbutton _("Secret after ending scene 03") action  Call("secret_03")
    else:
        vbox:
            null
            null
            null
# the else bit isn't strictly necessary, but it helps keep formatting if you have other objects styled based on position of other things within the screen.

default persistent.end = False

label start:
    e "This story is kinda short..."
    $ persistent.end = True
    return

label secret_01:
    e "Oh wait, hello again."
    return

label secret_02:
    e "Really, stop with the super short chat."
    return

label secret_03:
    e "Alright, thats it. I'v had enough, no more extra endings for you."
    reurn
    
Don't forget to include a button in your navigation. Something like:

Code: Select all

    textbutton _("Bonus Scenes") action ShowMenu("extras")
    
Or you could make it so the entire screen isn't available until the game is completed:

Code: Select all

    if persistent.end:
        textbutton _("Bonus Scenes") action ShowMenu("extras")
        
If you take this route, I suggest editing this bit:

Code: Select all

screen extras():
    if persistent.end:
        vbox:
            textbutton _("Secret after ending scene 01") action Start("secret_01")
            textbutton _("Secret after ending scene 02") action Jump("secret_02")
            textbutton _("Secret after ending scene 03") action  Call("secret_03")
    else:
        vbox:
            null
            null
            null
            
to this:

Code: Select all

screen extras():
    vbox:
        textbutton _("Secret after ending scene 01") action Start("secret_01")
        textbutton _("Secret after ending scene 02") action Jump("secret_02")
        textbutton _("Secret after ending scene 03") action  Call("secret_03")
            
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

User avatar
ArizaLuca
Regular
Posts: 118
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen
Tumblr: aa-games
Deviantart: ArizaLuca
itch: arizaluca
Contact:

Re: How to Make an 'Extra Scene' Gallery?

#3 Post by ArizaLuca » Mon Apr 16, 2018 6:49 pm

Thank you so much! I'll definitely try it out.

Post Reply

Who is online

Users browsing this forum: No registered users