Non binary code

“Create a non binary option,” I thought. “How hard could it be?” I thought. Turns out, a lot harder than you’d think.

Giving the player the option of a male or female character is pretty straight-forward when it comes to coding. The only words you really need to change are; Man/Woman, Boy/Girl, Mr/Miss, He/She, His/Her, His/Hers, Him/Her. This gets a lot more complicated when you add a non binary option, since a lot of preposition words change when you switch “he/she” with “they”. (Ex: He is/They are. He does/They do.)

So, to try and make this easier, I have put together a code for anybody who wants to include a non-binary option in their game. I’ve used the non-binary form as the default since certain gender-specific words like “his” and “her” appear more than once in the code.

Words like “is/are” and “was/were” are included in the code and can be used like this:

Where {were} {they}?
I think {they} {are} alright.

The code includes a few basic preposition words. For the majority of preposition words though, the ending will have an “s” if the gender is male or female, and no “s” if the gender is non binary. (Ex: He likes/They like. He thinks/They think, etc.) For these words I have added ${s} as part of the code. It can be used like this:

{they} like{s} dogs.
{they} eat{s} cake.
{they} run{s} really fast.

There is also an “es” for things like:

{they} go{es} to the shops.
{they} do{es} a lot of knitting.
{they} reach{es} the finish line first.

If anybody can think of any other preposition words where the male/female variant doesn’t just have an “s” added to the end, let me know and I can update the script. :blush:

*title Gender Code
*author Avery_Moore
*scene_list
  startup

*create gender "unknown"
*create person "unknown"
*create Mx "unknown"
*create kid "unknown"
*create they "unknown"
*create their "unknown"
*create them "unknown"
*create theirs "unknown"
*create theyre "unknown"
*create are "unknown"
*create were "unknown"
*create theyve "unknown"
*create have "unknown"
*create s "unknown"
*create es "unknown"

*page_break

Choose your gender.

*choice
  #Male.
    *set gender "male"
    *set person "man"
    *set Mx "Mr"
    *set kid "boy"
    *set they "he"
    *set their "his"
    *set them "him"
    *set theirs "his"
    *set theyre "he's"
    *set are "is"
    *set were "was"
    *set theyve "he's"
    *set have "has"
    *set s "s"
    *set es "es"
    *goto gender

  #Female.
    *set gender "female"
    *set person "woman"
    *set Mx "Miss"
    *set kid "girl"
    *set they "she"
    *set their "her"
    *set them "her"
    *set theirs "hers"
    *set theyre "she's"
    *set are "is"
    *set were "was"
    *set theyve "she's"
    *set have "has"
    *set s "s"
    *set es "es"
    *goto gender

  #Non binary.
    *set gender "non binary"
    *set person "person"
    *set Mx "Mx"
    *set kid "kid"
    *set they "they"
    *set their "their"
    *set them "them"
    *set theirs "theirs"
    *set theyre "they're"
    *set are "are"
    *set were "were"
    *set theyve "they've"
    *set have "have"
    *set s ""
    *set es ""
    *goto gender

*label gender

You are a ${gender}. When people talk about you, they will say: "$!{they} ${are} a very nice ${person}. $!{they} ${have} a pet dog that ${they} love${s} very much."

Also, at the request of @Carlos.R, here is another version of the code that gives the player the option to choose their pronouns themself.


*title Gender Code
*author Avery_Moore
*scene_list
  startup

*create gender "unknown"
*create person "unknown"
*create Mx "unknown"
*create kid "unknown"
*create they "unknown"
*create their "unknown"
*create them "unknown"
*create theirs "unknown"
*create re "unknown"
*create are "unknown"
*create were "unknown"
*create ve "unknown"
*create have "unknown"
*create s "unknown"
*create es "unknown"

*page_break

Choose your gender.

