documentation index ◦ reference manual ◦ function index

# NVL Mode

NVL mode is a mode in which Ren'Py shows more than one line of dialogue on the screen at once. This is used to better emulate the Japanese visual novel format, whereas the default settings of Ren'Py emulate the Japanese adventure format.

To use NVL-mode, one must declare Characters with a kind of `nvl`, or with a kind that has a kind of `nvl`. For example:

The narrator can also be made an NVLCharacter, by setting the narrator variable to an NVLCharacter with the name of None.

    init:
        $ e = Character("Eileen", color="#c8ffc8", kind=nvl)
        $ narrator = NVLCharacter(None, kind=nvl)

When dialogue is spoken with an NVL-mode Character, it is added to the end of a buffer, and then the entire contents of that buffer are shown to the user. The buffer can be cleared using the `nvl clear` statement. It should be cleared before the first use.

    nvl clear

    e "This is the first line of the first screen."

    e "This is the second line of the first screen."

    nvl clear

    e "This is the first line of the second screen."

    e "This is the second line of the second screen."

The `nvl show` transition statement causes a transition to occur from the previous screen to a screen with the buffer shown. The `nvl hide` transition statement causes a transition to occur from a screen with the buffer shown to a screen without the buffer shown.

Menus. The `nvl_menu` function shows a menu in NVL-mode. To use it, it should be assigned to `menu` in an init block, using code like:

    init:
        $ menu = nvl_menu

As nvl-mode menus are shown without being added to the buffer, we suggest clearing the buffer (using `nvl clear`) immediately after each menu.

### Functions

For each of the nvl-mode statements, there is an equivalent python function. There is also a function with no statement equivalent.

Function: | nvl_clear | ():

Equivalent to `nvl clear`.

Function: | nvl_hide | (transition):

Equivalent to `nvl hide` transition.

Function: | nvl_show | (transition):

Equivalent to `nvl show` transition.

Function: | nvl_erase | ():

Calling this function erases the bottom line on the NVL-mode screen. If there are no lines on the NVL-mode screen, does nothing. This can be used to replace the bottom line with something else, or to re-show it with different text.

### Variables

Variable: | config.nvl_page_ctc | = None

If not None, this is expected to be a displayable that gives a click-to-continue indicator that is to be used when the current line of NVL-mode dialogue is followed by a `nvl clear` statement.

Variable: | config.nvl_page_ctc_position | = "nestled"

Gives the position of the click-to-continue indicator when when config.nvl_page_ctc is used. See the ctc_position argument to Character for legal values.

Variable: | config.nvl_paged_rollback | = False

When true, changes the rollback mechanism to display entire pages of rollback at a time. For this to work, page-ends need to be predictable, which generally means nvl clear statements should immediately follow nvl-mode dialogue. (As opposed to occuring only after a page has finished.) This doesn't work well when mixing ADV and NVL modes, as the idea of a page isn't well-defined in that case.

documentation index ◦ reference manual ◦ function index