Need help with stat page, skill description

Hello sorry if this has been answered elsewhere but i couldn’t find an answer. I am trying to make a stat page with levels for the different skills. After a certain number of levels in the skill it get’s ‘upgraded’ with a new description. The problem is that i can’t figure out how to put a string variable in the stat chart. I have tried, unsuccessfully, to use an if statement but it keeps giving me errors. I would like for the skill to be displayed as: Skill_name Skill_level Skill_description. So as an example:
Shooting 0 You’re a beginner.
Many thanks for any help.

Old solution

You can set the text you want for the skill name in a different variable like this:

*temp wisName ""
*if (upgrade = 0)
  *set wisName "Dunce"
*elseif (upgrade = 1)
  *set wisName "Cleverness"
*elseif (upgrade = 2)
  *set wisName "Wisdom"

*stat_chart
    percent wisdom ${wisName}

Edit: nvm you asked something else. I’ll keep the original answer in case you want something similar in the future. Do you want that text to be formatted like a percentage bar?

1 Like

Thank you for answering so fast
No, i was just thinking plain text and numbers. No percentage bar

You can use multireplace:

Shooting: @{skill_lvl "You're a beginner"|"You can defend yourself nicely."|"Few would dare to challenge you"}

In this case skill_lvl would have the value of 1, 2, or 3. If you need your skills to go further than that and need to divide the lvls to only those 3 steps you can do:

*if real_skill_lvl <= 10
  *set skill_lvl 1
*elseif real_skill_lvl <= 20
  *set skill_lvl 2
*else
  *set skill_lvl 3

You can modify the values to the levels you need for your mechanics.

2 Likes

Thank you SO much, i finally figured it out. Without your help i would have been stuck for who knows how long. I hope you have a fantastic day.

2 Likes