Placing Characters Name in Different Box

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
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Placing Characters Name in Different Box

#1 Post by Fenrir34 »

So I have a text box and now I have a smaller box for the characters name. Does anyone know how I do that? I can't find the code

quilty
Newbie
Posts: 14
Joined: Sat Sep 07, 2013 4:32 pm
Projects: [currently unnamed]
Location: Quilty, Clare
Contact:

Re: Placing Characters Name in Different Box

#2 Post by quilty »

This might be what you're looking for:
http://www.renpy.org/wiki/renpy/doc/FAQ ... own_box.3F

so you just need to add

Code: Select all

show_two_window=True
when declaring the characters

e.g.:

Code: Select all

$ e = Character("Eileen", show_two_window=True)

User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Placing Characters Name in Different Box

#3 Post by Fenrir34 »

quilty wrote:This might be what you're looking for:
http://www.renpy.org/wiki/renpy/doc/FAQ ... own_box.3F

so you just need to add

Code: Select all

show_two_window=True
when declaring the characters

e.g.:

Code: Select all

$ e = Character("Eileen", show_two_window=True)

I looked over the code but I don't know how to place it in my script renpy. This is what it looks like

Code: Select all

define k = Character('Kana', color="#c8ffc8") $ k = Character("Kana", show_two_window=True)



User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Placing Characters Name in Different Box

#4 Post by Fenrir34 »

Fenrir34 wrote:
quilty wrote:This might be what you're looking for:
http://www.renpy.org/wiki/renpy/doc/FAQ ... own_box.3F

so you just need to add

Code: Select all

show_two_window=True
when declaring the characters

e.g.:

Code: Select all

$ e = Character("Eileen", show_two_window=True)

I looked over the code but I don't know how to place it in my script renpy. This is what it looks like

Code: Select all

define k = Character('Kana', color="#c8ffc8") $ k = Character("Kana", show_two_window=True)



Also the namebox isn't showing up when I put it in my options and yet I have it in my game folder

Code: Select all

 ## More customizations can go here.
    style.say_who_window.background = Frame("namebox.png", 15, 15)

    style.say_who_window.xalign = 0.0
    style.say_who_window.yalign = 1.0
    #style.say_who_window.xpos = 100 #For precise placement
    #style.say_who_window.ypos = 100 #For precise placement
    style.say_who_window.left_padding = 15
    style.say_who_window.top_padding = 15
    style.say_who_window.right_padding = 15
    style.say_who_window.bottom_padding = 15
    style.say_who_window.xminimum = 150
    style.say_who_window.yminimum = 15
    style.say_who_window.xfill = False
    

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: Placing Characters Name in Different Box

#5 Post by Elmiwisa »

Fenrir34 wrote:

Code: Select all

define k = Character('Kana', color="#c8ffc8") $ k = Character("Kana", show_two_window=True)
I assumed that this code is on 2 lines? Because it's not even valid syntax when you put on just 1 line.

Here is an explanation of what went wrong with your code:
1.

Code: Select all

$ k = Character("Kana", show_two_window=True)
This line will get ignored unless you specifically put it into an init block. Which is why the namebox window do not show up.
2.
Even if you were to fix problem #1 by putting it correctly into an init block like this....

Code: Select all

define k = Character('Kana', color="#c8ffc8") 
init:
    $ k = Character("Kana", show_two_window=True)
...it will have a different problem. Specifically, on the first line, you create a character with name Kana and colour for the name being #c8ffc8, and that character is assigned to the variable k. On the last line, you make a new character with the name Kana and whom dialogue have a separated namebox and assign it to variable k, OVERWRITING the first one you created. In other word, k lost the property of showing name with colour #c8ffc8.

What you want to do is supply all information at the same time while you create the character. Like this:

Code: Select all

define k=Character("Kana", color="#c8ffc8",show_two_window=True)

quilty
Newbie
Posts: 14
Joined: Sat Sep 07, 2013 4:32 pm
Projects: [currently unnamed]
Location: Quilty, Clare
Contact:

Re: Placing Characters Name in Different Box

#6 Post by quilty »

Fenrir34 wrote:
I looked over the code but I don't know how to place it in my script renpy. This is what it looks like

Code: Select all

define k = Character('Kana', color="#c8ffc8") $ k = Character("Kana", show_two_window=True)


Don't worry, you don't need to make a separate statement for it:

Code: Select all

define k = Character('Kana', color="#c8ffc8, show_two_window=True) 
Sorry if I confused you, I hope it works now :)

User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Placing Characters Name in Different Box

#7 Post by Fenrir34 »

quilty wrote:
Fenrir34 wrote:
I looked over the code but I don't know how to place it in my script renpy. This is what it looks like

Code: Select all

define k = Character('Kana', color="#c8ffc8") $ k = Character("Kana", show_two_window=True)


Don't worry, you don't need to make a separate statement for it:

Code: Select all

define k = Character('Kana', color="#c8ffc8, show_two_window=True) 
Sorry if I confused you, I hope it works now :)
Thanks but the code doesn't work. It's okay though. I'll just live with what I got. Thanks :)

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: Placing Characters Name in Different Box

#8 Post by Elmiwisa »

Fenrir34 wrote: Thanks but the code doesn't work. It's okay though. I'll just live with what I got. Thanks :)
Sigh...It's just a small syntax error in quilty's code.
Try the code I put at the end of my previous post, which is just like quilty's code but without the missing quotation mark.

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Placing Characters Name in Different Box

#9 Post by OokamiKasumi »

Fenrir34 wrote:So I have a text box and now I have a smaller box for the characters name. Does anyone know how I do that? I can't find the code
The code and indtructions you are looking for can be found in this tutorial: [Tutorial] Customizing the Textbox in the Cookbook section of this forum.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
Fenrir34
Miko-Class Veteran
Posts: 560
Joined: Fri Jul 05, 2013 4:39 am
Completed: Escaping Sorrow
Projects: Crisis Beat,Lynarsia-The Broken Song
Location: California
Contact:

Re: Placing Characters Name in Different Box

#10 Post by Fenrir34 »

OokamiKasumi wrote:
Fenrir34 wrote:So I have a text box and now I have a smaller box for the characters name. Does anyone know how I do that? I can't find the code
The code and indtructions you are looking for can be found in this tutorial: [Tutorial] Customizing the Textbox in the Cookbook section of this forum.

Thank you

Post Reply

Who is online

Users browsing this forum: No registered users