MV [Yanfly Options core] issue with custom options not being highlighted anymore

for a while now I've been making use of Yanfly's Options Core to add more options to my game, primarily difficulty options. recently however, I've noticed that none of my old difficulty options show which option is selected anymore (as pictured below)

Spoiler: image
1678520321622.png

I'm not aware of when this started happening, and I don't believe I've touched any of the code for these options in quite a while, so I wouldn't know why this is happening either. I'm pretty sure this is a code issue though, because all other options seem to be working perfectly fine (including those with more than just an off/on switch, as seen below)

Spoiler: another image
1678520463513.png

all of these difficulty options basically have the exact same code with the exception of the "symbol" setting, which is different for each one, but it shouldn't be a problem as far as I'm aware. I have all the "functions" code listed below.

Spoiler: Make Option Code
JavaScript:
this.addCommand(name, symbol, enabled, ext);

Spoiler: Draw Option Code
JavaScript:
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var quarterWidth = statusWidth / 5;
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changePaintOpacity(value === 3);
var text = ("Less");
this.drawText(text, titleWidth + quarterWidth * 1, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 2);
var text = ("Normal");
this.drawText(text, titleWidth + quarterWidth * 2, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 1);
var text = ("More");
this.drawText(text, titleWidth + quarterWidth * 3, rect.y, quarterWidth, 'center');

Spoiler: Process OK Code
JavaScript:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
if (value <= 0) value = 3;
value = value.clamp(1, 3);
this.changeValue(symbol, value);

Spoiler: Cursor Right Code
JavaScript:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
value = value.clamp(1, 3);
this.changeValue(symbol, value);

Spoiler: Cursor Left Code
JavaScript:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
value = value.clamp(1, 3);
this.changeValue(symbol, value);

Spoiler: Default Config Code
JavaScript:
ConfigManager[symbol] = 2;

Spoiler: Save Config Code
JavaScript:
config[symbol] = ConfigManager[symbol];

Spoiler: Load Config Code
JavaScript:
ConfigManager[symbol] = config[symbol];

If anyone is able to spot what is wrong with my code or just tell me in general how this can be fixed, please let me know, as I'm planning on sharing this build of my game soon in order to get feedback on it in a month or so, and I'd like my difficulty options to be actually usable.

Thank you for your time
In your Load Config code, you don't test to see if the value is a number, so it may be being loaded as undefined or something. Try this instead?
JavaScript:
if (typeof config[symbol] === "number")
  ConfigManager[symbol] = config[symbol];
This also allows the Default Config code to actually function, since Default applies before Load.

You could also check the values in-game via the console (F8 during test). E.g.

ConfigManager["alwaysDash"]
Replace alwaysDash with your custom config symbol.
In your Load Config code, you don't test to see if the value is a number, so it may be being loaded as undefined or something. Try this instead?
JavaScript:
if (typeof config[symbol] === "number")
  ConfigManager[symbol] = config[symbol];
This also allows the Default Config code to actually function, since Default applies before Load.

You could also check the values in-game via the console (F8 during test). E.g.

ConfigManager["alwaysDash"]

Replace alwaysDash with your custom config symbol.
I never would have thought of that but this actually worked!
Thank you very much for all the help.

I'd like this thread closed now.
You're welcome!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

For future reference, if you want your thread closed, you can press the Report button on your post and leave a reason (e.g. "answered" or "problem solved"). That notifies all relevant mods, which typically results in a faster response. 👋

Happy RPG Making~

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-options-core-issue-with-custom-options-not-being-highlighted-anymore.155699/