Different Faces for different genders?

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
So, basically I'm looking for a script that can let you select a faceset for one gender's messages, but if a different one has been selected (Based off of a switch) then the game will take the same index from another faceset (Because of emotions in the same faceset)

This will stop you from having to put a Conditional Branch every time the player speaks.

For example, say your 2 gender facesets are Hero_M and Hero_F. When you select say number 3 on Hero_M, if the Switch "Is Female?" is on, then the game would display face number 3 from Hero_F instead.

I hope I made that clear enough. If you're not sure about what i'm talking about, then feel free to ask! :)
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Well you can easily make a script that reads input off a character and a variable like gender.  Let's brainstorm this together as I am also new to coding and this will help me grow a bit while others tell me I am wrong/correct me.  Feel free to disregard if a more experienced person comes along =3

@actor_portrait.bitmap = Bitmap.new("Graphics/Pictures/" + @actor.name + "-N1.png")  

Should your face set be in the regular folder and not be a portrait it will be 

@actor_portrait.bitmap = Bitmap.new("Graphics/Faces/" + @actor.name + "-N.png")

This method will be easier if you don't intend to use full busts/portaits.

Where N would be F and M for male and female respectively and 1 is the corresponding first emotion or default for the set of 8. (0-7 by the editor standards in event window).  This will require an index in the script.  I think this can be done by a variable and inputed directly upon character creations so set a variable like:

If male Variable 001 = M

Otherwise Variable 001 =F

You can also use a switch, but I think a variable will allow you to assign the faces separated by gender more easily in file names.

If you are using the method for busts it will be a bit more work than setting a variable since they aren't all attached.

So the script would need that variable, I choose 1 arbitrarily:

$game_variables[001]

@actor_portrait.bitmap = Bitmap.new("Graphics/Pictures/" + @actor.name + "$game_variables[001]"1.png")

And you'd need an index of the emotions used:

$game_variables[$1.to_i]

So it will need to read i where that is the number of the emotion you want to use.

@actor_portrait.bitmap = Bitmap.new("Graphics/Pictures/" + @actor.name + "$game_variables[001]"i".png")

Where i, the index is 1 -8 here for portraits, or for faces 0-7.

I also think you will require a script call when you want to use the appropriate emotion, so you may end up putting in as much work for this method with a lot of copying and pasting script calls.

I hope this will a bit helpful to get you thinking to work involved.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
I think Trivel did a gender script but honestly I want to see what you and palladin come up with now. :p
 

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
Hmm.. yes. I was thinking that the script would detect when you were using either Hero_M or Hero_F, and then change it based on that, so I could effortlessy select the right emotion, without worrying about the gender.

Yes, now that I think about it, you would find the point where the Face is drawn, then if it's Hero_M or Hero_F, you intercept it, and replace it woth something like "Hero_" + $Gender, which would be set to F or M.

Also,

So the script would need that variable, I choose 1 arbitrarily:
$game_variables[001]
When using $game_variables, you don't have leading zeros because it's an array (Correct me if i'm wrong.

Edit:

I've found a few gender scripts, but none of them seem to have this function.
 
Last edited by a moderator:

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
Thanks. That script with the following message code works:
\f{"Hero_#{$Gender}":n}

Edit:
Sorry, wasn't thinking straight yesterday. I don't think that would work.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top