*choice
  #Male.
    *set gender "male"
    *set person "man"
    *set Mx "Mr"
    *set kid "boy"
    *set they "he"
    *set their "his"
    *set them "him"
    *set theirs "his"
    *set re "'s"
    *set are "is"
    *set were "was"
    *set ve "'s"
    *set have "has"
    *set s "s"
    *set es "es"
    *goto gender

  #Female.
    *set gender "female"
    *set person "woman"
    *set Mx "Miss"
    *set kid "girl"
    *set they "she"
    *set their "her"
    *set them "her"
    *set theirs "hers"
    *set re "'s"
    *set are "is"
    *set were "was"
    *set ve "'s"
    *set have "has"
    *set s "s"
    *set es "es"
    *goto gender

  #Non binary.
    *set gender "non binary"
    *set person "person"
    *set Mx "Mx"
    *set kid "kid"
    *set they "they"
    *set their "their"
    *set them "them"
    *set theirs "theirs"
    *set re "'re"
    *set are "are"
    *set were "were"
    *set ve "'ve"
    *set have "have"
    *set s ""
    *set es ""
    *goto gender

  #I want to choose my pronouns myself.
    *set are "is"
    *set were "was"
    *set have "has"
    *set s "s"
    *set es "es"
    *set ve "'s"
    *set re "'s"

    Alright. What is your gender?
    *input_text gender
    *goto person

*label person

What would you like to be referred to: Man, Woman, Person or something else?

*input_text person
*goto Mx

*label Mx

What would you like to be referred to: Mr, Miss, Mx or something else?

*input_text Mx
*goto kid

*label kid

What would you like to be referred to: Boy, Girl, Kid or something else?

*input_text kid
*goto they

*label they

What pronoun would you prefer instead of He, She or They?

*input_text they
*goto their

*label their

What pronoun would you prefer instead of His, Her or Their?

*input_text their
*goto them

*label them

What pronoun would you prefer instead of Him, Her or Them?

*inout_text them
*goto theirs

*label theirs

What pronoun would you like to be referred to instead of His, Hers or Theirs?

*input_text theirs
*goto gender

*label gender

You are a ${gender}. When people talk about you, they will say: "$!{they} ${are} a very nice ${person}. $!{they} ${have} a pet dog that ${they} love${s} very much."
15 Likes

Why don’t you just code an optional “s” that you can copy-paste at the end of any verb that needs it for he/she but doesn’t need it for they? That way, you don’t have to create a variable for every possible verb?

(Also, I suspect that’s why neutral pronouns are so popular in the Choice community. Zhe, Zher, etc is way easier to code for than “they”.)

3 Likes

Never actually heard of the “Zhe” pronoun before. Will have to look into that.

The optional “s” is a stroke of genius though. I never would’ve thought of that and it makes things so much simpler. Thanks @DJ_Harshman! :blush:

1 Like

It would be neat if you could include a “No, that’s not right. I’ll tell you what my pronouns are.” option, and then have a series of input_text commands that would give the player the pronoun in a sentence, then ask how they would change it.

3 Likes

That’s possible, but sounds like it could get very complicated, considering the person would have to create a different pronoun for every word on the list.

You forgot what Wikipedia terms the “reflexive” pronouns: herself, himself, and themselves.

Also, while a write-in gender and pronoun set is fairly long, it’s not quite as long as you may be worried.

Yes, you will need to ask your players for the name of their gender, the common title used with their gender, what an individual adult and child of their gender will be called, and their five personal pronouns…

…but the rest of the variables can be automatically generated from the players’ previous inputs and a simple *choice or *fake_choice using concatenation.

Perhaps something like this...
Some people prefer to use "is" and "was" forms of "to be" with their pronouns, while others prefer "are" and "were" forms.

You prefer...
*choice
  #"Is" and "was" forms.
    *set theyre they&"'s"
    *set they_are they&" is"
    *set are_they "is "&they
    *set they_were they&" was"
    *set were_they "was "&they
    *set theyve they&"'s"
    *set they_have they&" has"
    *set have_they "has "&they
    *set s1 "s"
    *set s2 "es"
    *goto gender

  #"Are" and "were" forms.
    *set theyre they&"'re"
    *set they_are they&" are"
    *set are_they "are "&they
    *set they_were they&" were"
    *set were_they "were "&they
    *set theyve they&"'ve"
    *set they_have they&" have"
    *set have_they "have "&they
    *set s1 ""
    *set s2 ""
    *goto gender

