Character text box. Name placement. [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
Otto-V
Newbie
Posts: 8
Joined: Thu Oct 23, 2014 8:16 am
Contact:

Character text box. Name placement. [Solved]

#1 Post by Otto-V »

Hello I got a question about making the text fit properly inside my custom made text boxes. I have allredy managed to get the text of the narration to fit but when a character name apears I do not know how to make it apear in the rigth place :(

I am using a new text box for when a character speaks, this was the code I used

Code: Select all

define d = Character('Deagon', window_background="text_nameFrameStandard.png", who_font="segoesc.ttf", color="#b22222")
after reading on the wiki I tried this code just to see if the name moved at all but nothing seems to have changed.

Code: Select all

define d = Character('Deagon', window_background="text_nameFrameStandard.png", who_font="segoesc.ttf", color="#b22222", who_yalign=45)
I tried again and ised very high number so I am sure its not moving at all.

This is the aticle I read maby I am reading it wrong to. What dose $ before the code mean?

Image

How would I write the code for the desierd result?
Attachments
wiki.jpg
Narration.jpg
character.jpg
Last edited by Otto-V on Sat Oct 25, 2014 12:28 pm, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Character text box. Name placement.

#2 Post by Alex »

Try to set show_two_window parameter to True for your character and then adjust the position of its name.

Code: Select all

http://www.renpy.org/doc/html/dialogue.html#defining-character-objects

Otto-V
Newbie
Posts: 8
Joined: Thu Oct 23, 2014 8:16 am
Contact:

Re: Character text box. Name placement.

#3 Post by Otto-V »

Hi and thank you for the response.

Adding in the show_two_window=True code moved the name on top but added in another dialouge window, how do I remove this?

I am very new at coding but I really want to make my game the best it can be so I am trying to learn the best I can, I apolegize for any stupid questions.

Do I need to change somthing in the Options.rpy file?

This is the code I am using for the character now

Code: Select all

define t = Character('Thera', show_two_window=True, who_top_padding=1000, who_yalign=40, window_background="text_nameFrameStandard.png")
As you can see I put padding up to a 1000, I tried it really low and around 60. I just decided to put in a large number to see if it did anything at all.

What am I doing wrong?

Here is my current ingame tex box.

Image
Attachments
Untitled-10 copy.jpg

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Character text box. Name placement.

#4 Post by Alex »

Get rid of who_window's background

Code: Select all

init:
    $ style.say_who_window.background=None
and set the who_yoffset for your character.

http://www.renpy.org/wiki/renpy/FAQ#How ... own_box.3F

Otto-V
Newbie
Posts: 8
Joined: Thu Oct 23, 2014 8:16 am
Contact:

Re: Character text box. Name placement.

#5 Post by Otto-V »

Get rid of who_window's background
Code:
init:
$ style.say_who_window.background=None

and set the who_yoffset for your character.

http://www.renpy.org/wiki/renpy/FAQ#How ... own_box.3F
Now everything works thank you a ton :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]