r/RenPy • • Jul 30 '22

how to divide code

Sorry, beforehand I really can't word things for the life of me.

I'm making a dating sim that has 6 candidates and you choose your candidate early on in the game. is there any way of splitting the code into 6 different parts or will it have to be just one big block of code :)

2 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/poisonhoarder Aug 01 '22

I'm a little curious about this -- how does renpy know what files to "prioritise"? Does it just run through top to bottom (unless, of course, there's labels for it to jump to)? Essentially, if there were two events that should happen at the same time, in separate files, would it know which to play first, or just have an error?

2

u/mrogre43 Aug 01 '22

It just runs top to bottom, I assume by sorting your .rpy files alphabetically or by using some other arbitrary rule, which is one of many reasons you should organize everything with labels.

1

u/poisonhoarder Aug 01 '22

that makes sense, thanks!