Variable stat titles

Hi , i was hoping if someone could explain to me how to change the title of the stat as u progress into the game , like someone is “unknown” and then after given a name .
I have actually found this

*temp title “strength”
*if poetic
*set title "thews and sinews "
Percent strength ${title}

But i didn’t quite get what does " poetic" refer to over here ? Do we have to put a condition ?

Poetic in that case refers to a variable that is either true or false, with boolean variables (aka true or false) you don’t have to specify what you are checking, like the numbers or strings that you do need to check with something. So this means the same:

*if poetic
*if poetic = true

In the case of a string variable or a number one you do have to compare it to something:

*if poetic >=50
*if poetic = "a lot"

If you want to change the title on the stats you can do something like this:

*if knows_person1 = false
    percent person1_relationship Unknown
    percent person1_relationship John

so you have 2 variables.
person_1 = true or false, if you know or don’t know this person
person_1_relationship = % amount of relationship you have with this person.

In this case if you don’t know John the stat chart will show Unknown, And if you know him it’ll show John.
Another way to do it is hiding the chart until you get to know that character. In that case it’ll be something like:

*if knows_person1
    percent person1_relationship John

Thanks , That was very helpful :blush:

1 Like

Also if i may ask , if i write " if poetic = true " how can the game guess that it really is true or not?

You can use ` this symbol at the beginning and end to write the code so it’ll read better like so *code *code
or you can put three on a row and close it with another three to write blocks of code.

All your variables should be created and defined with a starting value at the startup.txt

*create poetic true
*create poetic 50
*create poetic "this is poetic"

We use 3 kind of variables, boolean, numbers, or strings of text. I gave you an example of all 3, but you can only assign one variable to be of one kind, if you need another one you need to change the name of the variable.

Here you have some tools and links that can help you learn about Choicescript and everything we use to aid us on the process.

1 Like

Okay , thank you so much for your help

1 Like