glqgamemaster/Gentle-Love-Quest — pull request #13 by gegerlan (2011-12-30 14:07:40+00:00)
Title: Added system for allowing simple switching between facesets.

Rather than explicitly setting the faceset used for each situation (and equipment), you can now use the placeholder images to make the game automatically use the image with the correct clothing.

E.g. If Eva is wearing her normal clothes and shows up on the screen "Eva - Placeholder - Neutral" is used. The game detects the use of the word _placeholder_ and looks for replacement by checking her body armor's id against a list (BODY_NAME). The value retrieved from the list (in this case "Normal" for armor 1) is used to replace the word Placeholder. The new filename is now "Eva - Normal - Neutral".

This makes it really simple to support multiple clothes, remains flexible enough not to limit specific usage (i.e. any settings of images without the word placeholder won't be modified).

Limitations include...
* Name of the actor must correspond to the name of the filename.
* Filenames must be formatted as "ActorName - ArmorName - ActorState", with the spaces, and dashes.
* No custom states for specific equipment, there must be corresponding images for each state.

Possible improvements...
* Rather than having a list to look up the names for different armors, the filenames could use the armor names as they're defined in the editor (i.e. "Eva - Normal -..." would be "Eva - Clothes - ..."). This would make it simpler to maintain in the long run.
* Autotmatic faces, defined by the player's state. The expression could automatically change to another, e.g. if she is excited.