Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
label start:
#this line will execute and show the text: 'something', even though the line where the test90variable is instantiated is in a mid game event.
"[test90variable]"
jump midgameEvent:
label midgameEvent:
#this label is jumped to three hours into the game, but the following variable is instantiated at runtime
default test90variable = "something"
Is there a guide that explains the initialization order of everything?
It is right there in the manual: https://www.renpy.org/doc/html/python.html
In short: init phase happens first, even before main menu is shown. default statements execute right after starting or loading the game if corresponding variable does not exist.