//=========================================================
// CaeX_YEPStatusMenuExt.js
//=========================================================
/*:
* @plugindesc v1.0 - Lets you add more attributes to Yanfly's Status Menu Core.
* @author Caethyril
*
* @help Plugin Commands:
* None.
*
* Parameters:
* - Gold drop rate: 200% if party has Gold Double trait, else 100%.
* - Item drop rate: 200% if party has Item Drop Double trait, else 100%.
*
* Compatibility:
* Must be loaded after Yanfly's Status Menu Core plugin.
* Aliases Yanfly's drawAttributeData method on Window_StatusInfo.
*
* Terms of use:
* Free to use and modify.
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Update log:
* 1.0: Initial release.
*
* @param --- Attributes ---
* @text --- Attributes ---
* @type select
* @default
*
* @param Gold drop rate key
* @text Gold drop rate key
* @parent --- Attributes ---
* @type text
* @desc The code for use in Yanfly's Status Menu Core plugin parameters.
* @default gdr
*
* @param Gold drop rate name
* @text Gold drop rate name
* @parent --- Attributes ---
* @type text
* @desc How this entry will be labelled in-game.
* @default Gold drop rate
*
* @param Item drop rate key
* @text Item drop rate key
* @parent --- Attributes ---
* @type text
* @desc The code for use in Yanfly's Status Menu Core plugin parameters.
* @default idr
*
* @param Item drop rate name
* @text Item drop rate name
* @parent --- Attributes ---
* @type text
* @desc How this entry will be labelled in-game.
* @default Item drop rate
*/
var Imported = Imported || {}; // Import namespace, var can redefine
Imported.CaeX_YEPStatusMenuExt = 1.0; // Import declaration
var CAE = CAE || {}; // Author namespace, var can redefine
CAE.X_YEPStatusMenuExt = CAE.X_YEPStatusMenuExt || {}; // Plugin namespace
(function(_) {
if (!Imported.YEP_StatusMenuCore) console.error('CaeX_YEPStatusMenuCoreExt.js error! Could not find required plugin YEP_StatusMenuCore.js.');
_.params = PluginManager.parameters('CaeX_YEPStatusMenuExt');
_.Window_StatusInfo_drawAttributeData = Window_StatusInfo.prototype.drawAttributeData;
Window_StatusInfo.prototype.drawAttributeData = function(attr, dx, dy, dw) {
switch (attr) {
case _.params['Gold drop rate key']: // Gold drop rate
this.drawAttributeName(_.params['Gold drop rate name'], dx, dy, dw);
this.drawAttributeRate($gameParty.hasGoldDouble() ? 2 : 1, dx, dy, dw);
break;
case _.params['Item drop rate key']: // Item drop rate
this.drawAttributeName(_.params['Item drop rate name'], dx, dy, dw);
this.drawAttributeRate($gameParty.hasDropItemDouble() ? 2 : 1, dx, dy, dw);
break;
default:
_.Window_StatusInfo_drawAttributeData.call(this, attr, dx, dy, dw);
break;
}
};
})(CAE.X_YEPStatusMenuExt);