Renpy Portrait System v2.X

Version 2.0a

Overview

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.

Features

  • Define character portraits that'll animate with a single line.
  • Text-bleep effect tied to characters.
  • Ability to set custom overrides for eye/mouth frames.

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:

  • The character name, or rather image directory,
  • Base body expression/filename,
  • And then eyes and mouth co-ordinates.

By default, portraits are stored under images/char/character name/, using the syntax expression_base.png, expression_eyes.png, and expression_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 co-ordinates have 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.0a)

As before, credit should be given to myself - Aether, and to Bryan Tsang.

Changelog

(2.0a) Sunday, 12th December 02021

Updated the demo to clarify possible obtuse explanations of speaker.

Updated to Renpy version 7.4.11.

(b0.9) Thursday, 21st November 02019

Initial release.

  • Sunday, 12th December 02021