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.
Hello, all! I was wondering what the easiest and most effective way to show character portraits might be?
Am I doomed to simply code endlessly like this?:
show character_sad at right
c "dialog!"
hide character_sad
show character_happy at right
c "happy expression change!"
Or is there an easier way to do this? This starts to become quite cumbersome and messy as you go on writing and scripting (it can honestly get so confusing along the way...), and especially when adding more characters or using a heavy cast. It can sometimes look like this:
show character_sad at right
show second_sad at left
c "dialog!"
hide character_sad
show character_surprised at right
s "alternate dialog!"
hide second_sad
show newchar_happy at left
show character_happy at right
c "happy expression change!"
Am I just doing it wrong from the get-go? This is the only way I know how to do it. Any advice would be appreciated!
That's pretty much what a normal Ren'Py script looks like. It's like writing screenplay where you separate between action and dialogues. To minimize writing, I would suggest using image attributes with character emotion/facial so you don't have to hide character every time they change pose/emotion. Leave some white space between actions would help make the script easier to read as well.
image character sad = "character_sad.png"
image character surprised = "character_surprised.png"
image second sad = "second_sad.png"
image newchar happy = "newchar_happy.png"
label start:
show character sad at right
show second sad at left
c "dialog!"
show character surprised
s "alternate dialog!"
hide second
show newchar happy at left
show character happy
c "happy expression change!"
Last edited by Divona on Sat Oct 14, 2017 9:28 pm, edited 2 times in total.