Help with npc gender and stat

I need help in setting the gender of the companion for my game.

In the beginning, you get to pick if you want your companion to be male or female. Right now, I resort to writing two different labels for each gender, but I wonder if there is a simpler way to do it. The stats screen is pretty messed up as well, because both gender appear even if the npc’s gender is chosen.

Nghmmmmm
If the player picks different companion, will the story path they take be totally different?

If not, you can resort to ${variable} method to simply interchange our companion pronouns.

The basic ${he}, ${his}, ${him} is usually what is done by us.

Indeed. To expand on this:

create a variable representing the NPC … such as: *create npc_one in your startup

Then set that variable as 0 if male or 1 if female or 2 if non-binary in the story

Then use ${npc_one_heshethey} and so forth.

Details are in the wiki if you like that or you can find tutorials that will take you step by step through examples in: Master-List Links For Beginners

2 Likes

@Szaal @Eiwynn alright, thanks for the answer. I’ll try using variables.

2 Likes

When you thought about it, it’s actually quite simple, isn’t it? :wink:

Depends whether the character is the same person just genderflipped, or whether they’re different characters. For the first one, like the others have said, you can create pronoun variables and I’d also throw in a name variable (so when you put ${j_name} in the code it would show ‘John’ or ‘Jane’ or whatever) and one to show ‘man’/‘woman’/‘person’.

For the second, same as above, because you can use that for when the dialogue/action is generic enough to be used for either. When you need something more personalised to the character you can use *if statements to show one scene for one character and one for another.

4 Likes

Ah, no! You mentioned the names of the NPCs that I just write :laughing:

Coincidence?

1 Like

so what does the code look like in startup?

*create ${ChrisClara} " "
*create ${himher} " "
*create ${heshe} " "
*create ${hisher} " "

like this? so do i write the scene like:

-player choose to pick male friend-
*set ${ChristClara} “Chris”
*set ${himher} “him”
${heshe} “he”
${hisher} “his”
-a scene in the game-
${ChrisClara} reach for ${hisher} weapon and get ready. You stand behind ${himher}. ${heshe} looks at you and smile.

Is this how it works?

2 Likes

Allrighty, time to go nerd mode. :eyeglasses:

on your -player pick a male friend- part, you don’t need to put the ${} sign.
And you forgot *set on both he/his

-player choose to pick male friend-
*set ChristClara "Chris"
*set himher "him"
*set heshe "he"
*set hisher "his"

But other than that, it looks fine.


However, if you like, there’s a small QoL you can do to help you write easier.

Instead of :x:

Use :ballot_box_with_check:

*create chris ""
*create he ""
*create his ""
*create her ""

That way, your code would be waaaay much shorter (and easier to read, author-side)

1 Like

That’s the basics.

The list is long, the more interchangeable words you think of :slight_smile:

I personally like using ${Chris_hisher} etc. when coding because its easier for me to keep in mind with the prose that its an actual variable. ymmv.

3 Likes

You don’t need the dollar signs and brackets in the create part, that’s just for displaying variables.
It should be:
*create chrisclara “Chris”

4 Likes

oh… right!
How come I didn’t catch that silly one!
*rush back to the old comment

1 Like

‘hisher’ is a reasonable choice because, quirks of the English language:

She gave the ball to her. It’s her ball.
He gave the ball to him. It’s his ball.

The he/her pronouns don’t change their format in the same place.

He / she / they
Him / her / them
His / her / their
His / hers / theirs

For enthusiastic grammarians

For this reason, and also for preserving gender neutrality, I like to use grammar code. :D chrisnom(inative), chrisobl(ique), chrisdet(erminer possessive), chrispos(ssesive), chrisref(lexive).

Then you get something like ${chrisnom} gave the ball to ${jessobl}. It's ${jessdet} ball. That parses to (let’s say Chris is she and Jess is he): ‘He gave the ball to her. It’s her ball.’

Grammar. <3

5 Likes

Wait, what?
There’s

this?

1 Like

‘His’ and ‘her’ can be used in the same way, or ‘his’ can correspond with ‘hers’.

Same for ‘her’, it can be the same as ‘him’ or ‘his’, depending.

In other words, ‘his’ does not always equal ‘hers’.

It’s her pencil / It’s his pencil

BUT

The pencil is his / The pencil is hers

And so forth. I know it’s muddling; sorry. XD

5 Likes

My ${heroheroine} :heart_eyes:

You should be an editor someday when you grow up. :grinning:

2 Likes

I feel as if, for less enthusiastic grammarians, they pronouns may be a functional replacement for nominative, oblique, determiner possessive, etc. Both traditionally male and traditionally female pronouns have a repeat (though exactly not in the same points of use) while, as far as I can see, neither plural nor singular they repeats. Would there be anything significant missing in code like the following?

*create a_name ""
*create a_they ""
*create a_them ""
*create a_their ""
*create a_theirs ""
*create a_themself ""

*create b_name ""
*create b_they ""
*create b_them ""
*create b_their ""
*create b_theirs ""
*create b_themself ""
3 Likes

I’ve actually learned to prefer name_they/them/their/theirs both for the lack of ambiguity (unlike his/hers each word is actually different), and because it helps to keep it in my mind that the characters do not have a set gender.

5 Likes