Interactive director for text box placement?

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
Kinmoku
Veteran
Posts: 365
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Interactive director for text box placement?

#1 Post by Kinmoku » Thu Jul 12, 2018 12:03 pm

Hi all,

I'm wondering if (or how) I can use the interactive director to move the position of the text box? I'm guessing not, but thought I'd ask.

My next game has text appear is bubbles next to the characters (like in a comic book) and I wanted to know if there was an easier way of going about it rather than defining different characters for each position.

Thanks :)

User avatar
Per K Grok
Regular
Posts: 174
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls
Projects: Defenders of Adacan
Deviantart: pekj
itch: per-k-grok
Location: Sverige
Contact:

Re: Interactive director for text box placement?

#2 Post by Per K Grok » Thu Jul 12, 2018 2:00 pm

Kinmoku wrote:
Thu Jul 12, 2018 12:03 pm
Hi all,

I'm wondering if (or how) I can use the interactive director to move the position of the text box? I'm guessing not, but thought I'd ask.

My next game has text appear is bubbles next to the characters (like in a comic book) and I wanted to know if there was an easier way of going about it rather than defining different characters for each position.

Thanks :)

I think this might work.

In screen.rpy you add your own windows styles for each position

Code: Select all

style window2:
    xpos 100
    ypos 100
    background Image("ballon1.png")

style window3:
    xpos 500
    ypos 200
    background Image("ballon2.png")

style window4:
    xpos 900
    ypos 200
    background Image("ballon3.png")
 
When a character is to talk you do

$ renpy.say(m, "blabla qwerty", window_style="window2")

A quick test indicates that it might work.
Image Visual Story Telling, DeviantArt Group for animations, comics, games and illustrations https://www.deviantart.com/acgi

User avatar
Kinmoku
Veteran
Posts: 365
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: Interactive director for text box placement?

#3 Post by Kinmoku » Fri Jul 13, 2018 11:38 am

Per K Grok wrote:
Thu Jul 12, 2018 2:00 pm
When a character is to talk you do

$ renpy.say(m, "blabla qwerty", window_style="window2")

A quick test indicates that it might work.
Hey thanks :) This is a much better way of doing it that I hadn't thought of.

I'm wondering, because I'd like to avoid typing $ renpy.say(m, "blabla qwerty", window_style="window2") each time if possible, is there something I can do so the window style stays that way until said otherwise?

User avatar
Per K Grok
Regular
Posts: 174
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls
Projects: Defenders of Adacan
Deviantart: pekj
itch: per-k-grok
Location: Sverige
Contact:

Re: Interactive director for text box placement?

#4 Post by Per K Grok » Fri Jul 13, 2018 3:40 pm

Kinmoku wrote:
Fri Jul 13, 2018 11:38 am
---

I'm wondering, because I'd like to avoid typing $ renpy.say(m, "blabla qwerty", window_style="window2") each time if possible, is there something I can do so the window style stays that way until said otherwise?
You could make a function with arguments for who, what and window style. Window style could be stored in a variable and function could get the third argument from that variable. That way window style would remain the same until you change the variable.

I'm slightly doubtful if it would be worth to do that. Copy/paste would perhaps be enough to hold down the amount of typing.
Image Visual Story Telling, DeviantArt Group for animations, comics, games and illustrations https://www.deviantart.com/acgi

User avatar
Kinmoku
Veteran
Posts: 365
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: Interactive director for text box placement?

#5 Post by Kinmoku » Mon Jul 16, 2018 8:31 am

Per K Grok wrote:
Fri Jul 13, 2018 3:40 pm
I'm slightly doubtful if it would be worth to do that. Copy/paste would perhaps be enough to hold down the amount of typing.
Okay, I'll copy and paste it each time and adjust accordingly. It shouldn't take that much time :)

Although, I've just run into a problem with menus. The code wouldn't run when I used the text in this format.

I changed it to this:

Code: Select all

    $ renpy.say(k, "S’okay, I guess.\nI don’t really get on with anyone there.", window_style="window_wide_s1_floorkatie")
    
    menu:
        extend ""
        
        "How come?":
        #etc
        
        "Me neither":
        #etc
... but then it shows the last line of normal dialogue, which was 100s of lines ago!

I suppose I can define characters for the menu lines, but again, there's quite a lot of them and it could get messy very fast.

Post Reply

Who is online

Users browsing this forum: Alex, erencross