//=============================================================================
// Llareian - Lemons Status Variable (v1.0), LLA_LemonsStatusVariable.js
//=============================================================================
/*:
@author Llareian
@plugindesc Adds a variable value to the standard status menu, beneath EXP & To Next Level.
@param Show TP?
@desc Whether to show TP bar on Status Menu. (true or false)
@Default true
@param Variable Label
@desc Exactly how you want the variable to be labeled on Status Menu.
@Default Current SP
@param ---Variables---
@param Actor1 VarID
@desc The Variable ID number for Actor 01.
@param Actor2 VarID
@desc The Variable ID number for Actor 02.
@param Actor3 VarID
@desc The Variable ID number for Actor 03.
@param Actor4 VarID
@desc The Variable ID number for Actor 04.
@param Actor5 VarID
@desc The Variable ID number for Actor 05.
@param Actor6 VarID
@desc The Variable ID number for Actor 06.
@param Actor7 VarID
@desc The Variable ID number for Actor 07.
@param Actor8 VarID
@desc The Variable ID number for Actor 08.
@param Actor9 VarID
@desc The Variable ID number for Actor 09.
@param Actor10 VarID
@desc The Variable ID number for Actor 10.
@param Actor11 VarID
@desc The Variable ID number for Actor 11.
@param Actor12 VarID
@desc The Variable ID number for Actor 12.
@param Actor13 VarID
@desc The Variable ID number for Actor 13.
@param Actor14 VarID
@desc The Variable ID number for Actor 14.
@param Actor15 VarID
@desc The Variable ID number for Actor 15.
@param Actor16 VarID
@desc The Variable ID number for Actor 16.
@param Actor17 VarID
@desc The Variable ID number for Actor 17.
@param Actor18 VarID
@desc The Variable ID number for Actor 18.
@param Actor19 VarID
@desc The Variable ID number for Actor 19.
@param Actor20 VarID
@desc The Variable ID number for Actor 20.
*/
llaLsvSwitchTp = (PluginManager.parameters('LLA_LemonsStatusVariable')["Show TP?"].toLowerCase() == 'true');
llaLsvVarLabel = PluginManager.parameters('LLA_LemonsStatusVariable')["Variable Label"];
llaLsvVarValues = [''];
for (i = 1; i <= 20; i++) {
iparam = 'Actor' + i + ' VarID'
ivalue = PluginManager.parameters('LLA_LemonsStatusVariable')[iparam];
if (ivalue != '') {llaLsvVarValues.push(ivalue)};
};
// changes the vertical spacing of Status Menu
Window_Status.prototype.refresh = function() {
this.contents.clear();
if (this._actor) {
var lineHeight = this.lineHeight();
this.drawBlock1(lineHeight * 0);
this.drawHorzLine(lineHeight * 1);
this.drawBlock2(lineHeight * 2);
this.drawHorzLine(lineHeight * 8);
this.drawBlock3(lineHeight * 9);
this.drawHorzLine(lineHeight * 15);
this.drawBlock4(lineHeight * 16);
}
};
// adds a TP guage if parameter "Show TP?" is set to true
var alias_prototype_statusdrawbasicinfo = Window_Status.prototype.drawBasicInfo;
Window_Status.prototype.drawBasicInfo = function(x, y) {
alias_prototype_statusdrawbasicinfo.call(this, x, y);
if (llaLsvSwitchTp) {
this.drawActorTp(this._actor, x, y + this.lineHeight() * 4, 186);
};
};
// fetches the variable label
Window_Status.prototype.getLSVarLabel = function() {
return llaLsvVarLabel;
};
// fetches the variable value for the current actor
Window_Status.prototype.getLSVarValue = function() {
return $gameVariables.value(llaLsvVarValues[this._actor.actorId()]);
};
// adds the variable label and value to Status Menu
var alias_prototype_statusdrawexpinfo = Window_Status.prototype.drawExpInfo;
Window_Status.prototype.drawExpInfo = function(x, y) {
alias_prototype_statusdrawexpinfo.call(this, x, y);
var value3 = this.getLSVarValue();
this.changeTextColor(this.systemColor());
this.drawText(this.getLSVarLabel(), x, y + this.lineHeight() * 4, 270);
this.resetTextColor();
this.drawText(value3, x, y + this.lineHeight() * 5, 270, 'right');
};
//=====END=OF=FILE=============================================================