Page 1 of 1

Text Message-Like Dialogue System in Renpy

Posted: Sat Nov 09, 2019 1:14 pm
by malakme
Hi everyone! I was wondering if it's possible with Renpy's engine to make a text-like dialogue system. I'm trying to achieve a style in which a box of text pops up, with a character sprite to one side of the box and as you press space/click, the dialogue boxes of other characters pop up. The previous "messages" remain on the screen until new messages push/scroll them off the screen.

What I'm trying to describe would essentially be able to:
1. have 3-5 dialogue boxes on screen at once
2. a system that pushes older dialogue off screen as new dialogue boxes appear
3. Sprites on the layer above the dialogue boxes (to the side of each box) and not behind the dialogue

I know I'm probably asking a lot, so if you have any insights into what I might have to look up to achieve this, even that would help. Thanks!

Re: Text Message-Like Dialogue System in Renpy

Posted: Sat Nov 09, 2019 6:01 pm
by Per K Grok
malakme wrote: Sat Nov 09, 2019 1:14 pm Hi everyone! I was wondering if it's possible with Renpy's engine to make a text-like dialogue system. I'm trying to achieve a style in which a box of text pops up, with a character sprite to one side of the box and as you press space/click, the dialogue boxes of other characters pop up. The previous "messages" remain on the screen until new messages push/scroll them off the screen.

What I'm trying to describe would essentially be able to:
1. have 3-5 dialogue boxes on screen at once
2. a system that pushes older dialogue off screen as new dialogue boxes appear
3. Sprites on the layer above the dialogue boxes (to the side of each box) and not behind the dialogue

I know I'm probably asking a lot, so if you have any insights into what I might have to look up to achieve this, even that would help. Thanks!
You could do this with screens

Some thing like this

Code: Select all


screen diaBox(what, who,x,y):
    frame:
    	pos (x,y)
    	padding (10,10)
    	background Image("gui/diabox.png")
    	
    	fixed: 
    	    text what
    	    
    	if who=="Alf":
    	    add "gui/alfpix.png" pos (-50, -50) 

You can then show the screen with

show screen diaBox("This is a lovely day for having a nice dialogue.", "Alf",50,100)


This exact code is not tested. Just to give you an idea on how it could be done.