Coding for Gender-Interchangable Characters

In my story, MC can be non-binary, and there’s a character who can also be non-binary under certain conditions.

I use the *set mche “they” method.
Same with the other character: *set friendhe “they”

But when coding instances where was is used after ${friendhe} is just shows as “they was” in game.

Is there a way to code it to where was comes up as were in game?

You can use the multireplace command for that.

Create new variables like mcplural. Set it to true when the pronoun is “they”. You can then use multireplace to check if this variable is true or false and output the correct form.

*create mche "they"
*create mcplural true

${mche} @{mcplural were|was} a person.

If [mcplural] is true, the command will show “were” in the game. If the variable is set to false, it will instead display “was”.

@{variable if-true|if-false}
6 Likes

And I would just do the same for other words as well?

So to make it “they perk”, instead of “they perks“

${mche} @{mcplural perk|perks} up in bed.

And I just do it for all plural words after gender variables?

1 Like

Yep, that’s the idea. Alternatively, you can create variables for common conjugations. Depending on how often you are using conjugated verbs, you might find variables easier.

For example, you could create friend_s where friend_s = "s" when the friend is binary and friend_s = "" when the friend is non-binary.

Then, any time you use a verb that drops the s in the plural, you just write:

${friendhe} read${friend_s} and write${friend_s} every day.

I personally find this easier than multireplace if you have a ton of gender-variable NPCs.


More code examples:

4 Likes

Both options seem pretty easy, and I only have three gender variable characters, but MC and MC’s friend are always the same gender, and making MC’s non-binary brought up some coding issues I didn’t think would be an issue til I started playing out things myself

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.