Most efficient way of making variations of gameplay for pronouns (both MC and NPC)

I’m having trouble with coding my story to adapt to the pronouns of both an NPC and the MC. With the current way I have planned (a bunch of elseifs within elseifs) I’d end up having to rewrite every single paragraph 9 times for every single combination, then double that for romance/non-romance eventually, tallying up to 18 rewrites.
Is there any more efficient system?

My code looks like this:

*create name "n"
*create gender "n"
*create pr 1 "n"
*create pr 2 "n"
*create pr 3 "n"
*create pr 4 "n"
*create hair "n"
*create eyes "n"
*create skin tone "n"
*create intern name "n"
*create intern gender "n"
*create intern pr 1 "n"
*create intern pr 2 "n"
*create intern pr 3 "n"
*create intern pr 4 "n"

and my code for gender-specific text is like this example:

*if intern gender "f"
"Testing, testing, 123."

*elseif intern gender "m"
"Testing, testing, 123."

*elseif intern gender "nb"
"Testing, testing 123."

I’m primarily worried about the sheer amount of elseifs I’ll have to use and if I’m gonna have to go into elseifs within elseifs which I don’t want. I’ve been puzzling this out myself the entire day and have finally given in to ask for help.

1 Like

I think this thread will be helpful to you.

2 Likes

and then there’s of course variables and subs for verbs and genderfluid characters

What are the r, es, re and ve systems for? I was confused about something similar with HannahPS’ too as well.

In my case it’s for verb agreements, so that onscreen you get “he reads”, “they read” rather than “he read”/“they reads”.

1 Like

Alrighty, thanks for chiming in. I’m also super curious on how I set up the system for the *gosub command, and what commands I use to actually make use of the pronoun system you made. Thanks again in advance.

2 Likes

I’ve taken inspiration from Hannah’s code and some others, but for me, I write out the verbs in their entirety. I get confused otherwise :sweat_smile:

In the startup file

*create mcvar 3
*create plural false
*comment namingstuff
*create gender ""
*create they ""
*create them ""
*create their ""
*create theirs ""

In the setting of the pronouns/plurality

*fake_choice
    #"Open your heart, my dear girl."
        *set gender "female"
        *set they "she"
        *set them "her"
        *set their "her"
        *set theirs "hers"
        *set mcvar 1
    #"Open your heart, my fine boy."
        *set gender "male"
        *set they "he"
        *set them "him"
        *set their "his"
        *set theirs "his"
        *set mcvar 2
    #"Open your heart, my summer child."
        *set gender "nonbinary"
        *set they "they"
        *set them "them"
        *set their "their"
        *set theirs "theirs"
        *set plural true
        *set mcvar 3

Here’s how the plural and mcvar variables look like when used

"Lady Iruvona," ${they} @{plural whisper|whispers}.
The @{mcvar girl|boy|child} finally speaks...
7 Likes

I think ellery’s way (also what I meant) is much easier now that multireplace is a thing.
so all you need at bottom line are

*create they ""
*create them ""
*create their ""
*create theirs ""
*create self ""
*create plural false
*create trans false
*create gf false

maybe add in addresses and titles (i.e. sir/ma’am/mair and Mr./Miss/Mx./etc) and you’re good to go

2 Likes

Idk why but I can’t wrap my head around what the falses are used for and the way the @{mcvar girl|boy|child} works.

Multireplace is shortened version of *if *elseif where you can write all the phrases and commands in a single line. The syntax accepts either boolean or numeric as conditional checks:

For true/false

*if hungry = true
   eat
*else
   not eat

@{(hungry) eat|not eat}

For numeric

*if coin = 1
   save
*elseif coin = 2
   spend
*elseif coin = 3
   deposit

@{(coin) save|spend|deposit}
Note: Do note that multireplace can't accept the equivalent of *else, so gotta avoid that scenario when using it
3 Likes

so even if I use multireplace I still need to use ifelse at the start?

No, Szaal’s example included both just to compare.
@{(coin) save|spend|deposit} is enough! :slight_smile:

1 Like

Naw.
with multireplace *if-trees are mainly for longer paragraphs now.
For example:

text

*if (x)
   Bonus text
   
   More bonus text

regular text

or

text

*if (x)
   Bonus text
   
   More bonus text
   
   *goto 1
*else
   Other bonus text
   
   More of that
   
   *goto 1
*label 1
regular text

While multireplace can be used in sentences

Numeral variables:
"Oh was that when @{(event the first thing| the other thing| the third thing} happened?"

TrueFalse
"Oh, was this when X @{xdead x| x nearly} died?"

word variables:
"Oh, was this when §!{roname} @{(ro=A) punched you in the face| left you standing in the rain}?

also, for multireplace, when using contractions you gotta keep things closer together:

