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:
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.
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.
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
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
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:
*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
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
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?
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 )
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)
*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