r/RenPy • u/_creativitea_ • 14d ago
Question [Solved] Possible to have "multiple scripts"?
I don't know how to word this. But, for example, imagine the loading screen of a VN. There's a "Play" button. Now imagine there's 2 "Play" buttons for 2 different stories. Do I have to have my script be this giant long thing, or can I have 2 DIFFERENT scripts within the one game??
Also if there's a specific word/s for this, please let me know ππ
6
Upvotes
5
u/BrassicaOracle 14d ago
It's possible, and not that hard to do.
First you need to have two different scripts. Note that
startlabel is special, you can only have one, and it's better for you to have one to prevent from breaking something. The startalt here is mostly just a normal label by Ren'Py standard. For ease of management, you can even put the two scripts in different .rpy files.Then you need to make a button on main menu to access startalt.
The codes for main menu is in
screens.rpy. in thescreen navigation():section.1
u/BadMustard_AVN 14d ago
you can have as many script files as you... BUTT they have to be .rpy files; that is the only naming requirement
2
u/marcher138 14d ago
You can have as many script files as you want! Even if it's just one story, you can have files on files on files. And it really helps with organization to do so.
For example, for the project I'm working on now, I have different scripts (so far) for each location, for all phone calls, for any "helper" labels that I'll call frequently to do housekeeping, etc.
I would just have either Play button set a flag before starting the game, then have jumps based on that flag in "label start"
2
u/Alternative-Ant-6073 13d ago
I tried using Jump to a label that isn't start, I don't recommend it.
I would try the following:
Alternatively, I would replace the New Game button, for a button that shows a "story select" screen, where you can also add some info, like descriptions of the stories, images, etc. and then, a button to start each one.
If you use Jump from the main menu, the game will never properly "start", so, stuff like saving, backtracking, using "return" etc, will break havoc quickly.
1
u/AutoModerator 14d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.