Dynamic Emotive Faces

In the game that I am making, I make use of a lot of different character states, like gender and clothing, that lead to a lot of different character portraits.

I need some way of dynamically controlling these portraits within text boxes without using huge amounts of conditional branches.

Now, I have figured out how to do this with script calls (see attached).

Essentially, you set a game variable to a string which contains the name of the png file you are referencing.  From there, as long as all of your faces contain the same emotions in the same order, you can swap out the appropriate portrait entirely based on previous events that user has selected.

The downside to this is that you lose all of the functionality of the Show Text call in your event editor.  No nifty colors, no timing, events don't wait for the text to finish, sound effects will play out of order, etc.  Or, at least, I don't know how.

I think it would be nice to be able to have a new Control character to use within the Show Text call.  So in the plugin, you would set the variable everything is linked to, then have a control character like \P[n] where n is a value from 0-7 which references the specific facial expression you want to select.

Dynamic Face.png
I may be a bit confused, but isn't there a way to change an actors image with an event or script call? Then if you have Galv's script in your game and as long as you have the bust saved correctly it should load automatically and you can also change the busts mid event manually I believe.

http://galvs-scripts.com/category/rmmv-plugins/mv-audiovisual-effects/#post-1423

So, say noramlly you have Actor 1's 1st face as your main character and then you change it to actor 1's 3rd face (1-3) with an event, as long as you have both saved properly after you change the actors face in an event the busts should load automatically?
I may be a bit confused, but isn't there a way to change an actors image with an event or script call? Then if you have Galv's script in your game and as long as you have the bust saved correctly it should load automatically and you can also change the busts mid event manually I believe.

http://galvs-scripts.com/category/rmmv-plugins/mv-audiovisual-effects/#post-1423

So, say noramlly you have Actor 1's 1st face as your main character and then you change it to actor 1's 3rd face (1-3) with an event, as long as you have both saved properly after you change the actors face in an event the busts should load automatically?
That's a very nice plugin, and I may use it, so thank you.  But I don't think it's what I'm looking for.

Maybe I'm not explaining this well.  Say you want your player to be able to create his own character.  You give them the option of male/female, maybe some hair styles, etc.

Then you want to be able to use the character your player chose in dialogue with different facial expressions relative to the text.

One way of doing that would be to make a huge nested if-then set up where you repeat the dialogue over and over with each possible face.  But that should be unnecessary, and it's bad coding besides.

A better way would be to simply reference a variable which stores the appropriate character face and then from there choose the appropriate emotion.  Player face set 5 (the blond guy with elf ears), emotion sad.
The MoreEscapeCodes plugin (shipped with the preorder stuff and available in the JS Plugin Releases forum) does this for you.


You enter a code like \f[1,2] in a text box, and it will show the face at index 2 (which is the third face, as they start at 0), on the face set assigned to actor 1.


If your player can customize their own character and you use the Change Actor Images command to give the actor a different faceset, it will show whichever one you've chosen.
The MoreEscapeCodes plugin (shipped with the preorder stuff and available in the JS Plugin Releases forum) does this for you.

You enter a code like \f[1,2] in a text box, and it will show the face at index 2 (which is the third face, as they start at 0), on the face set assigned to actor 1.

If your player can customize their own character and you use the Change Actor Images command to give the actor a different faceset, it will show whichever one you've chosen.
Thanks for the heads up!  It took some trial and error to figure out how the plugin worked and where it needed to be in the plugin load order, but I've got a grip on it now, I think.

I did notice that if you don't initially specify that you are using a face in your Show Text box, and then use the \f command, it'll show words appearing on top of the actor's face.

Original thread: https://forums.rpgmakerweb.com/threads/dynamic-emotive-faces.49416/