"$!{they}@{plur 're|'s} a person of honour."

Also, when having various dialogues it’s easier to format if you got put the first " into the multireplace instead of in front. but it can still work with different spacing as above

4 Likes

Oh ok, thanks for all your help! So this should be it?
Startup:

*create name ""
*create gender ""
*create they ""
*create them ""
*create their ""
*create theirs ""
*create hair ""
*create eyes ""
*create skin tone ""
*create intern name ""
*create intern gender ""
*create intern they ""
*create intern them ""
*create intern their ""
*create intern theirs ""
*create plural false
*create mcvar 3

And NPC creation:

*choice
   #...woman, but I trust you." Alice Prior, nicknamed Al by her friends, is a 23-year-old biology student who has a 5-year internship under Henry Hsu to obtain extra experience for her resume.
      *set intern name "Alice"
      *set intern gender "female"
      *set intern they "she"
      *set intern them "her"
      *set intern their "her"
      *set intern theirs "hers"
      *set mcvar 1
      *set plural false
      *goto proposal
   #...man, but I trust you." Albert Prior, nicknamed Al by his friends, is a 23-year-old medical student who has a 3-year internship under Henry Hsu to obtain extra experience for his resume.
      *set intern name "Albert"
      *set intern gender "male"
      *set intern they "he"
      *set intern them "him"
      *set intern their "his"
      *set intern theirs "his"
      *set plural false
      *set mcvar 2
      *set name "Albert"
      *goto proposal
   #...person, but I trust you." Alex Prior, nicknamed Al by their friends, is a 23-year-old programming student who has a 4-year internship under Henry Hsu to obtain extra experience for their resume.
      *set intern name "Alex"
      *set intern gender "non-binary"
      *set intern they "they"
      *set intern them "them"
      *set intern their "their"
      *set intern theirs "theirs"
      *set mcvar 3
      *set plural true
      *goto proposal

Would I need 6 mcvars to account for the NPC and the MC. Or can I make some kind of npcvar?

you need to remove the space from the variable (i.e. '*create internname “” ’ or *create iname “” )
but yeah this should work

My apologies, but I’m a little confused. Can I ask: other than the MC (who can be male, female, or nb) - how many other NPCs will have this variation as well?

To clarify - in my code, “mcvar” is simply the name I had opted to use. You are free to use a different one that best suits the NPC in question (e.g. internvar )

I just plan on two for now, I couldn’t handle more than that right now honestly.

Since I want it as easy as possible for me in the text when I write, this is how I do my pronoun variables.
For every gender variable character I have a variant of this:

The most common NPC gets this:

*set he "he"
*set his "his"
*set him  "him"

Another (with the initial M) gets this:

*set mhe "he"
*set mhis "his"
*set mhim  "him"

And so on, it makes it easy since I can just write something like: “${he} opened the door” and it would look smooth in the text.

To account for someone having the 'They* pronoun, I have this little thing:

*create sv true
*comment verb singular for multireplace. He is true, they are false.
*comment ${che} @{sv is|are} a telepath.

And then I just set ‘sv’ to false if someone picks They for their pronouns.

(Yes, I realize I missed ‘hers/theirs’ but it comes up so seldom I’m handling it on a one to one basis)

I think I have 5 variable people in the game.

1 Like

I’m a little nutty about neat coding so I’ll try to help out to improve yours!

*comment -------protagonist--------
*create name ""
*create gender ""
*create they ""
*create them ""
*create their ""
*create theirs ""
*create hair ""
*create eyes ""
*create skin_tone ""


*comment --------internstats--------
*create intern_name ""
*create intern_gender ""
*create intern_they ""
*create intern_them ""
*create intern_their ""
*create intern_theirs ""


*comment --------multireplaces--------
*create mcvar 3
*create plural false
*create internvar 3
*create intern_plural false

And if this is for the intern NPC:

*choice
   #...woman, but I trust you." Alice Prior, nicknamed Al by her friends, is a 23-year-old biology student who has a 5-year internship under Henry Hsu to obtain extra experience for her resume.
      *set intern_name "Alice"
      *set intern_gender "female"
      *set intern_they "she"
      *set intern_them "her"
      *set intern_their "her"
      *set intern_theirs "hers"
      *set intern_var 1
      *set intern_plural false
      *goto proposal

And so on for the others.

/Edit: Malin’s point on easy coding does remind me - perhaps you can shorten those intern variables to “i_their, i_them, etc”. Trust me, it will be a big pain to type out a lengthy variable :sweat_smile:

4 Likes

I know the feeling of needing things need, didn’t know you could lay it out that nicely.

Thank god I already know indentation and markdown from using HTML during college, otherwise I’d be already dead.

I already have renamed all of them after Malin’s comment, it was horrible just renaming them.

1 Like