I've been wondering about this and it's held me up from actually working on coding the final product of YDSP to some extent. Does the entire game need to be in the same, single script file? By the end, it'll be absolutely enormous if I incorporate every single event and permeation.
Essentially, the way I have it set up is major events, minor events, and extra events.
Minor events happen the same way every playthrough. Major events are your routes, and extra events are connected to said route but less intensive.
After the 4th event on each route, it then breaks up into different types, best, good and bad. Essentially, if your affection points is, for example, X>50, you'd get best. 30<X<50 is good, and X<30 is bad.
What I was wondering is, would it be possible to include the route events themselves in other files and simply call them when they're triggered in the game? YDSP is a little simple in that your only interaction is choosing menus when they're presented to you, and events happen on specific days and specific times. Character X's rank 5 event is always on the fifth Tuesday of the game, for example.
I worry that including every single thing in the same script file would make it run terribly and result in more than a few errors. So, I reiterate:
Do I need to put it all into one file, or can it be separated into tabs and called when it's time for said event to play out?
What I think might work is to have the minor events in the script, since they're the same each time, then each character's route as its own file, and each character's extra events as their own files. Would that work? If not, why not?
Entire script file in one tab? [Solved]
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.
- yon
- Regular
- Posts: 174
- Joined: Tue Sep 09, 2014 5:09 pm
- Projects: YDSP
- Soundcloud: tetra-yon
- itch: v-ual
- Location: United States
- Contact:
Entire script file in one tab? [Solved]
Last edited by yon on Tue Oct 21, 2014 8:16 pm, edited 1 time in total.
-
- Veteran
- Posts: 320
- Joined: Fri Mar 27, 2009 7:36 pm
- Completed: Final Week, CardioQuiz, Cafe Memoria, All I Want for Christmas is a Girlfriend, Dating Sim! Re:Mastered, Dating Sim! Luna's Lovely Summer
- Projects: Memoria (on hiatus), Cafe Memoria Deux (cancelled)
- Organization: PixaelSoft
- itch: thebackup
- Location: Southern CA
- Contact:
Re: Entire script file in one tab?
To put simply, no, you can split the game across scripts. You could have for example:yon wrote:Does the entire game need to be in the same, single script file? By the end, it'll be absolutely enormous if I incorporate every single event and permeation.
script.rpy
Code: Select all
label start:
"blah blah!"
if affection >= 50:
call bestRoute
elif (affection >= 30) or (affection < 50):
call goodRoute
elif affection < 30:
call badRoute
"should return here after the calls"
Code: Select all
label bestRoute:
"the best ending!"
http://www.renpy.org/doc/html/label.html
I hope this is what you're looking for!
-
- Regular
- Posts: 61
- Joined: Sun Sep 07, 2014 8:51 pm
- Contact:
Re: Entire script file in one tab?
@thebackup
Thanks! That helped!
Thanks! That helped!
- Kate
- Regular
- Posts: 197
- Joined: Thu Sep 19, 2013 6:10 pm
- Projects: Blackout
- Organization: Moonlight Otome
- Location: United States
- Contact:
Re: Entire script file in one tab?
Right! It's handy to put separate events or routes in different files! Make sure you add at the end a
That will make sure your game returns back to where you "called" from and then you'll be back in the original file.
Code: Select all
"best ending!"
return
Current Project:
Blackout [VN][Romance][GxB][Mystery][Suspense] http://lemmasoft.renai.us/forums/viewto ... 43&t=34118
"It is the duty of authors to make the fantastic seem ordinary and the ordinary seem fantastic." - K. Auer
Blackout [VN][Romance][GxB][Mystery][Suspense] http://lemmasoft.renai.us/forums/viewto ... 43&t=34118
"It is the duty of authors to make the fantastic seem ordinary and the ordinary seem fantastic." - K. Auer
Re: Entire script file in one tab?
I'm not sure if you necessarily have to put in a return in this sort of situation, but I try to make a habit of ending things with it as a mental indicator.
IIRC a 'called' label you can use return to jump back a label, however using 'jump' will mean using return goes back to the title screen, as it resets the stack of labels. (... actually the documentation thebackup linked mentions this, so there you go.)
IIRC a 'called' label you can use return to jump back a label, however using 'jump' will mean using return goes back to the title screen, as it resets the stack of labels. (... actually the documentation thebackup linked mentions this, so there you go.)
- yon
- Regular
- Posts: 174
- Joined: Tue Sep 09, 2014 5:09 pm
- Projects: YDSP
- Soundcloud: tetra-yon
- itch: v-ual
- Location: United States
- Contact:
Re: Entire script file in one tab?
Ah, thank you! I'm familiar with labels, but I wasn't aware you could put them in other tabs. I appreciate all the replies.
Who is online
Users browsing this forum: decocloud, Google [Bot]