If you only need small changes, then I wouldn't use conditional branches, because you'll have to write the same text twice every time you need to use male/female pronouns.
A plugin would be much better suited.
So I wrote one for you:
Code:
//=============================================================================
// GenderSpecificMessages
//=============================================================================
/*:
* @plugindesc Provides a method to easily make changes to messages depending on the player's gender.
* @author Nolonar
*
* @param Gender Switch ID
* @desc The ID of the Switch that defines the player's gender.
* @default 1
* @type number
*
*
* @help
* Adds the following control character:
* \x[male|female]
*
* Example
* "Hello, young \x[man|lady]! How are you today?"
*
* If switch is off -> Hello, young man! How are you today?
* If switch is on -> Hello, young lady! How are you today?
*/
(function() {
//=============================================================================
// Settings
//=============================================================================
var Parameters = PluginManager.parameters('GenderSpecificMessages');
var Param = {
GenderSwitchId: Number(Parameters['Gender Switch ID'])
}
var IsFemale = function() {
return $gameSwitches.value(Param.GenderSwitchId);
}
//=============================================================================
// Window_Base
//=============================================================================
var _Window_Base_convertEscapeCharacters = Window_Base.prototype.convertEscapeCharacters;
Window_Base.prototype.convertEscapeCharacters = function(text) {
text = _Window_Base_convertEscapeCharacters.call(this, text);
text = text.replace(/\x1bx\[(.*?)\|(.*?)\]/gi, function() {
return IsFemale() ? arguments[2] : arguments[1];
});
return text;
};
})();
How to install:
In your project's folder, there's a "js" folder. Inside, there's a "Plugins" folder with a couple of .js files.
Make a copy of one of the .js files. To do so, select a file (for instance "AltMenuScreen.js"), press Ctrl + C, then Ctrl + V, and the copy will appear (in this case "AltMenuScreen - copy.js").
Rename the copy into "GenderSpecificMessages.js".
Open the file in Notepad (or Notepad++). To do so, right-click on the file and click on "Edit" instead of "Open".
Replace the content of the file with the plugin code from above.
Open RMMV.
Open the Plugin Manager (click on the jigsaw icon, to the right of the Database).
There should already be 2 plugins. Click below the last plugin to select an empty row. Double-click the empty row.
Under "Name" select our plugin ("GenderSpecificMessages"), then click OK.
How to use:
1. You need a Switch that defines if the player is male or female (ON means female, OFF means male). If you want it to be the other way around (ON for male, OFF for female), then just modify the plugin, like this:
Code:
return IsFemale() ? arguments[1] : arguments[2];
Just find the line that looks very similar and replace it with this new one.
By default, the gender Switch is
Switch #0001. If you want to use a different switch, just change the plugin's setting. To do so, open the Plugin Manager, double-click on our plugin ("GenderSpecificMessages"), then double-click on "Gender Switch ID" on the right, then input another number.
2. When you write a message, you can insert "\x[male|female]" so RMMV will automatically select the right one.
For example:
Hello, young \x[boy|girl], how are you today?
Will change to
Hello, young boy, how are you today?
or
Hello, young girl, how are you today?
depending on whether the Switch is ON or OFF.
Important note:
If you need vastly different messages, like:
Male: "Who are you, man? Why are you looking at me like that?"
Female: "Hello, beautiful! Would you like to have a chat over tea?"
then you should use a Conditional Branch instead. The plugin is only for small differences.
Ah, before I forget...
Terms of use for the plugin:
Feel free to use it as you like for any RPG Maker project, commercial or non-commercial.
No need to mention me in the credits if you don't want to.
Feel free to modify the plugin as necessary.
You may redistribute the plugin if you like, as long as you don't change the "@author Nolonar" part or claim the plugin for your own.
You're not allowed to sell the plugin by itself or as part of a resource pack, but it's OK to sell RPG Maker games that use the plugin.