Yanfly Options Core and SRD Options (Windowskin, Font & Language)

Status
Not open for further replies.

SleepyMachine

Weirdo
Veteran
Joined
Sep 24, 2017
Messages
38
Reaction score
45
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

Veteran
Veteran
Joined
Jul 26, 2012
Messages
450
Reaction score
199
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
Veteran
Joined
Sep 24, 2017
Messages
38
Reaction score
45
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

Villager
Member
Joined
Jan 21, 2018
Messages
28
Reaction score
3
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
5,897
Reaction score
4,217
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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I'm play DQ:XI DE in 2d mode with the synthesized soundtrack, the only way a RPGMAKER creator should play it. :D
:/ it really get on my nerves reading stuff about how to write a resume and they say things like "turn your failures into wins!!!" ... no interview Ive ever had cared to hear anything about my failures, and why would they :( ?
"Huh? You haven't backed up yet? *menacing stare* "
Been having a lot of fun playing Hearts of Iron IV. Had to restart a few times, but now I've finally conquerd Europe with my Axis friends, and am currently invading the Soviet Union.
Guess I'll rework all the existing screens in my game. Except of the save/battle screen. For this I will be lazy and use Yanfly. With my current pace it'll take a few months.

Forum statistics

Threads
93,632
Messages
914,144
Members
123,221
Latest member
Luspeon
Top