How do I have a faceset image change in the middle of the game?

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
93
Reaction score
6
First Language
English
Primarily Uses
RMMZ
Is there a way to replace an entire faceset with another? So if you wanted to change the gender of a character it would use a different faceset but keep the same messages?

Thank you.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,372
Reaction score
8,395
First Language
German
Primarily Uses
RMMV
yes and no.

you can change the images of an actor with the event command, but that does not affect the show text commands.

however there are some message plugins that add new textcodes to the engine, and those often include commands like "use face of actor n".
If you look to find one such plugin with that command and have your show text commands use that instead of manually setting the face, then any change done to the actor face will automatically appear in the text windows.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,713
Reaction score
2,830
First Language
English
Primarily Uses
RMMZ
Actors have a setFaceImage function you can call to do this. It takes two parameters: the filename and the index.

So

$gameActors.actor(1).setFaceImage("Actor4", 7) will change actor 1's face image to the 8th face in the graphic Actor4.png.

Edit: as Andar said, you would need to use a plugin that allows you to show the face of a particular party member rather than a specific one. Otherwise you'd need a conditional branch that differentiates the actor's gender some other way.
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
93
Reaction score
6
First Language
English
Primarily Uses
RMMZ
Actors have a setFaceImage function you can call to do this. It takes two parameters: the filename and the index.

So

$gameActors.actor(1).setFaceImage("Actor4", 7) will change actor 1's face image to the 8th face in the graphic Actor4.png.

Edit: as Andar said, you would need to use a plugin that allows you to show the face of a particular party member rather than a specific one. Otherwise you'd need a conditional branch that differentiates the actor's gender some other way.
Will that just change the actors face in menu's or the message face? Because I'm struggling to understand sorry if it changes message face.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,713
Reaction score
2,830
First Language
English
Primarily Uses
RMMZ
Will that just change the actors face in menu's or the message face? Because I'm struggling to understand sorry if it changes message face.
So by default, in a message, the face graphic used is simply whichever one you chose in the "Show Message" command. It has no link to a particular character if you use it like that.

Some plugins, like VisuStella's Message Core, let you put text codes in messages that override this and use the face graphic of a particular actor or party member.

The code I gave you will change the actor's face in the menu, but won't affect any messages you've specified a graphic for. UNLESS you're using one of those plugins, in which case if you were showing an actor/party member face it'll change in the messages too.
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
93
Reaction score
6
First Language
English
Primarily Uses
RMMZ
So by default, in a message, the face graphic used is simply whichever one you chose in the "Show Message" command. It has no link to a particular character if you use it like that.

Some plugins, like VisuStella's Message Core, let you put text codes in messages that override this and use the face graphic of a particular actor or party member.

The code I gave you will change the actor's face in the menu, but won't affect any messages you've specified a graphic for. UNLESS you're using one of those plugins, in which case if you were showing an actor/party member face it'll change in the messages too.

Ah thank you! I will have a look at that plugin. I appreciate the help!
 

Latest Threads

Latest Profile Posts

Did you know that 90% of people in the world use the number in their sentence as they see fit?
It's been a long time since I was here but I have a lot of updates... btw I am teaching again about game programming and game design in some schools here in Brazil hahahaha It's good to see kids and teens learning this kind of thing!
welp, I literally can't continue working on ALEX now that my MZ trial is up (unless I somehow place in the jam which I don't remotely deserve to for my unfinished crap) so I am back on my bullshit
some test stuff. Empty for now. My other project (this project) needs more attention. The lagging really kicks up when I try to capture gameplay. ✨

Forum statistics

Threads
113,887
Messages
1,078,214
Members
147,980
Latest member
gpc_826
Top