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 = 101; // 1.01
- //=============================================================================
- /*:
- * @plugindesc v1.01 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
- *
- * @param XParam0 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Hit rate
- *
- * @param XParam1 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Evasion rate
- *
- * @param XParam2 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Critical rate
- *
- * @param XParam3 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Critical evasion rate
- *
- * @param XParam4 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Magic evasion rate
- *
- * @param XParam5 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Magic reflection rate
- *
- * @param XParam6 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Counter-attack rate
- *
- * @param XParam7 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Hp-regen rate
- *
- * @param XParam8 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Mp-regen rate
- *
- * @param XParam9 Full Name
- * @desc Name that will be shown for this extra param.
- * @default Tp-regen rate
- *
- * @param SParam0 Full Name
- * @desc Name that will be shown for this special param.
- * @default Targeted rate
- *
- * @param SParam1 Full Name
- * @desc Name that will be shown for this special param.
- * @default Guard rate
- *
- * @param SParam2 Full Name
- * @desc Name that will be shown for this special param.
- * @default Recovery rate
- *
- * @param SParam3 Full Name
- * @desc Name that will be shown for this special param.
- * @default Pharmacology
- *
- * @param SParam4 Full Name
- * @desc Name that will be shown for this special param.
- * @default Mp cost rate
- *
- * @param SParam5 Full Name
- * @desc Name that will be shown for this special param.
- * @default Tp cost rate
- *
- * @param SParam6 Full Name
- * @desc Name that will be shown for this special param.
- * @default Phisical damage rate
- *
- * @param SParam7 Full Name
- * @desc Name that will be shown for this special param.
- * @default Magical damage rate
- *
- * @param SParam8 Full Name
- * @desc Name that will be shown for this special param.
- * @default Floor damage rate
- *
- * @param SParam9 Full Name
- * @desc Name that will be shown for this special param.
- * @default Experience rate
- *
- * @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.
- *
- * ============================================================================
- * Changelog
- * ============================================================================
- *
- * Version 1.01:
- * - Allow to show special and extra params.
- *
- * Version 1.00:
- * - Finished plugin!
- *
- * ============================================================================
- *
- * For commercial and non-commercial games.
- * Credit to ICF-Soft.
- * This entire header must be included with plugin.
- *
- * ============================================================================
- */
- //=============================================================================
- /*:es
- * @plugindesc v1.01 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
- *
- * @param XParam0 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Puntería
- *
- * @param XParam1 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Evasión
- *
- * @param XParam2 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Probabilidad de crítico
- *
- * @param XParam3 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Evadir crítico
- *
- * @param XParam4 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Evasión mágica
- *
- * @param XParam5 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Reflejo mágico
- *
- * @param XParam6 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Contraataque
- *
- * @param XParam7 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Regenerar vida
- *
- * @param XParam8 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Regenerar magia
- *
- * @param XParam9 Full Name
- * @desc Nombre mostrado para este parámetro extra.
- * @default Regenerar turbo
- *
- * @param SParam0 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Ser el objetivo
- *
- * @param SParam1 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Efecto defensivo
- *
- * @param SParam2 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Efecto de recuperación
- *
- * @param SParam3 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Farmacología
- *
- * @param SParam4 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Coste de mp
- *
- * @param SParam5 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Coste de tp
- *
- * @param SParam6 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Daño físico recibido
- *
- * @param SParam7 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Daño mágico recibido
- *
- * @param SParam8 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Daño por el terreno
- *
- * @param SParam9 Full Name
- * @desc Nombre mostrado para este parámetro especial.
- * @default Experiencia obtenible
- *
- * @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.
- *
- * ============================================================================
- * Historial de versiones
- * ============================================================================
- *
- * Versión 1.01:
- * - Permite mostrar los parámetros especiales y extra.
- *
- * Versión 1.00:
- * - Complemento terminado.
- *
- * ============================================================================
- *
- * 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.XParamsFullName = [];
- ICF.Param.XParams = ["hit", "eva", "cri", "cev", "mev", "mrf", "cnt", "hrg", "mrg", "trg"];
- ICF.Param.SParamsFullName = [];
- ICF.Param.SParams = ["tgr", "grd", "rec", "pha", "mcr", "tcr", "pdr", "mdr", "fdr", "exr"];
- for (var i = 0; i < 10; i++) {
- ICF.Param.XParamsFullName[i] = String(ICF.Parameters['XParam' + i + ' Full Name']);
- ICF.Param.SParamsFullName[i] = String(ICF.Parameters['SParam' + i + ' Full Name']);
- }
- }
- //=============================================================================
- // 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));
- } else if (ICF.Param.XParams.indexOf(ary[i]) > -1) {
- var paramId = ICF.Param.XParams.indexOf(ary[i]);
- param.push(ICF.Param.XParamsFullName[paramId]);
- param.push((this._actor.xparam(paramId)*100).toFixed(2) + "%");
- } else if (ICF.Param.SParams.indexOf(ary[i]) > -1) {
- var paramId = ICF.Param.SParams.indexOf(ary[i]);
- param.push(ICF.Param.SParamsFullName[paramId]);
- param.push((this._actor.sparam(paramId)*100).toFixed(2) + "%");
- }
- 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