[SOLVED]How Do I Enable the Name Textbox

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
amaturemanga
Regular
Posts: 94
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

[SOLVED]How Do I Enable the Name Textbox

#1 Post by amaturemanga » Fri Dec 20, 2019 7:50 pm

Hi there, im trying to add a textbox for the name so i tried show_two_window and that didnt work because that's not supported anymore in the new renpy it seems. So i checked to the documentation and went to the gui where it says to go but i cant seem to find a place to enable the namebox. Just settings to edit it so i try and mess with those settings specifically the snip shown below:

Code: Select all

## 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 = 240
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 = 50
define gui.namebox_height = 50

## 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 if the namebox will be scaled.
define gui.namebox_tile = False
Am i missing something do i have to create it in screen idk.
Last edited by amaturemanga on Mon Dec 23, 2019 5:26 pm, edited 1 time in total.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: How Do I Enable the Name Textbox

#2 Post by Per K Grok » Sat Dec 21, 2019 2:12 am

amaturemanga wrote:
Fri Dec 20, 2019 7:50 pm
Hi there, im trying to add a textbox for the name so i tried show_two_window and that didnt work because that's not supported anymore in the new renpy it seems. So i checked to the documentation and went to the gui where it says to go but i cant seem to find a place to enable the namebox. Just settings to edit it so i try and mess with those settings specifically the snip shown below:

Code: Select all

## 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 = 240
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 = 50
define gui.namebox_height = 50

## 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 if the namebox will be scaled.
define gui.namebox_tile = False
Am i missing something do i have to create it in screen idk.

The namebox should work without any special enabling. If you use the code below the name box should show up with 'My Name' in it. Does it not?

Code: Select all

define MN = Character ("My Name")

label start:
    MN "Do you see my name?"

User avatar
amaturemanga
Regular
Posts: 94
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

Re: How Do I Enable the Name Textbox

#3 Post by amaturemanga » Sat Dec 21, 2019 3:11 pm

Per K Grok wrote:
Sat Dec 21, 2019 2:12 am
amaturemanga wrote:
Fri Dec 20, 2019 7:50 pm
Hi there, im trying to add a textbox for the name so i tried show_two_window and that didnt work because that's not supported anymore in the new renpy it seems. So i checked to the documentation and went to the gui where it says to go but i cant seem to find a place to enable the namebox. Just settings to edit it so i try and mess with those settings specifically the snip shown below:

Code: Select all

## 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 = 240
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 = 50
define gui.namebox_height = 50

## 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 if the namebox will be scaled.
define gui.namebox_tile = False
Am i missing something do i have to create it in screen idk.

The namebox should work without any special enabling. If you use the code below the name box should show up with 'My Name' in it. Does it not?

Code: Select all

define MN = Character ("My Name")

label start:
    MN "Do you see my name?"
yea this is how my script is the namebox doesnt show up

Code: Select all

define b = Character('Boy',what_ypos=10, ctc="ctc_blink", ctc_position="nestled", what_prefix='"', what_suffix='"')

label start:
b "Mummy, can I have more?"

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: How Do I Enable the Name Textbox

#4 Post by Per K Grok » Sun Dec 22, 2019 3:27 am

amaturemanga wrote:
Sat Dec 21, 2019 3:11 pm

----
yea this is how my script is the namebox doesnt show up

Code: Select all

define b = Character('Boy',what_ypos=10, ctc="ctc_blink", ctc_position="nestled", what_prefix='"', what_suffix='"')

label start:
b "Mummy, can I have more?"
OK, that aught to work. And it does work when I test it. When I use the values you put in the gui.rpy, the placement of the namebox is a bit strange, but it is there.

You should of course have a 4-step indention for the dialog-line after start, but it did actually work for me even without that.

I would suggest that the first thing you do is to create a new project just to test this one function. That way you can make certain that the problem is in your present project and not a general problem. It is unlikely it is a general problem but if it is, then it is good to find that out early.

If the problem is in your project, the next step should be to go to the screens.rpy and check out the section on the say-function. Look for
screen say(who, what):

You can compare the code to the code in the test project. Are there differences?

User avatar
Andredron
Miko-Class Veteran
Posts: 535
Joined: Thu Dec 28, 2017 2:37 pm
Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
Location: Russia
Contact:

Re: How Do I Enable the Name Textbox

#5 Post by Andredron » Sun Dec 22, 2019 12:42 pm

Code: Select all


define men = Character(None, window_background="image/startextbox.png")
image/startextbox.png - An image with a frame where the character’s name is.

