Textbox Positions based by "Character"

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
Gryphbear
Regular
Posts: 91
Joined: Wed Jun 16, 2010 11:45 pm
Contact:

Textbox Positions based by "Character"

#1 Post by Gryphbear »

Alright - I'm working on a Visual Novel - and I was wondering if there was a way to position a character's dialogue in the center of the screen - yalign 0.5, and all, without using show text "etcetc" For example this is what I have set up for my Character.

Code: Select all

define rg= Character(
    None,
    window_background = None,
    what_size=26,
    what_outlines=[( 5, "#000000", 2, 1 )],
    what_xalign=0.5,
    what_yalign=0.0,
    what_textalign=0.5,
    what_layout='subtitle')
This is what I have for my character when he 'speaks' in a certain voice. I wanted it to be at the center of the screen versus normal dialogue with the textbox showing in the background. Any ideas? Do I insert a specific property in the Character code block? Or go into options/gui rpy files? Thanks for your time.
WIP: Ring av Guder - (Contemporary Fantasy VN/Dating Sim?)

What do you get when you inherit a mystical ring, meet Norse Dieties, and Werewolves, Satyrs, or Dwarves? Possibilities.

General Completion: 5% - (Still working on story plot.)
Story status: 1% (In progress of revamping)
Scripting: 1% (Prologue is about done)
Character Art: 0% (Would like to find a Bara-type Artist, but will learn to draw them myself if necessary)
BG/CG's: 0% (None so far)

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Textbox Positions based by "Character"

#2 Post by kivik »

I assume you mean center as in vertically - in which case I think you just need to replicate the say screen and make it your own. Align that screen however you like (with xalign 0.5 yalign 0.5).

Then use the screen argument to assign your screen: https://www.renpy.org/doc/html/dialogue.html#Character < scroll down to screen

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Textbox Positions based by "Character"

#3 Post by xavimat »

kivik wrote: Thu Jun 28, 2018 4:15 am I assume you mean center as in vertically - in which case I think you just need to replicate the say screen and make it your own. Align that screen however you like (with xalign 0.5 yalign 0.5).

Then use the screen argument to assign your screen: https://www.renpy.org/doc/html/dialogue.html#Character < scroll down to screen
Wow, no. I mean, you could do that, but you don't need to.

Simply add window_yalign=0.5 in your Character definition.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Textbox Positions based by "Character"

#4 Post by kivik »

Heh, I knew sneaking in the "I think" was the right move, cuz I figured someone would come along with a better answer :D

User avatar
Gryphbear
Regular
Posts: 91
Joined: Wed Jun 16, 2010 11:45 pm
Contact:

Re: Textbox Positions based by "Character"

#5 Post by Gryphbear »

Wow Thanks! I thought it was something like that, but I wasn't sure exactly :D thanks so much.
WIP: Ring av Guder - (Contemporary Fantasy VN/Dating Sim?)

What do you get when you inherit a mystical ring, meet Norse Dieties, and Werewolves, Satyrs, or Dwarves? Possibilities.

General Completion: 5% - (Still working on story plot.)
Story status: 1% (In progress of revamping)
Scripting: 1% (Prologue is about done)
Character Art: 0% (Would like to find a Bara-type Artist, but will learn to draw them myself if necessary)
BG/CG's: 0% (None so far)

Post Reply

Who is online

Users browsing this forum: Bing [Bot]