Page 1 of 1

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

Posted: Wed Aug 06, 2014 5:01 pm
by meiri
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:

Re: Non-predefined names do not go into namebox

Posted: Wed Aug 06, 2014 11:40 pm
by sempersapiens
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.

Re: Non-predefined names do not go into namebox

Posted: Thu Aug 07, 2014 12:10 am
by Asceai
Try creating a new 'name_only' character the same way you create your regular characters, like you can create a new 'narrator'.

name_only

Re: Non-predefined names do not go into namebox

Posted: Thu Aug 07, 2014 12:34 am
by akemicchi
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.

Re: Non-predefined names do not go into namebox

Posted: Thu Aug 07, 2014 1:00 am
by meiri
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! :)