How to change face graphic?

I know how to change the face graphic, but for my game, I let the player choose between being a boy and a girl. What is the easiest way to have their correct face show up in dialogue?
I would recommend using Yanfly's message system script there is a text code in there that should achieve what you are looking for.
The easiest way would be do one girl and one boy in your database and switch them in the first choice. That way you spare a lot of scripts and eventing. 😉
For later you can make:

if Switch 1 is on = girlif Switch 1 is off = boyThat way you only need 1 switch and two actors. The rest you do regular, as if you only have one actor. 🙂 (\s/)
Shaz gave me this wonderful script snippet awhile back to call a face by actor id number.  Insert somewhere above Main.  Use \F[#] where # is the Actor ID number to call.

Example:

If Actor 1 has been given a player choice to change faces, you can call this chosen face by putting \F[1] At the start of the text box and leaving the face part as "None".

# Show Actor Face (by Shaz)

class Window_Base < Window

  alias shaz_ffa_convert_escape_characters convert_escape_characters

  def convert_escape_characters(text)

    result = shaz_ffa_convert_escape_characters(text)

    result.gsub!(/\eF\[(\d+)\]/i) {

      $game_message.face_name = $game_actors[$1.to_i].face_name

      $game_message.face_index = $game_actors[$1.to_i].face_index

      ''

    }

    result

  end

end

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-face-graphic.41154/