How to show face on message based on current actor ?

So , i created a char selection at the beginner with simple method. using add & remove party, player choose male add actor 1 & female add actor 2 remove actor 1.

the problem is, i using yanfly message core. in the show text menu there is a option to insert face, how i make that to adjust based on selected actor?. or maybe there is better method than using yanfly to show the image & solve the issue?
1726240101104.png


You can use that to show the face of party member 1, whoever the first actor in the party is. There's also an escape code for the name of party members.
I use Yanfly's Message Core. A lot of text messages in my game start with "\pf[1]\n<\P[1]>" which shows the picture of the first party member (the party leader) and does a name box with their name. Very useful if you don't know which actors are in the party at any particular time during play. Otherwise you have to check whether a particular actor (who may not have been selected by the player, or who may be currently dead) is in the party, by using a conditional branch.

There are also codes to show the face and name of a particular actor, which are useful occasionally.

Yanfly's Message Core has quite a lot of other useful features as well.
You can also use Yanfly's Message Macros to create your own shorter escape code to stick at the front of everything (I use \player ).

There's also HimeWorks' Placeholder Message Faces. You might also note, there's no real reason to have separate actors for the male and female protagonist. You can use event commands to change the images as necessary.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-show-face-on-message-based-on-current-actor.171868/