How do I make a stat_chart with changeable RO names?

Hello! I am new to this, so hopefully I posted in the correct place.

For my issue, it’s as the title says. I made it so that the player can choose the gender of the RO’s, and thus the name changes accordingly. But how do I put that into a stat_chart, as it currently doesn’t seem to work with a changeable name format/I can’t figure it out?

I have the RO’s saved as *create RO_1 “Unknown” and *create RO_2 “Unknown” for their name change thingy in the startup, tested and it works by the way.

Hi and welcome to the forum.

There’s a couple of ways to do that.

You can either print the variable

${RO_1}

showing their set name. This would also work if the player picks a name for them.

Or use multireplace with the gender variable:

@{RO_1_gender Alice|Bob}
or
@{RO_1_gender Alice|Bob|Sam}

First example would have RO_1 be a true/false variable, with ‘true’ showing the first option (Alice) and being set to true when the RO is set to female.
Second example is a numeral variable with 1=female 2=male 3=neutral/non-binary.

In a stat_chart it’d look like this:

*stat_chart
  percent ro_1_stat ${RO_1}

or

*stat_chart
  percent ro_1_stat @{RO_1 Alice|Bob|Sam}

Hope that helps (option one is the easiest and most commonly used one)

4 Likes

Here’s another example of how what MeltingPenguins just showed you might look in your code.

*create RO_1 "Unknown"
*create RO_1_gender 1

My romance option is:
*choice
  #Female.
    *set RO_1 "Alice"
    *set RO_1_gender 1
    *goto RO_1_picked
  #Male.
    *set RO_1 "Bob"
    *set RO_1_gender 2
    *goto RO_1_picked
  #Nonbinary.
    *set RO_1 "Cley"
    *set RO_1_gender 3
    *goto RO_1_picked

*label RO_1_picked
I'm going to romance ${RO_1} because @{RO_1_gender she's|he's|they're} just so awesome.

(Note: Create RO_1_gender as 1, not 0, because the latter would make using it in multireplace later needlessly complicated.)

2 Likes

Thank you so much! It ended up working.

1 Like

Thanks for the extra clarification! It ended up working when I tried it out.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.