Narration issues (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
heavensdeviant
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 11:05 am
Contact:

Narration issues (solved)

#1 Post by heavensdeviant »

First of all I have the code for two separate text boxes but It only shows the dialogue one.
In my script I have it written as
$ narrator = Character(None, window_background="frame2.png")
just like the cookbook says but with my file name.

2nd of all
I've tried adjusting various things to make the narration align correctly. If It takes up one line it's fine but ones it gets to the second line it jumps down. like
http://i.imgur.com/A1ntQoj.jpg

I kept trying to change different things to make it work. I tried using the style inspector and put this in the options.rpy...
style.say_thought.yalign = 1.7
style.say_thought.ypos = 1.7
style.say_thought.yanchor = 0.3

I am using Ren'Py version 6.15.4.320
Last edited by heavensdeviant on Wed May 29, 2013 6:03 pm, edited 1 time in total.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Narration issues

#2 Post by nyaatrap »

Using styles in options.rpy just makes matters complex.
You can easily adjust those after you've learned about the screen language, and arrange them in screens.rpy.

out of topic: I feel options.rpy is outdated, and it makes hard to understand what current ren'py is.

heavensdeviant
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 11:05 am
Contact:

Re: Narration issues

#3 Post by heavensdeviant »

I tried learning screen language but trying to apply it to the narration in the screens file wont work at all. The narration looks the same.

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Narration issues

#4 Post by pwisaguacate »

Set the textbox's corner size and/or padding. You can find this in options.rpy:

Code: Select all

    # style.window.background = Frame("frame.png", 12, 12)

    # style.window.left_padding = 6
    # style.window.right_padding = 6 
    # style.window.top_padding = 6
    # style.window.bottom_padding = 6
For the name box, attach xoffset / yoffset properties in screens.rpy:

Code: Select all

        # The one window variant.        
        window:
            id "window"

            has vbox:
                style "say_vbox"

            if who:
                text who id "who" xoffset 0 yoffset -15 # Adjust as needed
EDIT: Erm, yeah... I guess that wasn't too helpful.
Last edited by pwisaguacate on Tue May 28, 2013 10:55 pm, edited 2 times in total.

heavensdeviant
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 11:05 am
Contact:

Re: Narration issues

#5 Post by heavensdeviant »

But that would change the look of the dialogue when I just want to fix the narration.

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Narration issues

#6 Post by pwisaguacate »

The first part I posted realigns the dialogue.

EDIT: Sorry, I just noticed that the main issue is the "jumps down when longer than one line" thing, but I'm not sure what you did there. Do you have any code that could give us some leads?

heavensdeviant
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 11:05 am
Contact:

Re: Narration issues

#7 Post by heavensdeviant »

I could change the dialogue and give it a frame just fine but when I try to change the look of the narration it doesn't work. I already deleted what I was using for the narration alignment since it wasn't working properly so it's not jumping any more, it's just not aligned to the text box.

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: Narration issues

#8 Post by OokamiKasumi »

Something to consider; padding and margins are additive.
-- If you already have the margins & padding set in options.rpy--

options.rpy

Code: Select all

    ## Margin is space surrounding the window, where the background
    ## is NOT drawn.

    style.window.left_margin = 6
    style.window.right_margin = 6
    style.window.top_margin = 3
    style.window.bottom_margin = 20    

    ## Padding is space inside the window, where the background is
    ## drawn.

    style.window.left_padding = 6
    style.window.right_padding = 6
    style.window.top_padding = 6
    style.window.bottom_padding = 6
--the padding and margins you set in character definitions will ADD to those numbers.

script.rpy

Code: Select all

    define gi_side = Character('Giselle',
            color="6699cc", 
            who_xpos = 130, 
            window_left_padding = 150,
            show_two_window = True,)
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

heavensdeviant
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 11:05 am
Contact:

Re: Narration issues

#9 Post by heavensdeviant »

OokamiKasumi wrote:Something to consider; padding and margins are additive.
-- If you already have the margins & padding set in options.rpy--

options.rpy

Code: Select all

    ## Margin is space surrounding the window, where the background
    ## is NOT drawn.

    style.window.left_margin = 6
    style.window.right_margin = 6
    style.window.top_margin = 3
    style.window.bottom_margin = 20    

    ## Padding is space inside the window, where the background is
    ## drawn.

    style.window.left_padding = 6
    style.window.right_padding = 6
    style.window.top_padding = 6
    style.window.bottom_padding = 6
--the padding and margins you set in character definitions will ADD to those numbers.

script.rpy

Code: Select all

    define gi_side = Character('Giselle',
            color="6699cc", 
            who_xpos = 130, 
            window_left_padding = 150,
            show_two_window = True,)
Thank you very much. I was able to get it by defining narrator as a character.

Code: Select all

define N = Character(None,
            color="6699cc", 
            who_xpos = 130, 
            window_background="frame2.png",
            window_top_padding = 55,
            window_left_padding = 21,
            show_two_window = True,)

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Narration issues (solved)

#10 Post by pwisaguacate »

The narrator is a special character:

Code: Select all

define narrator = Character(None, window_left_padding=160)

label start:
    "This text uses the narrator character to define how it looks."
    bob "This text uses the bob character to define how it looks."

    return

heavensdeviant
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 11:05 am
Contact:

Re: Narration issues (solved)

#11 Post by heavensdeviant »

pwisaguacate wrote:The narrator is a special character:

Code: Select all

define narrator = Character(None, window_left_padding=160)

label start:
    "This text uses the narrator character to define how it looks."
    bob "This text uses the bob character to define how it looks."

    return
Hmm, This may have been my problem then. The renpy faq has the narrator down as
$ narrator = Character(None, window_left_padding=160)
So I wasn't writing it in correctly.

Post Reply

Who is online

Users browsing this forum: Google [Bot]