Narrator textbox changing position?
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.
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.
Narrator textbox changing position?
I have a little issue with my narrator-specific textbox. For every other character I use a textbox with a separate place for the name, and for the narrator I have a unique one.
The files are the exact same size, the only thing I changed was removing the namebox from the top. For some reason, though, the game shows the character textbox just fine but then with the narrator textbox it's barely visible...
What the heck is up with that? Is there an easy fix for it?
Re: Narrator textbox changing position?
Still haven#t figured this out 
- richycapy
- Regular
- Posts: 51
- Joined: Mon May 27, 2019 8:53 pm
- Organization: EN Productions
- Location: Mexico
- Contact:
Re: Narrator textbox changing position?
Those options are fixed on the gui.rpy file, look for the "dialogue" X and Y vars and you need to "play" with them untill you can find the placement you want
Re: Narrator textbox changing position?
I don#t see anything in the gui.rpy that indicates the position of the textbox image, only the text in said textbox. I also haven#t changed anything in the gui file so it shouldn't affect anything, right?
Here's the dialogue portion of my gui.rpy:
Code: Select all
## Dialogue ####################################################################
##
## These variables control how dialogue is displayed on the screen one line at a
## time.
## The height of the textbox containing dialogue.
define gui.textbox_height = 278
## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is
## center, and 1.0 is the bottom.
define gui.textbox_yalign = 1.0
## The placement of the speaking character's name, relative to the textbox.
## These can be a whole number of pixels from the left or top, or 0.5 to center.
define gui.name_xpos = 360
define gui.name_ypos = 0
## The horizontal alignment of the character's name. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.name_xalign = 0.0
## The width, height, and borders of the box containing the character's name, or
## None to automatically size it.
define gui.namebox_width = None
define gui.namebox_height = None
## The borders of the box containing the character's name, in left, top, right,
## bottom order.
define gui.namebox_borders = Borders(5, 5, 5, 5)
## If True, the background of the namebox will be tiled, if False, the
## background of the namebox will be scaled.
define gui.namebox_tile = False
## The placement of dialogue relative to the textbox. These can be a whole
## number of pixels relative to the left or top side of the textbox, or 0.5 to
## center.
define gui.dialogue_xpos = 402
define gui.dialogue_ypos = 75
## The maximum width of dialogue text, in pixels.
define gui.dialogue_width = 1116
## The horizontal alignment of the dialogue text. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.dialogue_text_xalign = 0.0Re: Narrator textbox changing position?
I'm still having this issue. Tried copying an entire .gui file from another game of mine which doesn't have this issue and also triple-checked to make sure the two namebox files are the exact same size. I don't understand what's wrong?!
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Projects: The Button Man
- Organization: NILA
- Github: hell-oh-world
- Location: Philippines
- Contact:
Re: Narrator textbox changing position?
How are you changing the background you're using? By `window_background` in the character definition?
Code: Select all
define e = Character("Eileen", window_background="e_bg.png")
define narrator = Character(None, window_background="n_bg.png")
Re: Narrator textbox changing position?
Sorry for late reply! This is how I do it:hell_oh_world wrote: ↑Tue Aug 04, 2020 8:10 pmHow are you changing the background you're using? By `window_background` in the character definition?Code: Select all
define e = Character("Eileen", window_background="e_bg.png") define narrator = Character(None, window_background="n_bg.png")
Code: Select all
$ n = Character(None, window_background="gui/textbox_noname.png",)- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Projects: The Button Man
- Organization: NILA
- Github: hell-oh-world
- Location: Philippines
- Contact:
Re: Narrator textbox changing position?
Can you try using a `Frame` for the background? I'm guessing that this is an issue that should be fixed by a frame for most of the image stretching issues? try it with `x/yfill`
Also, character definitions must be defined outside labels, and it's better to stick to the convention of defining it using the `define` keyword.
so instead of...
it should be...
and lastly, if it is the namebox is what you're trying to change solely here. it's better to separate the namebox image and the window background image and pass the namebox image along with the character definition but using a prefix...
https://www.renpy.org/doc/html/dialogue.html#Character
https://www.renpy.org/doc/html/config.h ... d_prefixes
this one should work as the docs say...
Also, character definitions must be defined outside labels, and it's better to stick to the convention of defining it using the `define` keyword.
so instead of...
Code: Select all
$ n = Character(None, window_background="gui/textbox_noname.png",)
Code: Select all
define narrator = Character(
None,
window_background=Frame(
"gui/textbox_noname.png", xfill=True, yfill=True
) # try also without xfill and yfill
)
label start:
"Something..."
return
https://www.renpy.org/doc/html/dialogue.html#Character
https://www.renpy.org/doc/html/config.h ... d_prefixes
This specifies a list of style property prefixes that can be given to a Character(). When a style prefixed with one of the given prefix is given, it is applied to the displayable with that prefix as its ID.
For example, the default GUI adds "namebox" to this. When a Character is given the namebox_background property, it sets background on the displayable in the say screen with the id "namebox".
Code: Select all
init python:
config.character_id_prefixes.append("namebox")
define narrator = Character(
None,
namebox_background="the_image.png"
)
Who is online
Users browsing this forum: No registered users