Adding a prologue

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:

Adding a prologue

#1 Post by Gouka »

I have played the VN of Fate/Stay Night and Tsukihime and both have a prologue that starts before the main game. Is this possible with Ren'py?
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

Taralen
Newbie
Posts: 6
Joined: Thu Jul 19, 2007 12:58 pm
Contact:

Re: Adding a prologue

#2 Post by Taralen »

Yes. It's possible.
A good way is putting it in NVL mode.

Doomfest
Regular
Posts: 179
Joined: Thu Jul 19, 2007 7:29 am
Completed: Memo, Juniper's Knot
Projects: Cradle Song, Dysfunctional Systems
Organization: dischan, Medical Whiskey
Location: Miami
Contact:

Re: Adding a prologue

#3 Post by Doomfest »

Isn't there a second way? Like, (Yes, I know, NVL allows for a background heh.
scene black
with fade

or something?

I assume the prologue would be put at the beginning of label start:? Or are you talking about before the main menu? If it's the former, better ask pyton :P
Dysfunctional Systems
Juniper's Knot
Cradle Song, a visual novel in development
Memo, a visual novel

[02:49] <Komi> How is Dysfunctional Systems coming along?
[02:52] <Doomfest> have you seen prince of egypt
[02:53] <Doomfest> do you remember that scene with the storm of bugs
[02:54] <Komi> I know what you are talking about, but I can't remember the scene.
[02:54] <Doomfest> that is what it feels like
[02:55] <Komi> Personality conflicts on the team, I take it?
[02:56] <Doomfest> no
[02:56] <Doomfest> just bugs
[02:56] <Doomfest> storm of bugs

Ren

Re: Adding a prologue

#4 Post by Ren »

Isn't it a bit like what they did with Cellphone letter?There are notes that you can read only AFTER you played the game, it's reversed but it's similar...I think?

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Adding a prologue

#5 Post by monele »

I'm pretty sure it's possible. I've wanted to have such a "pre-menu prologue" for some time but never had the right game for it ^^;...

Anyway, I think the trick is to use the splashscreen label. It displays right when you start the game and once it's over, it goes to the main menu. Now, instead of just putting a "made by someone" message in there, put your whole prologue... or maybe better :

Code: Select all

label splashscreen:
    "Made by someone"
    
    if persistent.seenprologue:
        return  # goes to main menu, like a regular splashscreen
    else:
        jump prologue
    
    
label prologue:
    "This is a prologue"
    
    # ...
    
    "We've reached the end of the prologue"
    # Let's save that fact
    $ persistent.seenprologue = True
    
    return  # goes to main menu

label start:
    "This is the real beginning of the game."
    
    # ...
I just wonder how that would work with saving... Like... if you play straight through the prologue, I'm sure the "return" statement will go back to the main menu... but I'm less sure this will happen if you save and reload during the prologue.

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: Adding a prologue

#6 Post by PyTom »

Actually, the real problem is that you can't save during a splashscreen. If you fix that, by writing:

Code: Select all

$ _game_menu_screen = "_save_screen"
Then it will work properly.
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Adding a prologue

#7 Post by monele »

So we temporarily define the right click menu as the save menu and we're good eh?... or actually, it's not temporary... but we define it earlier than it's usually done (by Ren'Py), right?

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: Adding a prologue

#8 Post by PyTom »

Basically right. What happens is that it's first defined in an init block, then the splashscreen code changes it, then it gets changed back when the splashscreen is done.
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Adding a prologue

#9 Post by monele »

And what does the splashscreen change it too ?... a value that says "no saving" ?

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: Adding a prologue

#10 Post by PyTom »

Yes, that value is None.
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Adding a prologue

#11 Post by monele »

Cool ^.^... learning new stuff everyday :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]