Replay mode

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
Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Replay mode

#1 Post by Gouka » Tue Jul 17, 2007 12:21 am

I have been wondering is there a way to add a "replay mode"? I mean that the player after finishing the game can replay the scenes that they have unlocked without playing the whole game again.
Is it possible?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

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

#2 Post by PyTom » Tue Jul 17, 2007 12:41 am

Sure. The way to do it is thusly.

Code: Select all

init python:
     config.main_menu.insert(2, ("Memories", "memories", "True"))

label memories:
    $ memories_mode = True

    menu:
        "Scene 1" if persistent.unlocked_1:
            jump scene_1

        "Scene 2" if persistent.unlocked_2:
            jump scene_2

label start:
    $ memories_mode = False

    "Outside of a scene."

label scene_1:

    "Inside scene 1."

    "End of scene 1."

    $ persistent.unlocked_1 = True

    if memories_mode:
        jump memories

    "Outside of a scene."

label scene_2:

    "Inside scene 2."

    "End of scene 2."

    $ persistent.unlocked_2 = True

    if memories_mode:
        jump memories

    "Outside of a scene."
This gives you an idea of the basic framework. You can probably improve on the gui by using buttons instead of a menu, but the way to do this is basically this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: Replay mode

#3 Post by Gouka » Tue Jul 17, 2007 1:20 pm

Thanks I'll try this
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot