renpy.load module - Ren'Py

documentation index ◦ reference manual ◦ function index

# renpy.load_module

Function: | renpy.load_module | (name):

This loads the Ren'Py module named name. A Ren'Py module consists of Ren'Py code that is loaded into the usual (store) namespace, contained in a file named name.rpym or name.rpymc. If a .rpym file exists, and is newer than the corresponding .rpymc file, it is loaded and a new .rpymc file is created.

All init code in the module is run before this function returns. An error is raised if the module name cannot be found, or is ambiguous.

Module loading may only occur from inside an init block.

    init python:
        if language == "czech":
             renpy.load_module("czech")
        elif language == "japanese":
             renpy.load_module("japanese")
        else:
             renpy.load_module("english")

documentation index ◦ reference manual ◦ function index