Troubleshooting defaultValue, nesting configuration options

melon
they/them

New member
Developer
Artist
Sorry in advance for the long post! I've been playing around with making my own chat based off Slime Chat (on slime2 v.1.1.2) and have run into some issues with setting defaultValue and nesting configuration options. Any help or suggestions are appreciated! It's been a few years since I've worked with JS/HTML/CSS, so I'm a bit out of practice.

Re: setting the defaultValue option, I'm finding that if I try to change the default badge size from 24px, it won't render in the options or in test messages. For instance, though I've set "defaultValue: 16" and "--badgeSize: 16px" initially, where '--badgeSize': ${badges.size}px:
Screenshot 2024-01-02 at 7.15.51 PM.png

Screenshot 2024-01-02 at 7.16.07 PM.png

It's still rendering as 24px, and the default value when I open the configuration setting is still 24:
Screenshot 2024-01-02 at 7.15.07 PM.png
Any thoughts on what might be going on here? From what I've tested, this only happens with the badge size and entrance animation default values - everything else that I set works properly (e.g., font size works fine).

Re: nesting configuration options, I'm just not sure how to do it so they aren't repeated in the widget settings. For example, I'd like to group everything above "General" into "General":
Screenshot 2024-01-02 at 7.22.55 PM.png
I'm able to do this by defining all the preceding settings in my settings script and then defining my general settings as the other variables. However, I also need to load the preceding settings (slime2.widget.loadSettings), otherwise it throws an error when it tries to access any of the variables. I was reading through https://docs.slime2.stream/settings/group in the hopes that it would clear up what I need to do, but I haven't been able to figure it out.
 

Zaytri
she/her

Glitch Witch
Admin
Developer
Streamer
Do you have a saved widget data file in the folder? The default values only apply when saved data doesn't exist.

The way that the settings are loaded, first it loads in all the default values, and then it fills in the values from the saved data, and the result of that is what is shown
 
Upvote 0
OP
OP
melon

melon
they/them

New member
Developer
Artist
Do you have a saved widget data file in the folder? The default values only apply when saved data doesn't exist.

The way that the settings are loaded, first it loads in all the default values, and then it fills in the values from the saved data, and the result of that is what is shown
Wow yep, that does it for the defaultValues. Thank you!
 
Upvote 0
Back
Top