Renpy Portrait System v2.X


This is version 2.0 of my Renpy Portrait System. It takes the base premise of my original code and refines it. As there's some major design direction changes from the original, I'm presenting it on its own page here.

Originally, the portrait system had fixed portrait and eye/mouth sizes, as well as storing them in single files. I did this as I felt it would be more convenient, but it immediately became a problem when I wanted to make subtle expression changes. Thus an important difference with v2.0 is it separates portraits into separate files for base, eyes, and mouth. This version also does away with the restraints caused by height limitations and simplifies some arguments.


Syntax Overview

image tamati neutral = Portrait("tamati", "neutral", (298, 209), (339, 277))

This is a basic example for defining a character portrait. You have your image name, the Portrait() object, and its arguments - directory, body expression, eyes, and mouth. Naturally, the eyes and mouth are specifying the co-ordinates for the eyes and mouth animation.

By default, portraits are stored under images/char/character name/, using the syntax expression_base.png, _eyes.png, and _mouth.png. So the example above would be stored under images/char/tamati/ and the images would be prefixed with neutral.

You're not limited to using one expression with one base portrait, however.

image tamati scowl = Portrait("tamati", "neutral", (298, 209, "scowl"), (339, 277))

In this example, the eyes argument has been appended with scowl. Thus, it'll use scowl_eyes.png with a neutral base portrait.

The demo below goes over things in more detail, as well as functions like static eye expressions and custom idle mouth frames.

Download and Credits

Download Demo (v2.0 b0.9)

As before, credit should be given to myself - Taylor, and to Bryan Tsang/@bvtsang.


(b0.9) Thursday, 21st November 02019

Initial release.

Thursday, 21st November 02019