A Basic Tutorial on Name, Relationship and Gender Variables

Why is it gosub instead of goto?

There’re actually no much difference between both in this case. It’s just about using the correct label, and *goto will yield result just like *gosub gives.

I seem to be having an issue with the full name code. [code]*goto hello_name

*label hello_name
*set fullname (name& " ") &surname
“Hello {mr} {name} ${surname}. It is nice to meet you.”[/code]

For some reason the ${fullname} is reading like this on the stat page is showing like this

name Chosen surname.

So the surname shows up but the name is just the word name. I copied it from the tutorial and tried moving things around several ways but still can’t seem to fix it. What am I missing?

Assuming both name and surname are set correctly have proper values, I can see just two issues with your examples there:

*set fullname (name&" ")&surname

Two spaces removed – it should all be one ‘word’ except where you actually want a space &" ".

“Hello ${mr} ${name} ${surname}. It is nice to meet you.”

Each variable name needs the dollar symbol to display properly.

Right, sorry about the dollar signs. For some reason the disappeared when I copied the text from note pad. But they are in the original code.

I’ll try the editing out the extra spaces tomorrow, fingers crossed that works. Thanks for the help

1 Like

So I have run into a bit of a problem.
I am marking a character, but in this particular label, 1 of the other characters has been pree: set.
Anyway, is there a way that I can set the game up to just insert gender pronounce for NPC characters, without gaveling to *If a bunch of stuff.
I can do that, but kind of annoying.

If I understand your problem correctly, you can set all of the variables under the same if statement, e.g.:

*if (condition)
 *set heShe "he"
 *set himHer "him"
 *set hisHer "his"



You’d still need to do the *if, but only once (or a set of two or more). Use the *if to set up variables for your pronouns, then use the print syntax ${pronoun} to replace all the pronouns in the text.

*if npc1 = "male"
   *set npc11 "he"
   *set npc12 "him"
   *set npc13 "his"
   *set npc14 "his"

It's ${npc12}. $!{npc11} is the child of ${npc13} parents.
It's him. He is the child of his parents.