Hello!
So I'm trying to make an option using YEP option core, where the option,
instead of using a gauge option
or an Enabled/Disabled type option,
I wanted to make an option, that used multiple possible choices, for example,
Difficulty: Easy Medium Hard
Another example of what I mean can be seen in this screenshot.
I tried using Yep's battle animation speed plugin to try and make this, since I knew it had this type of option, and with some modification it almost worked, but the problem was that the plugin provided the default config, save config, and load config code. and so I had to attempt to find out what I would need to put there myself. The problem though is that I couldn't find any answers by inspecting the Battle Animation speed plugin's code, and I couldn't get it working by using modified code from other options. So after trying my best I'm asking here if anyone knows how to make the option I'm trying to make, or how to at least, modify my current code to work properly.
If you're wondering, here is the code I currently have
If anyone can help me get this working properly it would be greatly appreciated!
Thank you for your time!
So I'm trying to make an option using YEP option core, where the option,
instead of using a gauge option
or an Enabled/Disabled type option,
I wanted to make an option, that used multiple possible choices, for example,
Difficulty: Easy Medium Hard
Another example of what I mean can be seen in this screenshot.
I tried using Yep's battle animation speed plugin to try and make this, since I knew it had this type of option, and with some modification it almost worked, but the problem was that the plugin provided the default config, save config, and load config code. and so I had to attempt to find out what I would need to put there myself. The problem though is that I couldn't find any answers by inspecting the Battle Animation speed plugin's code, and I couldn't get it working by using modified code from other options. So after trying my best I'm asking here if anyone knows how to make the option I'm trying to make, or how to at least, modify my current code to work properly.
If you're wondering, here is the code I currently have
Code:
Name:
Difficulty Test
Help Description:
Test
Symbol:
DifficultyTest
Show/Hide:
show = true;
Enable:
enabled = true;
Ext:
ext = 0;
Draw Option code:
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var quarterWidth = statusWidth / 4;
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 = ("Test3");
this.drawText(text, titleWidth + quarterWidth * 1, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 2);
var text = ("Test2");
this.drawText(text, titleWidth + quarterWidth * 2, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 1);
var text = ("Test1");
this.drawText(text, titleWidth + quarterWidth * 3, rect.y, quarterWidth, 'center');
Process Ok Code
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);
Process Right Code:
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);
Process Left Code:
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);
Default config Code:
ConfigManager[symbol] = value(2);
Save Config Code
config[symbol] = ConfigManager[symbol];
Load Config Code
ConfigManager[symbol] = !!config[symbol];
If anyone can help me get this working properly it would be greatly appreciated!
Thank you for your time!