Text Message-Like Dialogue System in Renpy

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
malakme
Newbie
Posts: 12
Joined: Fri Apr 26, 2019 6:34 pm
Contact:

Text Message-Like Dialogue System in Renpy

#1 Post by malakme » 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!

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

Re: Text Message-Like Dialogue System in Renpy

#2 Post by Per K Grok » Sat Nov 09, 2019 6:01 pm

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.
Image Visual Story Telling, DeviantArt Group for animations, comics, games and illustrations https://www.deviantart.com/acgi

Post Reply

Who is online

Users browsing this forum: No registered users