Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // ICF-Soft Plugins - Status Menu
- // ICFSoft_StatusMenu.js
- //=============================================================================
- var Imported = Imported || {};
- Imported.ICFSoft_StatusMenu = true;
- var ICF = ICF || {};
- ICF.StatusMenu = ICF.StatusMenu || {};
- ICF.StatusMenu.Version = 100; // 1.00
- //=============================================================================
- /*:
- * @plugindesc v1.00b A status menu where you can organize actor params.
- * @author ICF-Soft [http://icfsoft.blogspot.com.es/]
- *
- * @param Column1
- * @desc Param names that will be shown in column.
- * @default atk def mat mdf agi luk
- *
- * @param Column2
- * @desc Param names that will be shown in column.
- * @default
- *
- * @param Column3
- * @desc Param names that will be shown in column.
- * @default
- *
- * @param Percentage params
- * @desc What params will be used as percentages.
- * @default
- *
- * @help
- * ============================================================================
- * Introduction
- * ============================================================================
- *
- * This plugin is made for use with ICF-Soft Params Core but can work alone.
- *
- * Allows you to show params in up to three columns plus equip, using all
- * window width.
- *
- * More features will be added in the future.
- *
- * ============================================================================
- * Parameters
- * ============================================================================
- *
- * ColumnX: Place the param names that will be shown in comlumn separated by
- * spaces. You can use up to 3 columns sharing width with equips.
- * It works with param, nparam and pparam.
- *
- * Percentage params: Tell what params will be used as percentages.
- * It works with pparam.
- *
- * ============================================================================
- * Incompatibilities
- * ============================================================================
- *
- * Can be incompatible or interfere with some similar plugins.
- *
- * ============================================================================
- * Known isues
- * ============================================================================
- *
- * Can interfere with some similar plugins or enhace them.
- *
- * ============================================================================
- *
- * For commercial and non-commercial games.
- * Credit to ICF-Soft.
- * This entire header must be included with plugin.
- *
- * ============================================================================
- */
- //=============================================================================
- /*:es
- * @plugindesc v1.00b Una ventana de estado que permite mostrar
- * los nparam y los pparam.
- * @author ICF-Soft [http://icfsoft.blogspot.com.es/]
- *
- * @param Column1
- * @desc Nombres básicos de los parámetros separados por espacios.
- * @default atk def mat mdf agi luk
- *
- * @param Column2
- * @desc Nombres básicos de los parámetros separados por espacios.
- * @default
- *
- * @param Column3
- * @desc Nombres básicos de los parámetros separados por espacios.
- * @default
- *
- * @param Percentage params
- * @desc Indica qué parámetros serán tratados como porcentajes.
- * @default
- *
- * @help
- * ============================================================================
- * Introducción
- * ============================================================================
- *
- * Este plugin está hecho para su uso con el ICF-Soft Params Core pero puede
- * usarse solo.
- *
- * Permite mostrar los parámetros en hasta tres columnas aparte del
- * equipamiento aprovechando todo el ancho.
- *
- * Iré añadiendo más características.
- *
- * ============================================================================
- * Parámetros
- * ============================================================================
- *
- * ColumnX: Para colocar los nombres básicos de los parámetros separados por
- * espacios. Hay hasta 3 columnas repartidas entre el ancho de la ventana.
- * Por el momento funciona con los param, nparam y pparam.
- *
- * Percentage params: Indica qué parámetros serán tratados como porcentajes.
- * Usa dos decimales. De momento solo para los pparam.
- *
- * ============================================================================
- * Incompatibilidades
- * ============================================================================
- *
- * Puede ser incompatible con otros plugins similares.
- *
- * ============================================================================
- * Problemas conocidos
- * ============================================================================
- *
- * Puede interferir con otros plugins similares. Pero puede combinarse
- * con otros.
- *
- * ============================================================================
- *
- * Para juegos comerciales y no comerciales.
- * Se debe incluir a ICF-Soft en los créditos.
- * Esta cabecera debe incluirse íntegramente con el plugin.
- *
- * ============================================================================
- */
- //=============================================================================
- //=============================================================================
- // Parameter Variables
- //=============================================================================
- ICF.Parameters = PluginManager.parameters('ICFSoft_StatusMenu');
- ICF.Param = ICF.Param || {};
- ICF.Param.StatusMenuCol1 = ICF.Parameters['Column1'].toLowerCase().split(/\s+/);
- ICF.Param.StatusMenuCol2 = ICF.Parameters['Column2'].toLowerCase().split(/\s+/);
- ICF.Param.StatusMenuCol3 = ICF.Parameters['Column3'].toLowerCase().split(/\s+/);
- ICF.Param.PercentageParams = ICF.Parameters['Percentage params'].toLowerCase().split(/\s+/);
- if (ICF.Param.StatusMenuCol1[0] == "") ICF.Param.StatusMenuCol1.shift();
- if (ICF.Param.StatusMenuCol2[0] == "") ICF.Param.StatusMenuCol2.shift();
- if (ICF.Param.StatusMenuCol3[0] == "") ICF.Param.StatusMenuCol3.shift();
- if (!Imported.ICFSoft_ParamCore) {
- ICF.Param.NParams = [];
- ICF.Param.PParams = [];
- ICF.Param.BParams = ["mhp", "mmp", "atk", "def", "mat", "mdf", "agi", "luk"];
- ICF.Param.XParams = ["hit", "eva", "cri", "cev", "mev", "mrf", "cnt", "hrg", "mrg", "trg"];
- ICF.Param.SParams = ["tgr", "grd", "rec", "pha", "mcr", "tcr", "pdr", "mdr", "fdr", "exr"];
- }
- //=============================================================================
- // Window_Status
- //=============================================================================
- Window_Status.prototype.drawBlock3 = function(y) {
- if (ICF.Param.StatusMenuCol1.length == 0) {
- this.drawEquipments(this.contentsWidth()/2, y);
- } else if (ICF.Param.StatusMenuCol2.length == 0) {
- var width = this.contentsWidth() / 2 - this.textPadding() * 3;
- this.drawParameters(this.textPadding(), y, width, ICF.Param.StatusMenuCol1);
- this.drawEquipments(this.contentsWidth()/2 + this.textPadding(), y);
- } else if (ICF.Param.StatusMenuCol3.length == 0) {
- var width = this.contentsWidth() / 3 - this.textPadding() * 4;
- this.drawParameters(this.textPadding(), y, width, ICF.Param.StatusMenuCol1);
- this.drawParameters(this.contentsWidth()/3 + this.textPadding(), y, width, ICF.Param.StatusMenuCol2);
- this.drawEquipments(this.contentsWidth()*2/3 + this.textPadding(), y);
- } else {
- var width = this.contentsWidth() / 4 - this.textPadding() * 5;
- this.drawParameters(this.textPadding(), y, width, ICF.Param.StatusMenuCol1);
- this.drawParameters(this.contentsWidth()/4 + this.textPadding(), y, width, ICF.Param.StatusMenuCol2);
- this.drawParameters(this.contentsWidth()*2/4 + this.textPadding(), y, width, ICF.Param.StatusMenuCol3);
- this.drawEquipments(this.contentsWidth()*3/4 + this.textPadding(), y);
- }
- };
- ICF.StatusMenu.drawParamsOldStyle = Window_Status.prototype.drawParameters;
- Window_Status.prototype.drawParameters = function(x, y, width, ary) {
- if ((width == undefined)||(ary == undefined)) {
- ICF.StatusMenu.drawParamsOldStyle.call(this, x, y);
- return;
- }
- var lineHeight = this.lineHeight();
- var y2 = y;
- for (var i = 0; i < ary.length; i++) {
- var param = [];
- if (ICF.Param.NParams.indexOf(ary[i]) > -1) {
- var paramId = ICF.Param.NParams.indexOf(ary[i]);
- param.push(ICF.Param.NParamsFullName[paramId]);
- param.push(this._actor.NParam(paramId));
- } else if (ICF.Param.PParams.indexOf(ary[i]) > -1) {
- var paramId = ICF.Param.PParams.indexOf(ary[i]);
- param.push(ICF.Param.PParamsFullName[paramId]);
- if (ICF.Param.PercentageParams.indexOf(ary[i]) > -1) {
- param.push((this._actor.PParam(paramId)*100).toFixed(2) + "%");
- } else {
- param.push(Math.trunc(this._actor.PParam(paramId)));
- }
- } else if (ICF.Param.BParams.indexOf(ary[i]) > -1) {
- var paramId = ICF.Param.BParams.indexOf(ary[i]);
- param.push(TextManager.param(paramId));
- param.push(this._actor.param(paramId));
- }
- if (param.length > 0) {
- this.changeTextColor(this.systemColor());
- this.drawText(param[0], x, y2, width * 2 / 3);
- this.resetTextColor();
- this.drawText(param[1], x + width * 2 / 3, y2, width / 3, 'right');
- }
- y2 += lineHeight;
- }
- };
- //=============================================================================
- // End of File
- //=============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement