*if gay/Lesbian coding issue


#21

I would strongly disagree with this. Partly because it would make it very difficult to deal with non-binary MCs (and even if you’re not including non-binary MCs now, it will make it harder to introduce them later), but also because it’s non-intuitive. Male is not the “true” gender, and female is not “false”, so it’s not going to be as obvious for you to remember which way round you put them. (Plus, writing ${gender} is quicker and more intuitive than writing @{gender male | female } every single time.)

You could use a pair of booleans instead: male and female, which is both intuitive, and allows for non-binary genders, too, although it makes sense to have pronouns and other common gender-varying words as their own variables.


#22

False for female because they both start with F.

For non-binary it becomes a lot more complicated but perhaps it’s worthwhile to limit the complexity the first time around, just to get a hang of the system and its quirks.

Though instead of having two sets of variables, you could have gender represented on a numerical system:

1: non-binary
2: female
3: male
4: female-to-male
5: male-to-female
6: female-to-male pre op
7: male-to-female pre op

(note that this obviously isn’t a ranked system!)

And then you use something based off the following code to represent it:

@{gender+1 |a person|a woman|a man|a transgendered man|a transgendered woman|a woman with gender dysphoria|a man with gender dysphoria}

(I’m sure at least one of those is wrong)

Or however many permutations you can reasonably manage while telling a satisfying story.

Oh one more thing: I’ve found personally that using @{} is so much easier than having a billion different pronoun replacement variables. Instead of filling my code with {xhe} and {xheself} and {xis} and {xer} and {xers} and {xperson} and ${xbodyparts} for every possible situation where a gender-distinct word might come up, I can just do it on a case by case basis.

${xhe} kicked ${xheself} in ${xer} ${xbodyparts} just looks super ugly and intricate to me, unfortunately, compared to @{gender+1 |He kicked himself in his balls|etc...} Especially considering I can make small modifications based on the context of the player’s choice of self-representation, or even omit certain aspects entirely this way. But I suppose it’s just personal preference.

Oh and I thought of another benefit! Sorry I’ve edited this post like half a dozen times. Some characters might use different words to reflect their own prejudices, world views, or general assumptions – a stranger might just stick with the character’s outward gender, for example, meaning they wouldn’t use the whole range of pronouns until they get to the know the character a bit better. It’s a lot easier to represent different characters’ perceptions using multireplace!

Since this got away from me, here’s another solution to OP’s specific problem, assuming that just have man/woman and straight/gay as their options:

if (gender = "female")
  if (preference = "women") *goto gayfemale
  if (preference = "men") *goto straightfemale
else
  if (preference = "women") *goto straightmale
  if (preference = "men") *goto gaymale

Another way, less succinct but still valid:

if ((gender = "female") and (preference = "women"))
  *goto gayfemale
elseif ((gender = "female") and (preference = "men"))
  *goto straightfemale
elseif ((gender = "male") and (preference = "women"))
  *goto straightmale
else
  *goto gaymale

#23

Although not an expert, it seems a lot easier (to me) to use gender = male/female (strings) instead of “true” being male, false female.

For one, you can then do ${gender}, and 2 if you finish something halfway when you get back to it later you’ll know what you meant

But that’s just my opinion-- I prefer to use as much stuff in English as I can (although perhaps that stems from copying/ seeing friend’s python code with stupidly named variables that you have no clue what they hold or are needed for.


#24

Well, that’s certainly more inclusive, but it would be far easier to just have a set of variables like ${gender} than using @{gender+1 |a person|a woman|a man|a transgendered man|a transgendered woman|a woman with gender dysphoria|a man with gender dysphoria} every single time you need to use it. (Also, a transgender man or woman is still a transgender man or woman, even pre-op. And I probably wouldn’t use the gender variable to store whether someone is transgender or not; that could easily be kept in another variable, and shouldn’t need to be used every time you bring up the MC’s gender.)


#25

What’s “easiest” in terms of naming variables is what’s most intuitive for the programmer creating the game.


#26

Thanks SOOoooo muchhhh allllll of you!!!

This helped/did the trick!! I can now carry on with my story and I’m sooo thankful!!! Soo many nice tips too xD :+1:t3:


#27

I don’t follow why variables like {xhe} and {xheself} would be needed.

I use {pronoun} and {pos_pronoun} (for possessive pronoun). When the player sets their gender, I set {pronoun} to he, she, ze, or let the player type one in. I set {pos_pronoun} to his, her, zir, or let the player type one in. Then when I’m writing, I just do, say,

$!{pronoun} picked up the tomato.

"That is ${pos_pronoun} tomato!" the dragon said.

And you could easily add more variables for other forms. Each one will automatically be correct based on what the player chose at the beginning. I don’t need to do a separate variable for every individual pronoun, and I don’t quite understand how that would work.


#28

They’re the same variables, they’re just given names that make the code more readable.


#29

Ohhh, so you think he means that he would use {xheself} as a variable that could stand for himself, herself, etc? That makes more sense. I thought he meant he would have {xheself}, {himself}, {herself}, etc.


#30

Well, Hazel’s absolutely right that different programmers will find different things intuitive. For my part, I wanted something as short to type as possible; some of the options that other people find intuitive, like “pos_pronoun” and “hisher” weren’t appealing to me because I’d go crazy after typing them out a few hundred times. (To say nothing of “@{gender+1 |a person|a woman|a man|a transgendered man|a transgendered woman…}” I’m sure multireplace has its virtues, but that’s exactly the kind of thing that has me scratching my head and asking “Doesn’t that just make it a lot longer and no clearer?”).

I went for variables named for pronouns, using masculine ones because of the clear him/his distinction, and added one letter to differentiate between other characters of variable gender.

So the MC’s variables are he/him/his etc.; variables for characters of the MC’s (first) preferred gender are xhe/xhis/xhim etc.; variables for the second preferred (if bi) or non-preferred (if not bi) gender are zhe/zhis/zhim. Which yields code like

$!{zhe} said to ${xhim}, "What about ${his} opinion?"

Edit: and "{him}self" works fine--I don't think there should be a need for a separate {himself} variable?


#31

Assuming we’re all right about Will’s intent, I was misunderstanding how he was using variables at all. Totally makes sense to use whatever variable names you want, and shorter ones do indeed sound nice.


#32

Yep, xheself as a variable could have any of the following strings as values:

  • himself
  • herself
  • themself
  • themselves
  • itself
  • xheself

#33

Ah, right–sorry for overlooking themselves as an option.


#34

Why don’t we have much hivemind representation? Where are our stories about those who identify as a Collective?!


#35

I’ll be honest, I just copied Avery Moore’s code from here, the first time I tried writing a CS game. I spent more time play-testing it to ensure it ran smoothly, than directly auditing the code. I know, I know. Skipping code review? Bad programmer, no cookie for you!

I tried using variable names that reference the strict grammatical roles of each pronoun, but that was more in hopes that I could finally remember all their names. It failed.