Technically speaking, you would only really need to use concatenation to generate contractions such as “they’re” or “she’s.” If you created variables to store “is/are” and “was/were” on their own, you could ditch all the they_are and are_they phrase variables. Then just call for two-variable combinations like ${is} ${they} or ${they} ${is} when needed.

That would simplify your variables a little bit...
*choice
  #"Is" and "was" forms.
    *set theyre they&"'s"
    *set theyve they&"'s"
    *set are "is"
    *set were "was"
    *set have "has"
    *set s1 "s"
    *set s2 "es"
    *goto gender

  #"Are and "were" forms.
    *set theyre they&"'re"
    *set theyve they&"'ve"
    *set are "are"
    *set were "were"
    *set have "have"
    *set s1 ""
    *set s2 ""
    *goto gender

You may also note I renamed your s variable to s1 and created an s2 to contain “es,” so that “go” and “do” can become “goes” and “does” instead of “gos” or “dos.”

1 Like

That’s actually not a problem, since the “self” is singular. If the character were non binary, they would be referred to as “themself.” It’s not technically a real word in the English language, but I’ve looked into it, and it does seem to be considered the correct term when referring to a person of an unspecified gender. Ex: “An individual who enters the maze will find themself lost in seconds.”

Awh, that’s true! Thanks for the advice, I’ll go change that now. :blush:

1 Like

Actually, it’s not that complicated if you use the masculine/feminine preposition endings as the default. I’ll add one. :blush:

I use the pronoun ze as it’s much easier to code than they.

2 Likes

Thanks for this! I’m trying to get more inclusive in every facet of my life, including coding.

The protagonist in my Tin Man Games “Choices” stories is never addressed by name or referred to by gender. It’s hard, but not as hard as you might think. I might do something similar in my next CS game, but still record preferences and just use them once or twice in the text. Or use the above code.

wanders off muttering

6 Likes

Not referring to the MC’s gender is always an option and I’ve seen a few games that do this really well. The trouble I find with games like this though is that, even when the writer never refers to the character’s gender, a lot of people playing the game just assume that the character is a default male. :yum:

It might work if I still gave the player all the choices, and a teensy bit of individual text, and then carried on but kept pronouns out of the way.

I suspect this will result in me having to rewrite a bunch of stuff from scratch, which is certainly a down side.

1 Like

I don’t think you’d need to change much, so long as there’s something in the story that lets the player know that their gender isn’t predetermined. It could be something as simple as a fake choice at the beginning where the player gets to choose their gender, but the choice doesn’t really affect anything and their gender isn’t really referred to much throughout the rest of the game. :blush:

2 Likes

Unfortunately, a lot of users don’t seem to understand it when you don’t let them choose their gender. I still get complaints about Vampire, with people asking “how do I pick my gender” or “I don’t understand, am I a boy or a girl?”

It was even more striking with Congresswolf, where you can pick a name, but your gender is never referred to, and customers wrote in, furious, that they “had” to be one gender or the other (as they perceived it).

5 Likes

OK, then in that case the “choose your own” pronouns thing should (hopefully) be well received…?

Lynnea Glaser wrote here about how she did it in Sea Eternal:

Scroll down to, Allowing for the pronoun “they”

7 Likes

Ha, but, the player does choose their gender in Vampire! Is the bow/curtsy choice really so obscure?

1 Like

For people who don’t speak English as their native language it can be.

1 Like

Thought I’d update this thread to note that the multireplace function now allows us to do this without creating as many variables.

I think the {s} and {es} variables may still be the most efficient way of handling most verbs (plus possibly the {ve} and {re} that Lynnea Glasser used)… but for the long tail of irregular ones, multireplace is probably simpler and clearer than creating a new variable for each one.

I’ve offered a suggestion over at the wiki on how it could be done. Happy to take suggestions for edits to the wiki!

8 Likes

Thanks for posting this @Avery_Moore. I was avoiding the whole thing for a while, but I realised it is probably best to learn this early and include it in my code from the start rather than attempting to add it later.

1 Like