How to display a dialouge image depending on who's in the party?

For example I wish to have the text "123" show up, and the image besides it change depending on who's in the party and in which position. If the rogue is in front, his actor image will appear besides the text. If the healer is in front, her actor image will appear besides the text. Is there any way to do this? Preferably, is there any way to do this without plugins and scripts only?
can you make a sketch/image what you exacly mean?
because if you have max 4 and only 2 members at first, you might be
able to do this easely with scriptcall inside a conditional branche.

but it's better from an image from what you exacly want to achieve to give
a better solution to your problem.
can you make a sketch/image what you exacly mean?
because if you have max 4 and only 2 members at first, you might be
able to do this easely with scriptcall inside a conditional branche.

but it's better from an image from what you exacly want to achieve to give
a better solution to your problem.
1599992636550.png
1599992767887.png

This is a sample, as you can see Harold is in the first party slot, and therefore his image appears next to the reply.
I want that whoever is in the first slot speaks. So for example if Lucius is in the first spot he will say "Hi!" instead.
1599992898382.png
1599992930199.png

Basically I want the actor in a certain slot in the party to say certain dialouge. Eg. at times I want the first character in the party formation to talk.
Problem with conditional branches is that there are plenty of actors in the game, out of which you can take any 4. So there would be way too many conditional branches. (+ the fact that I am not sure if conditional branches can check party formation)
yanfly's message core,For example, enter the text box like this
\n<\c[6]\n[1]\c[0]>\af[1]
This will display the name and face of the first actor in the team, and the color of the name
there are two ways to do this, but the easier one is to use one of the messaging systems that provide text codes for this. It doesn't have to be Yanfly's, there are others around that do the same.

Doing this without plugins would require a lot of conditional branches where you check with control variable which actor is where in the party - not recommended.
yanfly's message core,For example, enter the text box like this
\n<\c[6]\n[1]\c[0]>\af[1]
This will display the name and face of the first actor in the team, and the color of the name
Thank you! This was exactly what I needed!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-display-a-dialouge-image-depending-on-whos-in-the-party.127281/