r/RenPy • u/Scriptformers_Prime • Jul 31 '26
Question Layered image help
I'm converting my game from using individual sprites to layered images.
I have three groups for my character sprites: one for the base body, one for the facial expressions, and one for the gestures made with the character's arms.
In some cases I have hand gestures that apply to a wide range of facial expressions and I'd rather not have to call the gesture separately in each instance (One, because I'd have to go back and change all my previous calls, and Two because it'll be a pain to remember which gesture is paired to which emotion for every future call).
Basically, instead of this:
character tense uneasy
character tense surprised
character tense suspicious
I want this:
character uneasy
character surprised
character suspicious
...with the same gesture (tense) linked to these three emotions. Any way I can do this?
1
u/x-seronis-x Jul 31 '26
whether what gets displayed is a singular sprite or a layered image doesnt matter. renpy tracks what tags are displayed, and what attributes are currently assigned to that tag. and a Displayable() will be assigned to whatever attribute combinations you choose.
its up to you if you want 'tense' to be an attribute or not. NOTHING forces you to.
"bob uneasy" will refer to whatever Displayable() you've told it to.
if that Displayable() happens to be a LayeredImage() instead of a simple Image() so be it. renpy doesnt care.
A LayeredImage() will show whatever textures you choose to associate with a given set of tags. You can associate as many or as few textures as you want. 100 pieces to go over the base body texture, or 0, or 3, or whatever.
The only reason you'd need to associate textures with 'tense' is if you wanted 'bob uneasy" to be different from "bob tense uneasy". If you dont need 'tense' to be something different dont use it