Non-predefined names do not go into namebox {SOLVED}

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
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Non-predefined names do not go into namebox {SOLVED}

#1 Post by meiri » Wed Aug 06, 2014 5:01 pm

So, I've made a custom textbox and I've got it coded where the plain, default textbox does not have a namebox (so that I don't have to make a seperate textbox for my narrator.)

Here's what I've got in my options.rpy for my textbox and namebox

Code: Select all

# Here is the textbox
style.window.background = "gui/textbox2800600.png"

# Here is where I position the textbox and stuff with padding and things
style.window.left_padding = 131
style.window.right_padding = 83
style.window.top_padding = 30
style.window.bottom_padding = 36
style.window.yminimum = 185

#  Here is the namebox
style.say_who_window.background = Frame("gui/namebox.png", 56, 21)

# Here's how I position the namebox
style.say_who_window.yminimum = 48
style.say_who_window.left_padding = 38
style.say_who_window.right_padding = 19
style.say_who_window.top_padding = 12
style.say_who_window.bottom_padding = 14
style.say_who_window.xpos = 150
style.say_who_window.ypos = 70
 
In my screens.rpy I've got two_window set to True

Code: Select all

screen say:

    # Defaults for side_image and two_window
    default side_image = None
    default two_window = True
Now, the problem is that if I don't predefine the name, it won't be in the namebox, it'll be in the textbox.

Code: Select all

define s = Character('Shane', color="#FFFF00",show_two_window=True)

label start:
    s "Hi, I'm Shane and my name is in a seperate namebox!"
    "Boy" "I'm a boy, my name isn't predefined so it doesn't go into the seperate namebox, it stays in the textbox."

Here is a picture example to better show what I mean:
Attachments
02.png
01.png
Last edited by meiri on Thu Aug 07, 2014 1:07 am, edited 1 time in total.
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

User avatar
sempersapiens
Regular
Posts: 47
Joined: Mon Jun 30, 2014 4:31 pm
Location: Canada
Contact:

Re: Non-predefined names do not go into namebox

#2 Post by sempersapiens » Wed Aug 06, 2014 11:40 pm

Is there a reason you don't want to predefine all the names you'll be using? Because if not, it seems like that would be the simplest way to fix the problem.

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Non-predefined names do not go into namebox

#3 Post by Asceai » Thu Aug 07, 2014 12:10 am

Try creating a new 'name_only' character the same way you create your regular characters, like you can create a new 'narrator'.

name_only

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Non-predefined names do not go into namebox

#4 Post by akemicchi » Thu Aug 07, 2014 12:34 am

So I tried it for myself. Using default two_window = True doesn't seem to do anything for me (which is... weird. I don't understand why that doesn't work?). Two window only shows up when I add show_two_window = True to the Character, which means any character without it won't be using two window. But changing

Code: Select all

default two_window = True
to

Code: Select all

$ two_window = True
in screens.rpy makes two_window work for everyone with a speaker.

User avatar
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Re: Non-predefined names do not go into namebox

#5 Post by meiri » Thu Aug 07, 2014 1:00 am

sempersapiens wrote:Is there a reason you don't want to predefine all the names you'll be using? Because if not, it seems like that would be the simplest way to fix the problem.
I suppose I could do this, but I predict I'm going to have a lot of side characters without sprites/one-liners, as well as when I have to disguise the name with "???" for un-introduced characters. That could possibly end up being 10+ characters I'd have to add in and I know I can't do them all at once because I'm in the process of writing P: . So I considered, but decided against it unless there was no solution.
Asceai wrote:Try creating a new 'name_only' character the same way you create your regular characters, like you can create a new 'narrator'.

name_only
akemicchi wrote:So I tried it for myself. Using default two_window = True doesn't seem to do anything for me (which is... weird. I don't understand why that doesn't work?). Two window only shows up when I add show_two_window = True to the Character, which means any character without it won't be using two window. But changing

Code: Select all

default two_window = True
to

Code: Select all

$ two_window = True
in screens.rpy makes two_window work for everyone with a speaker.
Both of these solutions work well but I'll be using the latter. Thanks! :)
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

Post Reply

Who is online

Users browsing this forum: Google [Bot]