Making relationship stats show as unknown until that character is met

I want them to look like this but instead of names unknown.
Im new to codin sorry if im slow.

until that character is met

*if (met_alerie = false)

show as unknown

percent alerie Unknown

Include the opposite case too.

*if (met_alerie)
  *stat_chart
    percent alerie Alerie
*if (met_alerie = false)
  *stat_chart
    percent alerie Unknown
*stat_chart
  the rest of the stat chart

You’ll need to restart the stat_chart for each one. It won’t look different.

Also one of the most important things to get right with coding is spelling and grammar. The computer won’t “know what you mean” like humans do. For example, if you write “codin”, the computer will not understand that you meant “coding”. You have to be precise with your language. Pay attention to what your English teacher is telling you in class!

7 Likes

Thank you!

when i tried i got this, it doesnt let me put if after statchart.

*label screen
*choice
#Relationships.
*if (met_alerie)
*stat_chart
percent alerie Alerie
*if (met_alerie = false)
*stat_chart
percent alerie Unknown
*stat_chart
*if (met_corso)
percent corso Corso
*if (met_corso = false)
*stat_chart
percent corso Unknown
*stat_chart

Idk if you’ve already solved this problem, but you could try using a multi-replace command. There’s a bit about it here in the guide on the main site. But basically in the stats page your code would look something like this:

*stat_chart
percent alerie @{met_alerie Alerie|Unknown}
percent corso @{met_corso Corso|Unknown}

…and so on for all your characters.

This is an easy method to use when working with true/false variables like met_alerie. The section in front of the | pipe is for whatever you want to display when that variable is true. The section behind the pipe will be for what you want to read when that variable is false. It also works for numerical values, so long as you keep adding | pipes between them and go in the order of 1,2,3,ect.

Personally, I like multi-replace because it lets you keep everything in one chart, with just one line of code per NPC. But it’s possible there’s a reason not to use it and I just haven’t found out yet. I’m still learning the CS language out myself!

Which is maybe why I haven’t figured out how to make the indentations show up here correctly. Always make sure that the lines after *stat_chart are indented correctly if you want them to display inside the chart. Like Will mentioned above, the computer needs precision to recognize a command. The problem you were having is right here:

That’s the *if statement that the computer objects to, since it should come before *stat_chart. All the others are in the right order, so if you’re moving in and out of single-space indentation with each ‘percent’ line, then they should work.

If you want to know more, the RE Towers guide is where I learned most of this! And you can always check out what they suggest in the official FAQ for customizing the stat display.

Use the forum code ``` to paste your code.

You’ll need to restart the *stat_chart for each one. Looks like you didn’t do that. This is because you can’t stick an *if statement in the middle of the stat chart. Take a moment to think about it to make sure you’re doing it right.