Yes, they are equivalent.
is equal to say:
The obvious difference is that in the first case you told that ALL lines that follow in the block MUST BE python lines. In the second case you can do a mixed thing.
As for referencing.
The moment you launch a game, renpy first scan the whole scripts. Do the init stuff wherever they are, ignoring the rest. They can be splitted between 3000 scripts, if you want for.
MIND THAT also the statements "DEFAULT" and "DEFINE" (and to my knowledge, "TRANSFORM") are registered at this point in time and can be put wherever you want.
Renpy execute the "init" things at any arbitrary order (mostly unpredictable). While this usually is not a problem, sometime you want to have the init define first something that you must use later in other init steps.
For this reason, you can use
init -x:
the lower the X the earlier the following block willbe executed in the init phase.
Code: Select all
init -10:
# bla bla bla
init -20:
# bla bla bla
The second block will be executed before the first.
THEN.
After this 'init' phase, it enter the main menu context. When you exitthe main menu context, it start from the "start" label where it can find it (as for default, you can state differently, but let's begin easily: it go to the start label).
From now onward it proceed line by line. If the ACTUAL script end without jumping somewhere else, renpy cnsider the game ended.
At any point, if you JUMP/CALL another label, you can JUMP/CALL to any label doesn't matter the actual script he does find it.
No need to quote it in advance. Renpy is able to find that label between 10.000 scripts you gave.
Again, it proceed line by line fromthat point onward and if reach the end of that text file and no more lines are there, it consider the game ended.
How things should be organized?
That depend on the lenght of your game.
As common practice, if a given kind of entry occupy big space, you should create a different script.
So, for example, if your game own 3000 characters, probably is quite better to create a new script, name it the way you want, and include here so much definitions.
Mind the logic above: as long as they are 'init' stuff, renpy will find them. If you need a given order, use init -x.
The same goes for labels. If you have a core script that jump back and forth a lot of sublabels, probably is better to write them on other script files. Renpy will be able to JUMP/CALL to wherever they are.
NOTE: the execution ignore screens blocks. That's mean if you're crazy enough you can define screens in the middle of a narration and renpy will ignore the entire block. The same, screens can be defined in whatever and as many scripts you want.