Problem with NVL mode

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.
Post Reply
Message
Author
User avatar
Ran08
Miko-Class Veteran
Posts: 737
Joined: Tue Jun 12, 2012 1:17 am
Completed: https://ran.itch.io/
Projects: Fate's Cafe
Tumblr: otometwist
Skype: @otomeran
itch: ran
Location: Manila
Contact:

Problem with NVL mode

#1 Post by Ran08 »

Hi everyone! I've been trying to get NVL mode to work, but it still doesn't show up correctly no matter what I do.

To call the narrator, I use this:

Code: Select all

define nn = Character(None, kind=nvl)
And it looks like this in the script:

Code: Select all

nn "Test script"
nn "Test"
nn "Again, test"
However, it always shows up like this:
nvl screenshot.png
I've already tried tweaking some of the values here but I don't want to tweak too much because it might stop working completely, haha. The GUI programmer said that he can't provide support for this part, so asking here is pretty much my last resort. Sorry for the disturbance and thank you so much in advance! <3

This is the code that we use:

Code: Select all

screen nvl(dialogue, items=None):

    window:
        style "nvl_window"

        has vbox:
            spacing gui.nvl_spacing

        ## Displays dialogue in either a vpgrid or the vbox.
        if gui.nvl_height:

            vpgrid:
                cols 1
                yinitial 1.0

                use nvl_dialogue(dialogue)

        else:

            use nvl_dialogue(dialogue)

        for i in items:

            textbutton i.caption:
                action i.action
                style "nvl_button"

    add SideImage() xalign 0.0 yalign 1.0


screen nvl_dialogue(dialogue):
        for d in dialogue:

            window:
                id d.window_id

                fixed:
                    yfit gui.nvl_height is None

                    if d.who is not None:

                        text d.who:
                            id d.who_id

                    text d.what:
                        id d.what_id


define config.nvl_list_length = 6

style nvl_window is default
style nvl_entry is default

style nvl_label is say_label
style nvl_dialogue is say_dialogue

style nvl_button is button
style nvl_button_text is button_text

style nvl_window:
    xfill True
    yfill True

    background "gui/nvl.png"
    xpadding 100
    ypadding 100
    #padding gui.nvl_borders.padding

style nvl_entry:
    xfill True
    ysize gui.nvl_height

style nvl_label:
    xpos gui.nvl_name_xpos
    xanchor gui.nvl_name_xalign
    ypos gui.nvl_name_ypos
    yanchor 0.0
    xsize gui.nvl_name_width
    min_width gui.nvl_name_width
    text_align gui.nvl_name_xalign

style nvl_dialogue:
    xpos gui.nvl_text_xpos
    xanchor gui.nvl_text_xalign
    ypos gui.nvl_text_ypos
    xsize gui.nvl_text_width
    min_width gui.nvl_text_width
    text_align gui.nvl_text_xalign
    layout ("subtitle" if gui.nvl_text_xalign else "tex")

style nvl_thought:
    xpos gui.nvl_thought_xpos
    xanchor gui.nvl_thought_xalign
    ypos gui.nvl_thought_ypos
    xsize gui.nvl_thought_width
    min_width gui.nvl_thought_width
    text_align gui.nvl_thought_xalign
    layout ("subtitle" if gui.nvl_text_xalign else "tex")

style nvl_button:
    properties gui.button_properties("nvl_button")
    xpos gui.nvl_button_xpos
    xanchor gui.nvl_button_xalign

style nvl_button_text:
    properties gui.button_text_properties("nvl_button")

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Problem with NVL mode

#2 Post by Divona »

First, try remove the custom x and y padding from the style.

Code: Select all

style nvl_window:
    xfill True
    yfill True

    background "gui/nvl.png"
    #xpadding 100
    #ypadding 100
    padding gui.nvl_borders.padding
Second, the size and position of each NVL line are in "gui.rpy" under "NVL-Mode". Could you post that part of the code here as well?
Completed:
Image

User avatar
Ran08
Miko-Class Veteran
Posts: 737
Joined: Tue Jun 12, 2012 1:17 am
Completed: https://ran.itch.io/
Projects: Fate's Cafe
Tumblr: otometwist
Skype: @otomeran
itch: ran
Location: Manila
Contact:

Re: Problem with NVL mode

#3 Post by Ran08 »

Thank you so much for replying! :(

Code: Select all

## NVL-Mode ####################################################################

define gui.nvl_borders = Borders(0, 10, 0, 20)

define gui.nvl_height = 115

define gui.nvl_spacing = 10

define gui.nvl_name_xpos = 430
define gui.nvl_name_ypos = 0
define gui.nvl_name_width = 150
define gui.nvl_name_xalign = 1.0

define gui.nvl_text_xpos = 450
define gui.nvl_text_ypos = 8
define gui.nvl_text_width = 590
define gui.nvl_text_xalign = 0.0

define gui.nvl_thought_xpos = 240
define gui.nvl_thought_ypos = 0
define gui.nvl_thought_width = 780
define gui.nvl_thought_xalign = 0.0

define gui.nvl_button_xpos = 450
define gui.nvl_button_xalign = 0.0
I didn't know there was something like this, haha, thank you.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Problem with NVL mode

#4 Post by Divona »

Everything about NVL code is straight from default, except that x and y padding in "style nvl_window". Do you still have the issue? If so, is there anywhere else about NVL or Say Dialogue you changed?
Completed:
Image

User avatar
Ran08
Miko-Class Veteran
Posts: 737
Joined: Tue Jun 12, 2012 1:17 am
Completed: https://ran.itch.io/
Projects: Fate's Cafe
Tumblr: otometwist
Skype: @otomeran
itch: ran
Location: Manila
Contact:

Re: Problem with NVL mode

#5 Post by Ran08 »

It's solved now, yay! Thank you so much for the help! :)

I changed this part:

Code: Select all

define gui.nvl_text_xpos = 450
define gui.nvl_text_ypos = 8
define gui.nvl_text_width = 590
define gui.nvl_text_xalign = 0.0
to this:

Code: Select all

define gui.nvl_text_xpos = 300
define gui.nvl_text_ypos = 100
define gui.nvl_text_width = 1200
define gui.nvl_text_xalign = 0.0
It works for now, but I still have to do more testing to ensure that it'll be working correctly the whole time.

Again, thank you so much! :)

Post Reply

Who is online

Users browsing this forum: Belgerum