Hi,
So I noticed a problem after a test deployment of my game. With the config.rpgsave wiped for the deployment I was able to catch a problem with my options menu.
All of the options are currently displaying the correct default setting, however, upon checking the appropriate switches in game, it did not actually set the switch correctly in game. I don't know what I am doing when it comes to coding, but I've played around with a few things to see if I could fix this to no avail. I've been googling the past couple hours to see if I could get this solved, but I'm really just at my wits end.
To clarify: The options are working correctly. However the default - first launch - setting is improperly set. On first launch, the option DISPLAYS "on" but in game, it is clearly not set to "on".
I was just launching a beta test for play testers when I encountered this problem, so I guess I am sort of in a rush on this
So, I'm basically groveling on my hands and feet now, please help me fix this.
Here is one options menu item as an example:
Here is all of the code that makes up the specific option shown above (but to be clear, there are other switch-based options that are also not working properly either.) Between each screen shot I didn't change any options in the menu. This is simply to display what the game *thinks* the default setting is.
Just for fun, here is a different option in my menu that is also switch-based. It is also not working correctly (all of my switch-based options are not working correctly)
Your help is greatly appreciated.
edit:
I'm so lost on this...I have continued googling and just testing random stuff to see if I can fix this. The thing that has me the most confused is that others have asked about setting the default to ON before, and the code used (in the Load Config Code) is exactly the same as my code. So what is going wrong?
I tried moving the plugins around - I moved them around a lot, but nothing.
I've tried adjusting my load config code and default config code. I double checked the switch value in the code and made sure it is correct.
What do I do? Someone please save me.
edit:
Here is my entire plugin list (I moved all of Yanfly's plugins to the "proper" order sometime after this screen shot was taken. It did not fix the problem.) The screen shot was taken a few days ago intended to serve a different purpose, that's why there is highlighted plugins. For this thread on Options Core, please ignore the highlighted text.
I have turned off plugins to see if there are any conflict. The ones I have turned off so far are:
Galv Custom Title, Galv MenuFade, DhoomTitleExit; SRD SuperToolsEngine, HUDMaker, and BattleLogUpgrade. So far, none of these have fixed the problem.
I swear in the past this used to work correctly, then again, it's so hard to say if I am just misremembering things. At some point I upgraded NWJS. Do you think upgrading NWJS might have broken the plugin?
So I noticed a problem after a test deployment of my game. With the config.rpgsave wiped for the deployment I was able to catch a problem with my options menu.
All of the options are currently displaying the correct default setting, however, upon checking the appropriate switches in game, it did not actually set the switch correctly in game. I don't know what I am doing when it comes to coding, but I've played around with a few things to see if I could fix this to no avail. I've been googling the past couple hours to see if I could get this solved, but I'm really just at my wits end.
To clarify: The options are working correctly. However the default - first launch - setting is improperly set. On first launch, the option DISPLAYS "on" but in game, it is clearly not set to "on".
I was just launching a beta test for play testers when I encountered this problem, so I guess I am sort of in a rush on this
So, I'm basically groveling on my hands and feet now, please help me fix this.Here is one options menu item as an example:
Here is all of the code that makes up the specific option shown above (but to be clear, there are other switch-based options that are also not working properly either.) Between each screen shot I didn't change any options in the menu. This is simply to display what the game *thinks* the default setting is.
Code:
//Make Option Code
this.addCommand(name, symbol, enabled, ext);
//Draw Option Code
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
this.drawOptionsOnOff(index);
//Process OK Code
const index = this.index();
const symbol = this.commandSymbol(index);
const value = this.getConfigValue(symbol);
this.changeValue(symbol, !value);
const catalyst = $gameSwitches.value(182);
if (catalyst) {
$gameSwitches.setValue(182, false);
} else {
$gameSwitches.setValue(182, true);
}
//Cursor Right Code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, true);
$gameSwitches.setValue(182, true);
//Cursor Left Code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, false);
$gameSwitches.setValue(182, false);
//Default Config Code
ConfigManager[symbol] = true;
//Save Config Code
config[symbol] = ConfigManager[symbol];
//Load Config Code
var value = config[name];
if (value !== undefined) {
ConfigManager[name] = value;
} else {
ConfigManager[name] = true;
}
Just for fun, here is a different option in my menu that is also switch-based. It is also not working correctly (all of my switch-based options are not working correctly)
Code:
//Make Option Code
this.addCommand(name, symbol, enabled, ext);
//Draw Option Code
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
var value = this.getConfigValue(symbol);
var rate = (50).clamp(0, 1);
if (value === true) {
var gaugeColor1 = this.textColor(11);
var gaugeColor2 = this.textColor(11);
} else {
var gaugeColor1 = this.textColor(23);
var gaugeColor2 = this.textColor(23);
}
this.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);
this.drawText(" ", titleWidth, rect.y, statusWidth, 'center');
this.drawOptionsOnOff(index, "Enabled", "No Free Healing");
//Process OK Code
const index = this.index();
const symbol = this.commandSymbol(index);
const value = this.getConfigValue(symbol);
this.changeValue(symbol, !value);
const catalyst = $gameSwitches.value(16);
if (catalyst) {
$gameSwitches.setValue(16, false);
} else {
$gameSwitches.setValue(16, true);
}
//Cursor Right Code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, true);
$gameSwitches.setValue(16, true);
//Cursor Left Code
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, false);
$gameSwitches.setValue(16, false);
//Default Config Code
ConfigManager[symbol] = true;
//Save Config Code
config[symbol] = ConfigManager[symbol];
//Load Config Code
var value = config[name];
if (value !== undefined) {
ConfigManager[name] = value;
} else {
ConfigManager[name] = true;
}
Your help is greatly appreciated.
edit:
I'm so lost on this...I have continued googling and just testing random stuff to see if I can fix this. The thing that has me the most confused is that others have asked about setting the default to ON before, and the code used (in the Load Config Code) is exactly the same as my code. So what is going wrong?I tried moving the plugins around - I moved them around a lot, but nothing.
I've tried adjusting my load config code and default config code. I double checked the switch value in the code and made sure it is correct.
What do I do? Someone please save me.
edit:
Here is my entire plugin list (I moved all of Yanfly's plugins to the "proper" order sometime after this screen shot was taken. It did not fix the problem.) The screen shot was taken a few days ago intended to serve a different purpose, that's why there is highlighted plugins. For this thread on Options Core, please ignore the highlighted text.
I have turned off plugins to see if there are any conflict. The ones I have turned off so far are:
Galv Custom Title, Galv MenuFade, DhoomTitleExit; SRD SuperToolsEngine, HUDMaker, and BattleLogUpgrade. So far, none of these have fixed the problem.
I swear in the past this used to work correctly, then again, it's so hard to say if I am just misremembering things. At some point I upgraded NWJS. Do you think upgrading NWJS might have broken the plugin?