Crutch, and translators do not hate those who do not leave a simple frame image
I'm writing a Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18

Help me to register in QQ International

Honest Critique

User avatar
amaturemanga
Regular
Posts: 94
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

Re: How Do I Enable the Name Textbox

#6 Post by amaturemanga » Sun Dec 22, 2019 8:04 pm

Per K Grok wrote:
Sun Dec 22, 2019 3:27 am
amaturemanga wrote:
Sat Dec 21, 2019 3:11 pm

----
yea this is how my script is the namebox doesnt show up

Code: Select all

define b = Character('Boy',what_ypos=10, ctc="ctc_blink", ctc_position="nestled", what_prefix='"', what_suffix='"')

label start:
b "Mummy, can I have more?"
OK, that aught to work. And it does work when I test it. When I use the values you put in the gui.rpy, the placement of the namebox is a bit strange, but it is there.

You should of course have a 4-step indention for the dialog-line after start, but it did actually work for me even without that.

I would suggest that the first thing you do is to create a new project just to test this one function. That way you can make certain that the problem is in your present project and not a general problem. It is unlikely it is a general problem but if it is, then it is good to find that out early.

If the problem is in your project, the next step should be to go to the screens.rpy and check out the section on the say-function. Look for
screen say(who, what):

You can compare the code to the code in the test project. Are there differences?
the only difference i noticed is that there was two of this line of code so i adjusted it but still nothing

Code: Select all

## If there's a side image, display it above the text. Do not display on the
    ## phone variant - there's no room.
    if not renpy.variant("small"):
        add SideImage() xalign 0.0 yalign 1.0

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: How Do I Enable the Name Textbox

#7 Post by Per K Grok » Mon Dec 23, 2019 9:37 am

amaturemanga wrote:
Sun Dec 22, 2019 8:04 pm

----

the only difference i noticed is that there was two of this line of code so i adjusted it but still nothing

Code: Select all

## If there's a side image, display it above the text. Do not display on the
    ## phone variant - there's no room.
    if not renpy.variant("small"):
        add SideImage() xalign 0.0 yalign 1.0

Did you make a test project and did the namebox work there?

User avatar
amaturemanga
Regular
Posts: 94
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

Re: How Do I Enable the Name Textbox

#8 Post by amaturemanga » Mon Dec 23, 2019 1:04 pm

Per K Grok wrote:
Mon Dec 23, 2019 9:37 am
Did you make a test project and did the namebox work there?
yea i even updated from 7.2.2 to 7.3.5 in the test project its the same thing

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: How Do I Enable the Name Textbox

#9 Post by Per K Grok » Mon Dec 23, 2019 2:42 pm

amaturemanga wrote:
Mon Dec 23, 2019 1:04 pm
Per K Grok wrote:
Mon Dec 23, 2019 9:37 am
Did you make a test project and did the namebox work there?
yea i even updated from 7.2.2 to 7.3.5 in the test project its the same thing
You made a test project.

you only added something like;

Code: Select all

define MN = Character ("My Name")

label start:
    MN "Do you see my name?"


In all other ways the test project is as it was when downloaded.

And you still did not get the namebox to show up?

Is that correctly understood?

I'm presently using version 7.3.2. (so in between the 2 versions you have used) and I don't have this problem. I don't think the problem is with the program.
But if you get that problem even under the circumstances described above, that is what it points at.

One option in a situation like this is to reinstall the program. Something could have gone wrong during the initial installation. Though it seems like you already did a new installation.

If those are the circumstances, I don't have a good idea on how to fix it. Sorry.

User avatar
amaturemanga
Regular
Posts: 94
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

Re: How Do I Enable the Name Textbox

#10 Post by amaturemanga » Mon Dec 23, 2019 4:57 pm

Per K Grok wrote:
Mon Dec 23, 2019 2:42 pm

In all other ways the test project is as it was when downloaded.

And you still did not get the namebox to show up?

Is that correctly understood?

I'm presently using version 7.3.2. (so in between the 2 versions you have used) and I don't have this problem. I don't think the problem is with the program.
But if you get that problem even under the circumstances described above, that is what it points at.

One option in a situation like this is to reinstall the program. Something could have gone wrong during the initial installation. Though it seems like you already did a new installation.

If those are the circumstances, I don't have a good idea on how to fix it. Sorry.
ok it looks like its working now it seems that the namebox wouldnt show up unless namebox_tile was set to True but now it shows up for the narrator which i dont want i only want it for when a character is speaking not when its narrator dialogue so i need to figure that out

Post Reply

Who is online

Users browsing this forum: Bing [Bot]