Has anyone ever delved with making different script.py for each game section? Here's my question in full.
When you go to the title screen, you are only presented ONE new game, right? The ones that goes to script.py right after selecting it. I was wondering if there is a way you can make different new game options and change each option to script2.py, script3.py so that way, you can categorize the routes or story sections you really want.
Or is this even possible in Renpy?
Thanks in advance!
Different Game Sections that can be chosen on title screen
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.
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.
-
- Newbie
- Posts: 7
- Joined: Fri Mar 09, 2018 12:58 am
- Contact:
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Different Game Sections that can be chosen on title screen
The game I'm working on now I'm splitting up in different scripts. This is only for me to be able to orient between different parts of the script with less problem. As far as I understand it does not matter for the game itself if the script is in one document or in a number of documents.renpycoder wrote: ↑Sun Jul 22, 2018 10:06 am Has anyone ever delved with making different script.py for each game section? Here's my question in full.
When you go to the title screen, you are only presented ONE new game, right? The ones that goes to script.py right after selecting it. I was wondering if there is a way you can make different new game options and change each option to script2.py, script3.py so that way, you can categorize the routes or story sections you really want.
Or is this even possible in Renpy?
Thanks in advance!
The game will not start with script.rpy. It will, as - I understand it - start with gui, screens and options before the main page can be shown. From the start button on the main page the game will go looking for 'label start' in whatever script it is placed.
One thing you easily could do is to show a screen directly after 'label start' with buttons that can make the game jump to the different places in your script - marked with labels - that are options you want to give the player. The game will find the label even if it is in a different document.
I'm not sure if this covers what you want to do.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Different Game Sections that can be chosen on title screen
You can name your files whatever you want (except a few small exceptions such as anything starting with 00)
What you should do, to achieve what you want is use labels and start action.
example:
Then you simply need the labels "story1", "story2" and "story3". It doesn't matter where you put them, and its perfectly fine to put each in its own file. Just make sure they have a return at the end of them:
Note: I can't remember if it is start() or Start()
What you should do, to achieve what you want is use labels and start action.
example:
Code: Select all
screen crappy_screen():
textbutton "start story one" action start("story1")
textbutton "start story two" action start("story2")
textbutton "start story three" action start("story3")
Code: Select all
label story1:
"This story sucks."
"Don't blame me, its 3AM."
return
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- xavimat
- Eileen-Class Veteran
- Posts: 1461
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Discord: xavimat
- Contact:
Re: Different Game Sections that can be chosen on title screen
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Re: Different Game Sections that can be chosen on title screen
And if you want to make those changes to the title screen itself you have to find the main_menu screen in the screens.py file, to add the suggested lines.
Phoenix Star - Persistence, perseverance, ambition.
...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Deviant Art: ...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Discord: saltome
Itch: Phoenix Start
Who is online
Users browsing this forum: AWizardWithWords