Is there a way to append a '%' sign to the value of MP gauges? I'm using Visustella plugins.
There aren't plugin parameters in the menu core or battle status or whatever you're using that determine the layout?
Sprite_Gauge.prototype.drawValue = function() {
const currentValue = this.currentValue();
const width = this.bitmapWidth();
const height = this.textHeight();
this.setupValueFont();
this.bitmap.drawText(currentValue, 0, 0, width, height, "right");
};currentValue + '%'Sprite_Gauge.prototype.drawValue = function() {
const currentValue = this.currentValue();
const width = this.bitmapWidth();
const height = this.textHeight();
this.setupValueFont();
this.bitmap.drawText(currentValue, 0, 0, width, height, "right");
};currentValue + '%'(), e.g. $gamePlayer.screenX().delete window._handlers['pageup']window.setHandler('pagedown', this.nextActor.bind(this));/*:
* @target MV MZ
* @plugindesc Disable changing actor in menu when a switch is on.
* @author Caethyril
* @url https://forums.rpgmakerweb.com/posts/1481918/
* @help Free to use and/or modify for any project, no credit required.
*/
;void (function() {
"use strict";
/** Next/prev actor is blocked when this switch is on. @type {number} */
const SWITCH_ID = 123;
/** @returns {boolean} `true` iff next/prev menu actor is allowed. */
const isOk = function() {
return !$gameSwitches.value(SWITCH_ID); // "switch is off"
};
const alias_next = Scene_MenuBase.prototype.nextActor;
Scene_MenuBase.prototype.nextActor = function() {
if (isOk()) alias_next.apply(this, arguments);
};
const alias_prev = Scene_MenuBase.prototype.previousActor;
Scene_MenuBase.prototype.previousActor = function() {
if (isOk()) alias_prev.apply(this, arguments);
};
})();SWITCH_ID number as needed~/*:
* @target MV MZ
* @plugindesc Disable changing status actor when a switch is on.
* @author Caethyril
* @url https://forums.rpgmakerweb.com/posts/1481927/
* @help Free to use and/or modify for any project, no credit required.
*/
;void (function() {
"use strict";
/** Next/prev actor is blocked when this switch is on. @type {number} */
const SWITCH_ID = 123;
/** @returns {boolean} `true` iff next/prev menu actor is allowed. */
const isOk = function() {
return !$gameSwitches.value(SWITCH_ID); // "switch is off"
};
const alias_next = Scene_MenuBase.prototype.nextActor;
Scene_MenuBase.prototype.nextActor = function() {
if (isOk())
alias_next.apply(this, arguments);
else
this.onActorChange();
};
const alias_prev = Scene_MenuBase.prototype.previousActor;
Scene_MenuBase.prototype.previousActor = function() {
if (isOk())
alias_prev.apply(this, arguments);
else
this.onActorChange();
};
})();