I'm having trouble with setting the MC's name, sex, and gender

I’m having trouble setting my MC’s name, sex, and gender. I made each of them a variable in the startup scene and put “undetermined” as what they start out as, but when I go to the stats screen after I’ve chosen my name, sex, and gender, it shows name:name. sex:sex, gender:gender

Here’s the snippets of code that I’m using for this. In the startup file I have this
‘’’
*create name “unknown”
*create gender “undetermined”
*create sex “undetermined”
‘’’
in the stat chart I have…
‘’’
Personality
*stat_chart
text name
text sex
text gender
‘’’
and for the code of how you choose your name, gender, and sex, I have

‘’’ I still remember the day mom and dad came home with you in their arms,"
Having heard this story a million times before, you know where this is going.
*choice
#“Look at your new baby brother, they said” You say in unison with Jem
*set sex “male”
*goto genderidentity
#“Look at your new baby sister, they said” You say in unison with Jem
*set sex “female”
*label genderidentity
Of course, since then you’ve realized you identify as
*choice
#cisgender
*goto supportiveJem
#transgender
*if sex=“male” set gender trans mtf
*if sex=“female” set gender trans ftm
*goto supportiveJem
#gender nonbinary
*set gender nonbinary
*label supportiveJem
Regardless, Jem has been there for you none the less. “I wanted a puppy, but they had to go and bring you home instead”
Jem continues jokingly. Just then someone knocks angrily on the door. “Come on you two blighters! Get up! I swear to the dives
if I have to mop up one more mess you idiots made I’ll throw you both overboard. Hurry up, Giraffe, Monkey!” You and Jem roll your eyes,
both of you know full well that the captain, valdor, knows that your names are Jem and…
*input_text name,
*page_break
but he’s become particularly fond of
calling your brother giraffe, and you monkey.
‘’’
Any help you can give me would be appreciated. This is my first attempt at coding in general, let alone in choice script, so I wouldn’t be surprised if I get a ton of stuff wrong. Thanks in advance for your help.

It’s a little hard to follow with certainly since I can’t see the indentation. If you stick [code] before your code, and [/code] after the code, the indents would display correctly, instead of all being on one line, so if you could do that, that would make this easier :slight_smile:

That said, what I’m noticing, I don’t think *if sex=“male” set gender trans mtf and suchlike would work. You would want these to be separate lines, like so:

*if sex = "male"
 *set gender "trans mtf"

That is, with an asterisk before “set” and the part being set on a new line, and separately indented.

I’m also not sure I’m seeing any point where the gender variable gets set if you’re cisgender, so that should be in there.

Not quite sure what’s causing the “name:name” etc. issue, though :sweat_smile:

2 Likes

To display a variable you need to use:

Sex: ${sex}

When you want to display the variable itself you put it in ${VARIABLENAME}

No need to use stat chart for something like this, use it for numerical values instead.

1 Like

Hi! I know you don’t have to put text based variables in the stat chart. But is there anyway I can?

Hi! I took your suggestions, but it’s still having trouble displaying the variables. This is the updated version of the code.
startup code

*create name "unknown"  
*create gender "undetermined" 
*create sex "undetermined" 

stat chart

[b]Personality[/b]
*stat_chart
    ${name}
    ${sex}
    ${gender}

actual choice code:

 #"Look at your new baby brother, they said" You say in unison with Jem
  *set sex "male"
  *goto genderidentity
 #"Look at your new baby sister, they said" You say in unison with Jem
  *set sex "female"
  *label genderidentity 
  Of course, since then you've realized you identify as 
  *choice 
    #cisgender
     *if sex="male"
      *set gender cisgender
     *if sex="female"
      *set gender cisgender
     *goto supportiveJem
    #transgender
     *if sex="male" 
      *set gender trans mtf
     *if sex="female" 
      *set gender trans ftm  
       *goto supportiveJem
    #gender nonbinary 
     *set gender nonbinary
     *label supportiveJem
     Regardless, Jem has been there for you none the less. "I wanted a puppy, but they had to go and bring you home instead" 
     Jem continues jokingly. Just then someone knocks angrily on the door. "Come on you two blighters! Get up! I swear to the dives 
     if I have to mop up one more mess you idiots made I'll throw you both overboard. Hurry up, Giraffe, Monkey!" You and Jem roll your eyes, 
     both of you know full well that the captain, valdor, knows that your names are Jem and... 
     *input_text name, 
     *page_break
     but he's become particularly fond of 
     calling your brother giraffe, and you monkey.   

Thanks in advance for any help you can give! Again, I’m totally new at this so I apologize in advance if i get a bunch wrong.

You don’t have to put {name}, {sex}, and ${gender} in a *stat_chart.

You can just say:

Name: ${name}

or just

${name}


Also, you may want to name your variable trans_mtf and trans_ftm or something like that so that it’s all one string.

There’s probably more here that I’m missing, but I’m sure someone less sleepy will catch it.

4 Likes

To add @Gower’s advice, here’re some tips:

  1. For your stats_screen
[b]Personality[/b]
Name: $!{name}
Sex: ${sex}
Gender: ${gender}
  1. For your variable creation, this will require more brainpower for your coding work, but it will make it easier and simpler too.
*create gender
*comment 1 = cis/2 = mtf/3 = ftm

*choice
   #Blabla the player chooses cisgender
      *set gender 1
   #chooses mtf
      *set gender 2
   # ftm
      *set gender 3
2 Likes

Thanks! I took most of your guys advice and so far it’s working perfectly. Now I have a different issue tho. I finished the first two scenes. (They’re both hella short but I’m still a beginner so I’m ok with that). I was wondering how to share what I have of the game so far with some friends whohave agreed to be playtesters and critique my writing for me. I tried emailing the link to my phone, but of course, it couldn’t open it because it’s a local file. Any idea how I can share it? And will this impact my ability to continue to change, manipulate, and fix the coding as I go on?

Dashingdon is what you are looking for.

2 Likes

Awesome! Thank you so much!