Hiding or delaying stats in stat sheet

How would I hide a stat in the stat sheet so that the reader doesn’t see it at the beginning of the game, but introduce it later on?

EX: a friendship stat for alex, but it wont be visible until you meet him

1 Like

You would do it with an if statement. You’d have to create a variable for meeting Alex in the startup file first, such as *create metalex false

Then in the stats screen, it would be something like:

*if metalex
      *stat_chart
           percent alex Alex

(With the “alex” following the “percent” being whatever variable you’ve made for Alex’s friendship stat. So if “metalex” isn’t true, this stat bar will not appear.)

2 Likes

Or you can simplify it like this

*if alex != 0
   *stat_chart
      percent alex Alex

Of course this wouldn’t work if your starting relationship isn’t 0.

Don’t do this! Well, not unless you plan to never have him going back to 0. (I’d also suggest starting relationships at a neutral 50, rather than 0, but anyway…)

2 Likes

Oh, yeah. Right.
It will be super awkward if you screwed up with alex badly, and then his name suddenly gone from the stats screen.

1 Like

he ded

5 Likes

Okay so I have this problem! I can do THIS just fine in my stats screen menu I made:

*fake_choice
  *if erindna
    #Sister. Erin.
      *goto statspage
  *if not(erindna)
    #Form1
      *goto statspage
  *if silverdna
    #Silver. Border collie.
      *goto statspage
  *if not(silverdna)
    #Form2
      *goto statspage
  *if oliverdna
    #Dad. Oliver.
      *goto statspage
  *if not(oliverdna)
    #Form3
      *goto statspage

So you get a list of each shapeshifter form you have so far, and if you don’t have them it does the “Form(number)” option. BUT!!!

But does anybody know a way to do it to where it won’t show up AT ALL until you set the variable for each one? Or do I just have to be content with it showing a whole list of “Form 1-3” when it’s false?

Quick question: So, you want 3 conditions for each of the… npc dna? Not met (hidden), formX, and NPCdna?

1 Like

Okay I found out a way to do it myself! It’s super simple actually! I don’t even need the menu or anything really! It’s a lot neater. :slight_smile:

It’s just like this:

*if (erindna)
  Erin

*if (oliverdna)
  Oliver

*if (silverdna)
  Silver
2 Likes

Yeah, I was gonna say - doing a bunch of *fake_choices wasn’t really necessary. I would definitely recommend making it

*if (erindna = true), however. The code can get confused and start to act up, so it’s a good practice to always have the(___ = true), instead of just “if ____”

1 Like

Ah. So you throw away the choices and use a simple list, instead?

1 Like

Yes! :slight_smile: It’s waaay simpler and faster!

Ok thanks. :slight_smile:

Yeah, even though it’s unnecessary I always use the full *if (variable = true) notation rather than the simplified *if variable form. It makes me feel confident that I know exactly the intention of what I’m doing.

1 Like

Hey, I’m new here, I was hoping someone could help me with setting it up so I can delay some stats that are shown in the stat screen; I’d like to have a percent bar for the romance options, as they come into the story. Is there any way of doing so?
(My terminology is a lacking, so I’m not even sure how to ask for help)

1 Like

There are fancier ways I suppose but easier is create a variable voleean that makes true in the moment you want people to see the stat.
This is the choice stats txt…

*if know_ro1
    *stat_chart
      percent ro1

In a moment you set in the scene a know_ro1 is true it will appear in stats while is false it will end hidden

1 Like

How about initializing the relationship variable to some unused value, and then testing for that in the stats? You can even use a boolean directly, since choicescript variables can hold any value type.

For instance…

In your startup file:

*create carol_rel false

In choicescript_stats:

*if carol_rel != false
	*stat_chart
		percent carol_rel Caroline

Once you actually meet Caroline:

*set carol_rel 50
2 Likes

Yeah, that’s fancier but I though it was a beginner and I want to maintain the basics first but yours is a very practical

2 Likes

@Myrtle @poison_mara Thank you both so much! I’m a bit of a newbie, but these both helped plenty ^v^ thank you

2 Likes

Remember there is always several ways to do stuff, so Try by yourself and asking for any doubt you will have

1 Like