documentation indexreference manualfunction index

renpy.full_restart

Function: renpy.full_restart (transition=config.end_game_transition, label="_invoke_main_menu", target="_main_menu"):

This causes a full restart of Ren'Py. This resets the state of Ren'Py to what it was when the init blocks finished running, and then restarts the game. After some init code runs, transition will be set to run on the next interaction, and control will be transferred to label. The default label initializes the main menu context, and then invokes target. target can be a screen, like "preferences_screen" or "load_screen".

It generally doesn't make sense to specify both label and target. (changed in 6.9.0)

Example

'The author would like to thank everyone who makes original
 English-language bishoujo games, and the people on the Lemmasoft forums
 who encouraged him.'

"We can't wait to see what you do with this. Good luck!"

$ minutes, seconds = divmod(int(renpy.get_game_runtime()), 60)
"It took you %(minutes)d minutes and %(seconds)d seconds to
 finish this demo."

$ renpy.full_restart()



documentation indexreference manualfunction index