Finished Sample Code for Multiple Pronoun Sets ("She/They, "He/They," etc) for the Player Character

Hi all! I’ve written some sample code that allows the player character to use multiple sets of pronouns interchangeably, (for example, “she/they” or “he/they” pronouns), as well as multiple custom sets of pronouns input by the player. Feel free to use and modify in your own games as you see fit.

You can find a playable version here, and the full text of the sample code here.

This functions as an expansion on @HannahPS’s very excellent pronoun sample code. With a few additional variables added to Hannah’s pronoun setup, the same in-game code can accommodate several sets of pronouns with very little extra effort on the dev’s part.

For example, the in-game text:

“Of course ${pc_he2} do@{pc_singular2 es|}. I can even get ${pc_him} in for free.”

Will produce this for players who selected she/her pronouns:

“Of course she does. I can even get her in for free.”

And this for players who selected she/they pronouns:

“Of course they do. I can even get her in for free.”

And that’s it! Pretty simple.

With a little copy/paste, the same ideas can also be used to add as many pronoun sets as you want (for example, this more complex sample code for three sets of pronouns, playable here).

Thanks also to everyone who offered suggestions on my other post. Anyone who’s interested in other possible ways of simplifying or modifying the code can check out the comments and suggestions there.