Is it possible to change the color of the choicescipt_stat statbars throughout the game

Hello, all.

In my game, the character will most likely have the option to choose between different kinds of magic. I was wondering if I could change the star bar and stat bar background colors depending on the player’s choice or if it’s unchangeable since you have to mess with the style.css.

Thank you!

As far as I know, editing style.css is the only way to change the color of the stat bars. I don’t think there’s a way to do it mid-playthrough, as you seem to be suggesting.

1 Like

Yeah, that’s what I figured. Thank you!

There is a way to change the stat_bar class object, but that would require meddling with the javascript file, adding your own custom command to call a custom function to change the color.


Never have I wanted to know Javascript more in my entire life.


Doesn’t customized Javascript code prevent games from publication with HG?

1 Like


Sad. Having customized colors for the stat bars would be cool.

You can discuss it with Dan. Heck, you can contribute to the CS source code in GitHub.

Speaking of which, make a guess what I’ve been working at:


What have you been working on?

Question resolved!