Change Actor Graphic text?

DeadlyElixir

Villager
Member
Joined
Apr 19, 2015
Messages
13
Reaction score
0
First Language
English
Primarily Uses
So I've been searching YT and etc or the past 30-45 minutes trying to find the answer to my exact issue. So make sure you read this whole thing 

I am sure it's there but so far I can't get that right answer, just a lot of the same stuff which ALMOST answers it.

Here we go. Making first game- a trial run kinda thing. 5 minute game play tops but since I'm new and learning the ropes its been over 24hrs of work -_-;

Finally about to finish. All that's left is the make a "The End" screen thingy

and the issue in this post.

So I want the basic choice or boy or girl.

I have that down.

I want to let the player input their name.

I have that down.

Here is the issue.

I made the whole game first before doing the character creation section, though I doubt that matters.

I used the actor 1 male default aka Eric for all the talking parts.

Which is fine if the player is male. but if they pick the female aka Natalie, it still shows the Eric profile



Note: The "thank" thing is just for testing :p

I am using the Change Actor Graphic after the player picks their sex but it still shows the Eric graphic when speaking.

I am sure that its a easy fix and I'm just not seeing it.

 

GuiltyAxer

The Pseudo Bilingual
Member
Joined
Apr 1, 2015
Messages
4
Reaction score
0
First Language
French
Primarily Uses
So....firstly : Hello!~

My question is : The starting Hero is Erik?

If that's the case then, I thin kthe probelm is that when you select "Female" your changing Natalie's graphic....You should change Eric's graphics.....

Oh forget it, that's for the menu!

For the face in the message box, it's in the event that you select the face that will be showed with the text, it doesn't have anything to do with the graphics of character x.

I hope I made clear, sorry for bad english ^w^
 

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
in boy/girl choice event, have it also include switches, one which turns on if the play chooses Boy (Boy Switch), and one for the Girl (Girl Switch.)

For you dialogue, you'll have to create a conditional branch. If Boy Switch is On, use the Eric dialogue. If Girl Switch is On, use Natalie dialogue.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Unfortunately there is no easy fix, because the face selected in the text box has nothing to do with the actors. It will always display the picture you (as the developer) choose, independently of which actor the player has choosen - that's why you'll need conditional branches and different show text commands to change the face.

There is one alternative - but it will still require you to rewrite every show text command: both messaging scripts (from Yanfly and from Modern Algebra) add new text codes into the engine, and one of those text codes is the code for displaying the face of a party member instead of the regular fixed face.

Using one of those scripts you can simplify the work by adding the text code for the party leader to the beginning of all text commands and you won't need the conditional branches/double commands.

Both messaging scripts can be found on the master script list.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
So make sure you read this whole thing
lol! It would have been a lot easier to do that if you hadn't surrounded it by all the unnecessary "fluff". "I let the player choose boy or girl, use Change Actor Graphic, but the text boxes still show the boy's face" is really all we needed to know from that in-depth post ;)

Anyhow, I wrote a script for it. Put it in a new script slot. In your dialogue, don't use faces at all - leave them blank. Then add \F[1] at the start of your text, and it'll show the face assigned to actor 1.

This requires that your Change Actor Graphic changes both the sprite AND the face.

Code:
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  endend
 

DeadlyElixir

Villager
Member
Joined
Apr 19, 2015
Messages
13
Reaction score
0
First Language
English
Primarily Uses
lol! It would have been a lot easier to do that if you hadn't surrounded it by all the unnecessary "fluff". "I let the player choose boy or girl, use Change Actor Graphic, but the text boxes still show the boy's face" is really all we needed to know from that in-depth post ;)

Anyhow, I wrote a script for it. Put it in a new script slot. In your dialogue, don't use faces at all - leave them blank. Then add \F[1] at the start of your text, and it'll show the face assigned to actor 1.

This requires that your Change Actor Graphic changes both the sprite AND the face.

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 endend
I would have but every post ive seen is always "give more detail" so w/e

Can I add that script in lite?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
I would have but every post ive seen is always "give more detail" so w/e

Can I add that script in lite?
Unfortunately, no - that is one of the limitations of Lite, that no scripts can be added.

If you're working with Lite, you'll have no choice but remake all ingame messages with conditional branches depending on which actor was choosen.

And about details: We need to know what you've done before we can help you, but I admit that if you are new to the engine, you'll have problems knowing which information is vital and which not.

By the way: I think you misunderstood the change actor graphic command, because your use of that command sets the graphic to the default and thereby does nothing.

To use the change actor graphic command, you

1) select which actor should get new graphics - the command window will then display the current pictures for that actor

2) doubleclick on the pictures to select a different picture to change to
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yeah, sorry - you didn't state you were using Lite.


You could either use conditional branches around each Show Text, with one version showing the male and the other showing the female, or you could duplicate your event pages and have one for the male and one for the female, conditioning the higher numbered page by a switch. In both cases, you would need to set a switch when the player chose, so you'd know which one to display each time.
 

Vanderdoody

Warper
Member
Joined
Jul 19, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
I'm using Ace. I followed the direction and I'm getting a syntax error.


I created a new script titled "Face" under "▼ Materials" because it said to add scripts there. I pasted the text in there.

syntaxerror.jpg
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
@Vanderdoody: Syntaxerror means that you made a mistake on copying the script - something is either missing or too much, throwing the engine off.


I suggest you follow the link "how to use a script" in my signature, that explains the common errors when copying scripts and how to prevent them.


In your case however, it looks as if you're missing a new line - the "alias" should be at a new line and not in the same line as the class definition.
 

Vanderdoody

Warper
Member
Joined
Jul 19, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
I copied it directly from this thread. So I guess either it's displaying incorrectly in my browser or it was written incorrectly.


I broke it up where it seemed to make sense and it appears to be working now, though.
Thanks!
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
No, the forum update broke the code tag for older topics, that's why it isn't displayed correctly.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top