Gender Scripting

Joined
Jul 29, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I want an rpg game where the player chooses to play as male or female. However, I am unsure how characters would refer to the character as male or female. For example, character's siblings talks about them (you the player) to other NPC; how do I make it where they refer to them as by your gender? For instance, "Where is my brother" if you-the player chooses as male or "Where is my sister" if you-the player chooses as female. What or how would a program look like?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,293
Reaction score
11,710
First Language
English
Primarily Uses
RMVXA
As far as I know there is the complicated way, and there is the easy way.


The complicated way would be to activate control switch #n if male is chosen and control switch#nn if female.  Then assign the term 'brother' and 'sister' to 2 variables.  Getting variables to accept strings instead of numbers is a bit tricky, but can be done.  Then in your event you would have to use a conditional branch - control switch #n ON.


In the dialogue in that branch where you want 'brother' to appear you type \V[n] where n = the number of the switch you have assigned.  In the branch where you want 'sister' to appear, you use the switch for that.


The easy way:


I assume that when the gender is chosen, so is a name.  Instead of using brother or sister, the sibling says "Have you seen Peter" or "Have you seen Jane".  To get that you type \N[n] which gives the name of the nth actor.  If the character has a gender neutral name which is common to both, then just use the name.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,034
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
I would just specify a series of variables - him/her, his/hers, brother/sister, he/she and use Control Variables to assign the correct value to each one depending on the choice (I'm pretty sure you can just type the text into the Script box, putting "" around it, to assign text to a variable).


Then in your dialogue, use the standard \v[#] and it should insert the contents of the variable.


Also, if you've set up two actors - one for the male and one for the female - you're doing it the hard way.  You should just have a single actor, and in addition to setting up the variables above, also use the Change Actor Name, Change Actor Graphics, Change Actor Class, etc commands to set up the single actor.  I provided a script that lets you put \f[1] into a message and it will use the actor's assigned face graphic, so you don't have to specify the face.  This means you can get out of heaps of conditional branches to show the face depending on who the player selected.
 
Last edited by a moderator:

SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
87
Reaction score
8
Primarily Uses
Since you're using Ace, Mr. Bubble's Gender Functions Script might also be useful in handling those conditions and give you some extra options to work with.
 

Arcmagik

Game Developer
Veteran
Joined
Sep 27, 2015
Messages
511
Reaction score
673
First Language
English
Primarily Uses
RMMV
I feel like using two actors is fundamentally easier to understand if you are new to the engine and events (as it doesn't require a bunch of extra knowledge) as you can set a condition branch for each actor or a event page for each version that checks for that actor being presence. That's absolutely all you need to do and then while writing dialogue you can copy it then switch terms around so your workload isn't doubled.


Are there more steamlined version? Clearly yes based on the above if you have some knowledge of how variables, scripts, or switches work. Pick your poison!
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

So I need to come up with quite a few action sequences.
Was stressing about this plugin earlier, but pretty happy with how its looking now! Purple makes it pop more too!! :)
A friend requested me to do a pfp for his twitch channel, so far he approved one of my sketches, so going to digital now. The style he's looking for is quite different from my usual, hopefully I can get it right... :kaoback:
I am so hyped! A new post update and im anxious to see reactions..eeeeeeee

Forum statistics

Threads
105,483
Messages
1,014,057
Members
137,127
Latest member
noicchi
Top