froey

I'll miss you cohost. 2022-2024.

living in the bible belt, early 30s
non-binary ⚧🏳️‍⚧️ transfemme
lesbian + ace
neurodivergent
indie visual novel dev + writer
I watch mostly anime
I also read a lot of gay books
budget audiophile
data hoarder
general geek
@fireyfennec


Website (powered by Bear)
froey.bearblog.dev/
twitter (abandoned and locked.)
twitter.com/LadyFroey

nomnomnami
@nomnomnami

this is a mistake that i've seen every now and then, and it makes me so sad because it's so much extra typing and seems so TEDIOUS!!! there's a better way...!

does your script look something like this?

define m = Character(_("My Guy"))

label start:
    scene bg tutorialzone

    show myguy happy with dissolve
    m "this is a tutorial..."
    hide myguy happy
    show myguy angy
    m "for how not to code expression changes!!!!!!"

if it does, i'm happy to inform you, you don't have to show/hide your character every time they change their expression. ren'py can do that for you automatically! by using IMAGE TAGS!!!

to set it up, add the image tag to your character:

define m = Character(_("My Guy"), image="myguy")

all the art for this character should start with that tag--myguy happy.png for example. i use spaces as a separator, but underscores are fine too, as long as it's consistent. put them in the images folder.

BONUS TIP: you don't have to manually define these images in your script!! by keeping them in the 'images' folder, even if you make subfolders in there, ren'py will automatically define them for you.

now to change the character's expression, all you need to do is write the emotion before the dialogue! your script should look something like this:

label start:
    scene bg tutorialzone

    show myguy happy with dissolve
    m happy "this is a tutorial..."
    m angy "for how not to code expression changes!!!!!!"
    m surprised "...huh? oh, i guess this is the example of the right way to do it"
    m happy "wow, this is so much cleaner!! my work here is done..."
    hide myguy with dissolve

see, we only need to show him once, and hide him at the end when he goes away... thanks, my guy!!! (note that you don't need to hide myguy happy specifically either, since ren'py will just go ahead and hide any image with that tag!)

aside from just being way faster to write and less redundant, having the emotion listed with the dialogue line means it will be shown to any translators who work on your game! the character's expression informs the tone of what they're saying, thus it's important information to include for translators. even if you don't plan on having your games translated, it's still better to pretend you might... i mean, you never know...!


You must log in to comment.

in reply to @nomnomnami's post:

i love that you don't have to manually define all your images anymore... when i started out with ren'py that was still something you had to do and it got SO UNWIELDY lol. i hadn't thought about the translation thing, that makes me want to be a lot more thoughtful about categorizing my expressions...

ahh i remember those days... it's so much more convenient now!!! like, it didn't seem like the worst thing when you were making a smaller game with not-so-many images, but i can't imagine what larger projects must have been like back then omfg