Showing different stats in statscreen problem

I’ve tried looking up a solution for this question but either can’t find it or I find a solution and still having an issue. So for the game I have two different sets of stats that I want to only be shown depending on which gender the player chooses. So I’m not sure how to have only the female or only the male stats shown as everytime I add in an *if statement I get an error message so I want to know if I’m setting it up properly.

Thanks in advance for any help!

*if gender(Female)
	These are your stats! 

	*stat_chart
		text femalename Name
		text femalehaircolour Haircolour
		text femaleeyecolour Eyecolour 
		opposed_pair Evil
			Humility
		opposed_pair Cold
			Kind
  

		text friend1friendship ${friend1}

		text friend2friendship ${friend2}

		text assistant1friendship ${assistant1}
1 Like

what error are you getting?

Invalid expression at char 7, expected OPERATOR, was: OPEN_PARENTHESIS [(] or Invalid expression at char 15, expected OPERATOR, was: STRING [“Female”] or Invalid expression at char 13, expected OPERATOR, was: VAR [Female]
Depending on how I change the variable.

1 Like

Try *if gender = "Female" instead of *if gender(Female)

Changing the topic slightly, why did you want to use separate variables for female vs. male names, hair colours, and eye colours? Are players supposed to have both at the same time? If a player can only have one or the other, but not both, why not just use the same variables for both versions?

You could separate male and female name choices like this, even when using a single name variable:
*label choose_name
What is your name?
*if gender = "female"
	*fake_choice
		#Female name 1
			*set name "female1"
		#Female name 2
			*set name "female2"
		#Female name 3
			*set name "female3"
		#Custom name
			Please check your name's spelling carefully!
			*input_text name
*if gender = "male"
	*fake_choice
		#Male name 1
			*set name "male1"
		#Male name 2
			*set name "male2"
		#Male name 3
			*set name "male3"
		#Custom name
			Please check your name's spelling carefully!
			*input_text name

Your name is ${name}. Is that correct?
*fake_choice
	#Yes.
	#No.
		*goto choose_name

I can’t really think of any reason to offer different eye colours to female and male characters. Hair colours likewise, though I recognize “blonde” is sometimes spelled “blond” for males.

That can be resolved easily as well, like this:
What colour is your hair?
*fake_choice
	*if gender = "female"
		#Blonde.
			*set hair_colour "blonde"
	*if gender = "male"
		#Blond.
			*set hair_colour "blond"
	#Brown.
		*set hair_colour "brown"
	#Black.
		*set hair_colour "black"
	#Red.
		*set hair_colour "red"
	#Grey.
		*set hair_colour "grey"
	#My hair is dyed a custom colour.
		What colour did you dye your hair?
		*input_text hair_colour
1 Like

That seems to work thanks.
Just to explain it’s not just hair or eye colour but it’s one main game and playing from two different sides as each main character has a different role depending on gender I posted the code so you could see that it’s two different sets of stats depending on gender.

*if gender = "Female"
	These are your stats! 

	*stat_chart
		text femalename Name
		text femalehaircolour Haircolour
		text femaleeyecolour Eyecolour 
		opposed_pair Evil
			Humility
		opposed_pair Cold
			Kind
  

		text friend1friendship ${friend1}

		text friend2friendship ${friend2}

		text assistant1friendship ${assistant1}

*if gender = "Male"
	These are your stats!

	*stat_chart
		text malename Name
		text malehaircolour Haircolour
		text maleeyecolour Eyecolour
		text determination Determination
		text stubbornness Stubbornness
		text smarts Smarts

		text malefriendship ${malefriend}

		text femalefriendship ${femalefriend}

		text assistant2friendship ${assistant2}

		text mindchanged  Mind Changed
  

  

So each player has two main characters, and needs to track both a female and a male version of each stat at the same time? That’s pretty neat! (And it definitely requires two sets of stats.)

Hiding the stats of one character while the player is focused on the other is a good idea. It could get a little messy if the player could see both characters’ stats at the same time.

If you play around with multireplace a little (getting used to it can b a bit tricky) you could reduce the code a bit.
The name bit for example could move above the stats and read

Name: @{(gender = "female") $!{femalename}| $!{malename}}
1 Like

I tried the various suggestions but both the male and female stats still show up in the stats screen but I only want one version to be seen any other suggestions for only showing one set of stats?

that’s odd.
Have you made sure to set the variables to male/female correctly?
or can you change it to one variable?

The following is how I have it in my game:

*if (protag = "parent")
   [b]Name:[/b]  $!{parent_firstname} $!{lastname}
   *line_break
   *if (cafegot)
      [b]Our little Café:[/b] The ${cafename} Café
      *line_break
   [b]What Makes You You[/b]
   *line_break
   *stat_chart
      opposed_pair uncon
         Unconventional
         Conventional
      opposed_pair ruff
         Easily Ruffled
         Unflappable
      opposed_pair rude
         Rude
         Polite
      opposed_pair rash
         Rash
         Careful
      opposed_pair disin
         Disinterested
         Curious

*if (protag ="child")
   Name: ${kid_firstname}
   *line_break
   [b]What makes You You[/b]
   *line_break
   *stat_chart
      opposed_pair oddball
         Oddball
         Straight Laced
      opposed_pair nervous
         Nervous
         Easy Going
      opposed_pair pleasant
         Pleasant
         Foul-Mouthed
      opposed_pair reckless
         Reckless
         Cautious
      opposed_pair busybody
         Busybody
         Lackadaisy

and it works fine.

Thanks, I had the wrong indentation under the *if statement.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.