Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Fri May 24, 2013 5:24 pm

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Mar 27, 2012 12:15 am 
Newbie

Joined: Tue Mar 27, 2012 12:00 am
Posts: 6
I'm currently making a kinetic novel with Ren'Py. I want to add a table of contents to my game, but I'm not sure how. I want to divide the novel into chapters, and give players the ability to go to a certain chapter by clicking a link in a Table of Contents. I haven't found anything relevant to answer my question so far, and could really use some help. I would like to know how to do it, or if it's even possible.

I also want to add an intro to my game, which I would like to play before the main menu comes up. I want the player to have the option of skipping the intro, too. I know what video formats Ren'Py supports. Is this possible, or do I just have to play it after the menu?


Top
 Profile Send private message  
 
PostPosted: Tue Mar 27, 2012 1:43 am 
Miko-Class Veteran
User avatar

Joined: Thu May 14, 2009 8:15 pm
Posts: 585
Projects: Castle of Arhannia
to make a table of contents, just make a menu that uses the chapters as options, then have each one just to the first label of each chapter.

as for the intro, you want it to be a video right? just make a label called splash_screen and have it play the video.


Top
 Profile Send private message  
 
PostPosted: Tue Mar 27, 2012 10:11 am 
Newbie

Joined: Tue Mar 27, 2012 12:00 am
Posts: 6
Thank you for showing me the splash screen! The only problem I'm having is that it will only play the first time I open the project, so I can't watch it to see if I need to change anything. Is there a way to make it play whenever it opens, or add the option of watching it again somewhere?

Also, how do I make chapters and add them to a menu? I'm sorry if this is supposed to be easy-level stuff, I've just recently started using the program and trying to get the hang of it. :?


Top
 Profile Send private message  
 
PostPosted: Tue Mar 27, 2012 10:58 am 
Veteran
User avatar

Joined: Tue Aug 12, 2008 12:02 pm
Posts: 356
Location: The treacherous Brazilian Rainforest
Projects: Valentine Square (writer) Spiral Destiny (programmer)
You can use labels to organize your story in chapters. With these, you can create a menu that jumps to the chapter the player chooses:
Code:
label chapter1:
    "..."
label chapter2:
    "..."
label chapter3:
    "..."
label epilogue:
    "..."
   return #go back to the main menu

label toc:
    #to do: add a nice background with "show"
    hide window
    menu:
        "Chapter 1 - Beginning":
            jump chapter1
        "Chapter 2 - Middle":
            jump chapter2
        "Chapter 3 - End":
            jump chapter3
        "Epilogue":
            jump epilogue
    return


Then you have to edit your screens.rpy to add a new button to the main menu. Find the following lines:
Code:
        textbutton _("Start Game") action Start()
        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Help") action Help()
        textbutton _("Quit") action Quit(confirm=False)

And add the following:
Code:
        textbutton _("Chapters") action Start("toc")

_________________
Keep your script in your Dropbox folder.
It allows you to share files with your team, keeps backups of previous versions, and is ridiculously easy to use.


Top
 Profile Send private message  
 
PostPosted: Tue Mar 27, 2012 1:54 pm 
Newbie

Joined: Tue Mar 27, 2012 12:00 am
Posts: 6
Where do I add the menu code? I added the menu button, but I don't know how to add a menu for it to go to. Please help! :!:


Top
 Profile Send private message  
 
PostPosted: Tue Mar 27, 2012 2:06 pm 
Veteran
User avatar

Joined: Tue Aug 12, 2008 12:02 pm
Posts: 356
Location: The treacherous Brazilian Rainforest
Projects: Valentine Square (writer) Spiral Destiny (programmer)
It would be like a regular part of your script.rpy, right after the end, just like in the code. The idea is having a "special chapter" named "toc", with a menu that links to all the other chapters.

_________________
Keep your script in your Dropbox folder.
It allows you to share files with your team, keeps backups of previous versions, and is ridiculously easy to use.


Top
 Profile Send private message  
 
PostPosted: Thu Mar 29, 2012 12:04 pm 
Newbie

Joined: Tue Mar 27, 2012 12:00 am
Posts: 6
Thanks for all the help! :D


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group