Status
Not open for further replies.

SleepyMachine

Weirdo
Regular
Joined
Sep 24, 2017
Messages
38
Reaction score
55
First Language
English
Primarily Uses
RMMV
Hiya!

So, I'm currently using Yanfly's option core menu thing, and I was wondering how I would add SRD's windowskin, font & language options to it.

I get how to add custom options, the problem I'm having is having the option display what it's using (Windowskin option showing which one is currently selected)

I'm probably just horrible at this and there's a really simple way to do it.

any help would be amazing!
 

Oscar92player

Regular
Regular
Joined
Jul 26, 2012
Messages
564
Reaction score
268
First Language
Spanish
Primarily Uses
RMMV
Maybe I can help you, since I was able to make the Window Skin option. Inside one of the Categories, just create a new option (call it whatever you want, Window Skins, Window Styles... and make a proper help description).

Then you have to put this in the 'Symbol' parameter:
Code:
windowSkin

Next you need to do, is to go to the 'Draw Option Code' and paste this:
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 = value / 19;
this.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');

BE VERY CAREFUL, since the line 'var rate = value / 19;' has the number of Window Skins you are going to have (withouth counting the Default one). That means that, if you have a default window skin and other 4 window skin options, you only need to put those 4, and the line will look like this:
Code:
var rate = value / 4;

If you are going to configure more window skins in th SumRndmDde plugin, don't forget to add the new value there and in the next parameters we are going to see, ok?

In the 'Process OK Code' parameter put this:
Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
if (value > 19) {
  value = 0;
}
value = value.clamp(0, 19);
this.changeValue(symbol, value);

And again, BE CAREFUL with those numbers. Change the '19' number for the number of window skins you are going to use.

In the 'Cursor Right Code' parameter put this:
Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
value = value.clamp(0, 19);
this.changeValue(symbol, value);

Again, change the '19' number for the number of window skins you are going to use.

In the 'Cursor Left Code' parameter put this:
Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
value = value.clamp(0, 19);
this.changeValue(symbol, value);

May I have to say the same thing about the '19' number?

Put this in the 'Default Config Code' parameter:
Code:
ConfigManager[symbol] = 0;

This will make that the default window will be there the first time the player plays the game.

And finally, put this in the 'Load Config Code' parameter:
Code:
var value = config[symbol];
if (value !== undefined) {
  ConfigManager[symbol] = Number(value).clamp(0, 19);
} else {
  ConfigManager[symbol] = 0;
}

And once and for all, change the '19' number for the number of window skins you are going to use.

Hope this can be useful to you, and for those who are going to use the Window Skins plugin with YEP Options Core.
 

SleepyMachine

Weirdo
Regular
Joined
Sep 24, 2017
Messages
38
Reaction score
55
First Language
English
Primarily Uses
RMMV
Maybe I can help you, since I was able to make the Window Skin option. Inside one of the Categories, just create a new option (call it whatever you want, Window Skins, Window Styles... and make a proper help description).

Then you have to put this in the 'Symbol' parameter:
Code:
windowSkin

Next you need to do, is to go to the 'Draw Option Code' and paste this:
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 = value / 19;
this.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');

BE VERY CAREFUL, since the line 'var rate = value / 19;' has the number of Window Skins you are going to have (withouth counting the Default one). That means that, if you have a default window skin and other 4 window skin options, you only need to put those 4, and the line will look like this:
Code:
var rate = value / 4;

If you are going to configure more window skins in th SumRndmDde plugin, don't forget to add the new value there and in the next parameters we are going to see, ok?

In the 'Process OK Code' parameter put this:
Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
if (value > 19) {
  value = 0;
}
value = value.clamp(0, 19);
this.changeValue(symbol, value);

And again, BE CAREFUL with those numbers. Change the '19' number for the number of window skins you are going to use.

In the 'Cursor Right Code' parameter put this:
Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
value = value.clamp(0, 19);
this.changeValue(symbol, value);

Again, change the '19' number for the number of window skins you are going to use.

In the 'Cursor Left Code' parameter put this:
Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
value = value.clamp(0, 19);
this.changeValue(symbol, value);

May I have to say the same thing about the '19' number?

Put this in the 'Default Config Code' parameter:
Code:
ConfigManager[symbol] = 0;

This will make that the default window will be there the first time the player plays the game.

And finally, put this in the 'Load Config Code' parameter:
Code:
var value = config[symbol];
if (value !== undefined) {
  ConfigManager[symbol] = Number(value).clamp(0, 19);
} else {
  ConfigManager[symbol] = 0;
}

And once and for all, change the '19' number for the number of window skins you are going to use.

Hope this can be useful to you, and for those who are going to use the Window Skins plugin with YEP Options Core.

Oh my god, you are an actual lifesaver. Thank you so so much!
 

Moxy

Regular
Regular
Joined
Jan 21, 2018
Messages
37
Reaction score
9
First Language
English
Primarily Uses
RMMV
This worked great for me! If anyone else is having issues with the SRD Font Plugin working with the Options Core Plugin, it's the same settings as above, with your number of fonts (minus the default), and the Command Symbol is fontStyle
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
10,554
Reaction score
6,819
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

How it feels right now with Advent resources and Sleigh the Competition event screenshots coming in.
WindRyder_ChristmasIncoming.png
So, apparently, Glow-in-the-Dark cats exist.

Are Sir Oinkers and the fairy responsible for all those dead uhm sleeping monsters?
Well, they now can be in your game, thanks to Day 4's content!
1701691228682.png
Stealing.
1701688258164287088.gif

Forum statistics

Threads
136,736
Messages
1,269,346
Members
180,456
Latest member
nosebleedfreak
Top