wifetrick

power to the player

  • she/they

i post
i encourage audience participation
i like bugs
in my 20s, no kids allowed


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...!



feel the motions of the earth in my head vibrating like a bullet eyes always on me always second place never keeping up not here for a reason ust here to fill space pathetic could never be a daughter always the son they don't love as much as the daughter they recognize and you'll never look how you want to and it will always hurt to breath and you can't ever function as the adult you are it's pathetic that you're a child and you act like this can you just for once in your fucking life acknowledge what is going on or does the door close again after tonight and your smile goes on and you walk that road and you pretend to like everyone when in reality there's only one star in the sky you admire and the rest is just there so you can pretend it isn't so empty and your legs bleed and your body shakes and you limp more noticeably then you used to and your thoughts all swell in that worthless fucking mind of yours that worthless fucking mind of yours that worthless fucking mind of yours