Names of Stats


#1

Is it possible to have multiple-word stat names?

I tried “text Strength” and whatever that worked fine for choicescript_stats.txt. But then I tried “text Strength Power” after renaming everything in mygame.js and choicescript_stats.txt and also startup.txt and it gave me an error when i tried to open the stats screen in the game. I changed everything to match what it was supposed to be “Strength Power”, and I used “*create Strength Power” and “*set Strength Power 50” in startup.txt, but it keeps giving me errors when I use multi-word stats names when accessing the stats screen in the game. :frowning: If I use a single-word stat name then it works just fine…

Am I just matching everything up in the .js and .txt files wrong or can you not use multi-word stats names in choicescript_stats.txt?

Or is there some scripting I can use in choicescript_stats.txt to change the names of stats to something else while still keeping the stats? Like a command to rename “Strength”, to display in the stats screen “Strength Power” instead of “Strength”?


#2

Your problem is that you’ve written “Strength” with a capital first letter. Never use capital letters for variables while defining them in mygame.js. You can do as following:


*stat_chart
    text strength Power

and it will work fine, if the variable “strength” in mygame.js is actually named “strength” and not “Strength”. Good luck! :slight_smile:

EDIT: If you want it to display Strength and Power as well, you have to add another word after “Power”, like this:


*stat_chart
    text strength Power Strength

You can also switch “Power” with “Strength”, their order is completely irrelevant.


#3

Thanks haha I didn’t realize it was so simple! I’m glad it was. :slight_smile: