Splitting plotline into chapters - anyone know how to do it?
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Splitting plotline into chapters - anyone know how to do it?
I'm sure most people here remember Higurashi no Naku Koro ni, which split the story up into various 'chapters', the next of which could only be accessed after playing through the previous. What I'm after for my game is a similar principle.
The plot follows a teacher getting to know each of the students in his (very small) class; what I have planned is to have one chapter focusing on his relationship with each of them, with every subsequent chapter building the plot and his understanding of the class as a whole off of his experience in the previous chapter. It's somewhat crucial to the storyline not to skip around too much, so I don't want every chapter to appear in the 'chapter selection menu' (or however one selects the chapters) right off the bat.
However, I'm a total newbie and I don't even know how to split the thing into chapters in the first place. -.-U
If anyone could give me advice, links to examples, examples of code - anything, I would be eternally grateful. Thank you in advance!
The plot follows a teacher getting to know each of the students in his (very small) class; what I have planned is to have one chapter focusing on his relationship with each of them, with every subsequent chapter building the plot and his understanding of the class as a whole off of his experience in the previous chapter. It's somewhat crucial to the storyline not to skip around too much, so I don't want every chapter to appear in the 'chapter selection menu' (or however one selects the chapters) right off the bat.
However, I'm a total newbie and I don't even know how to split the thing into chapters in the first place. -.-U
If anyone could give me advice, links to examples, examples of code - anything, I would be eternally grateful. Thank you in advance!
Re: Splitting plotline into chapters - anyone know how to do it?
You must decide whether to:
1.) Release each chapter as a standalone game, with subsequent chapters requiring a savefile from a previous one.
OR
2a.) Release several chapters in one game, with the chapter selection directly from the main menu
OR
2b.) Chapter selection from a submenu.
-----------------------
You can start your game off with something like this:
Then later on in the game you can have something like this:
using method 2b.) is easy, since you can use if/else to jump to labels (chapter2, chapter3, etc.)
using method 2a.), refer to this:
http://www.renpy.org/wiki/renpy/doc/ref ... Game_Menus
and where it says 'True', you can substitute it with a boolean such as chapter2_complete, for example, you can add the line:
Please note it's been a while since I've done these things, and some coding implementations have been changed, so my syntax may not be exact.
1.) Release each chapter as a standalone game, with subsequent chapters requiring a savefile from a previous one.
OR
2a.) Release several chapters in one game, with the chapter selection directly from the main menu
OR
2b.) Chapter selection from a submenu.
-----------------------
You can start your game off with something like this:
Code: Select all
$ prologue_complete = False
$ chapter1_complete = False
$ chapter2_complete = False
$ chapter3_complete = False
Code: Select all
$ chapter2_complete = True
#end of chapter 2
#-------Chapter 3-----------------
label chapter3:
if not chapter3_complete:
"I'm sorry, you need to read previous chapters first."
return
else:
"Hi, let's continue with our story, shall we?"
#.....
using method 2a.), refer to this:
http://www.renpy.org/wiki/renpy/doc/ref ... Game_Menus
and where it says 'True', you can substitute it with a boolean such as chapter2_complete, for example, you can add the line:
Code: Select all
(u"Chapter 2", "chapter2", "chapter2_complete"),
-
- Eileen-Class Veteran
- Posts: 1153
- Joined: Mon Jul 07, 2003 4:57 pm
- Completed: Elven Relations, Cloud Fairy, When I Rule The World
- Tumblr: alextfish
- Skype: alextfish
- Location: Cambridge, UK
- Contact:
Re: Splitting plotline into chapters - anyone know how to do it?
You might like to take a look at the kinetic novel Dream Chasers by lordcloudx. That has four chapters and an epilogue: you can player chapters 1 & 2 in either order IIRC, but chapter 3 is only unlocked once you've read both of them, 4 only when you've read 1, 2 and 3, and the epilogue only once you've finished 4. lordcloudx may be able to supply the code to do it.
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!
- 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: Splitting plotline into chapters - anyone know how to do it?
Note that you almost certainly want to use persistent variables, and not reset them to False at the start of every new game. So you'd want to do something like:
At the end of chapter 1, you'd have:
and similarly for chapter 3.
Code: Select all
init python:
config.main_menu.pop(0)
config.main_menu.insert(("Chapter 1", _intra_jumps("chapter_1", "main_game_transition"), "True"))
config.main_menu.insert(("Chapter 2", _intra_jumps("chapter_2", "main_game_transition"), "persistent.chapter_1_complete"))
config.main_menu.insert(("Chapter 3", _intra_jumps("chapter_3", "main_game_transition"), "persistent.chapter_2_complete"))
Code: Select all
"This is the last line of chapter 1."
$ persistent.chapter_1_complete = True
label chapter_2:
scene this
show that
"This is the first line of chapter 2."
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 2
- Joined: Fri Jul 11, 2008 1:01 am
- Projects: Ganbatte!Sensei
- Contact:
Re: Splitting plotline into chapters - anyone know how to do it?
Thanks very much, everyone! I still can't quite get it to run properly, but your advice was all quite helpful; I've gotten the code underway, at least, so I'm sure I'll be able to work it all out soon. ^_^
Thanks again! I really appreciate your responses.
Thanks again! I really appreciate your responses.
Re: Splitting plotline into chapters - anyone know how to do it?
I want to add an epilogue which is only unlocked when the player have played each segment of the chapter, including the bad ending.
How can I do a variable like this, please?
How can I do a variable like this, please?
-
- Regular
- Posts: 67
- Joined: Wed Jul 30, 2008 11:43 am
- Projects: Wanderer
- Location: USA
- Contact:
Re: Splitting plotline into chapters - anyone know how to do it?
I think what you'd want to do there is set a variable for the end of each of them, and then... okay, something kinda like this?kraken wrote:I want to add an epilogue which is only unlocked when the player have played each segment of the chapter, including the bad ending.
How can I do a variable like this, please?
Code: Select all
menu:
"Chapter 1":
jump ch1
"Chapter 2":
jump ch2
"Epilogue" if ch1finish == True & ch2finish == True & badendfinish == True:
jump epilogue
Re: Splitting plotline into chapters - anyone know how to do it?
The problem is that chapter one's completion will reset if you start the game again; the best way is probably to use persistent variables. See here: http://www.renpy.org/wiki/renpy/doc/ref ... stent_Data
Re: Splitting plotline into chapters - anyone know how to do it?
thank you very much, you really help me
Who is online
Users browsing this forum: No registered users