Variable Question

This is probably silly and I have no doubt that I’m both over and under-thinking it and that is why I’ve been having this issue, but I’m curious.
The question; For people coding games where the pronouns and gender are varied based on user choice, how do you keep track of the grammar?
It’s been an issue for me, and while a lot of it has definitely been me messing up my own code (typing he or she instead of ${he} or ${she} etc. ) but the little grammar bits where ‘he’, ‘she’ and other gender options are not quite interchangeable is kicking my butt. Anyone have any tips on how they’ve managed that? It’s important to me to offer options for gender, but I really don’t want to mess it up.
The Price of Emeralds is my first big project like this so I’m a little stuck, I’ve gotten some advice, but I’ll take whatever I can get. Thanks in advance for any answers/ suggestions!

I suggest taking the approach author of A Tale of Heroes did in it what he has done is added a variable plural, now this helps in statements like “Yes, she is” which would come out as “Yes, they is”, which would be wrong, so in it, he has added a check like “Yes, ${he} @{plural are|is}”, now what happens is plural is set to true when they/them pronoun is selected, and then the following statement comes out as “Yes, they are”

I suggest taking a similar approach.


Search the term “gender pronouns” by using the magnifying glass icon at the top of the forum, and you will find many threads giving you lots of specific advice.


Ooh I like that idea, I’ll give it a try, I appreciate that.

1 Like

I’ll give that another shot, I might have just missed the solution I was looking for. It was close, but never quite right, I’ll give it another look, thank you !

1 Like

That plural tag sounds handy, that’s the simplest way I’ve seen they pronouns implemented. IIRC in the Odyssey CoG your gender is a number, so it was written more like this: @{she does|he does|they do}.

If you are using CSIDE, you can speed it up a little by writing the original text without the ${ } formatting, then highlighting that word and pressing CTRL + D or the equivalent, giving it a variable tag. So he becomes ${he}. Then again it might be easier to just find and replace the pronouns en masse xD

Something I’ve found helpful for my own writing is to use e pronouns in the code. This is just a suggestion–I know other methods work fine and some people may have trouble learning new pronouns. I personally like using e pronouns because it reminds myself that I’m writing a character who is not always male (so it helps counter any subconscious gender bias I may have). Another reason is because unlike she/he, the e pronoun set has no overlap, so you don’t need to write, like her_his or his_hers to distinguish between them. You can see the overlap here where her and his are used twice:

*comment female
*set opp_e "she"
*set opp_eir "her"
*set opp_em "her"
*set opp_eirs "hers"

*comment male
*set opp_e "he"
*set opp_eir "his"
*set opp_em "him"
*set opp_eirs "his"

@Kshatriya yes, moving forward I was planning on finding and replacing the variables afterwards to save time haha.
I think the e pronouns might be the best solution for me to keep things grammatically correct. I’m sweating over the idea of going back in and correcting this, but I think that’s the best option for me right now. Thank you so much!

That’s great! Glad I could help and good luck ^^

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.