Text running off center and running off side in 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
tim_p
Newbie
Posts: 3
Joined: Tue Apr 18, 2017 10:21 pm
Contact:

Text running off center and running off side in NVL mode

#1 Post by tim_p »

Hello, this is my first try with RenPy so I'm still getting used to the basics. I am trying to set the format up in an NVL mode, but when I changed the default window resolution to 600 x 480, the text is printing way off center and also runs off the side. What am I missing here?

Image

This is the super simple code for it:

# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

init:
$ s = Character(None, kind=nvl, what_prefix="\"", what_suffix="\"", what_color="#fff")
$ m = Character(None, kind=nvl, what_prefix="\"", what_suffix="\"", what_color="#fff")
$ narrator = Character(None, kind=nvl, what_color="#fff")
image bg forest1 = "mo1.jpg"

init python:
config.nvl_paged_rollback = True

style.nvl_window.background = "nvl_window.png"
style.nvl_window.xpadding = 5
style.nvl_window.ypadding = 5

init python:
config.empty_window = nvl_show_core
config.window_hide_transition = dissolve
config.window_show_transition = dissolve

# The game starts here.

label start:

# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.

scene bg forest1
window show

# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.

# show eileen happy

# These display lines of dialogue.

"Hello, world."

s "You've created a new Ren'Py game."

s "Once you add a story, pictures, and music, you can release it to the world!"

# This ends the game.

return

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Text running off center and running off side in NVL mode

#2 Post by Imperf3kt »

Did you edit the resolution in the gui.rpy or did you do it by creating a new project?

I don't know why you're using a python init for the NVL mode though.
you can just do the following:

Code: Select all

start()
    nvl show
    "Hello world."
    #the rest of your NVL text
    hide NVL
    return
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

tim_p
Newbie
Posts: 3
Joined: Tue Apr 18, 2017 10:21 pm
Contact:

Re: Text running off center and running off side in NVL mode

#3 Post by tim_p »

OK, I got it. I didn't know I had to adjust stuff in gui.rpy...I'd just done it in config.rpy.

Does it make sense to use a python init for the NVL mode if the entire game is in NVL mode?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Text running off center and running off side in NVL mode

#4 Post by Imperf3kt »

I guess, but at that point I'd consider tweaking the ADV display. I guess it depends on your exact requirements.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Alex, Dark79, Google [Bot]