- Joined
- Jan 4, 2023
- Messages
- 8
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
Hi there! I'm looking for a plugin that will make status ailments appear in a separate window on the battle screen. Are there any for front facing battles?
Hi there! I'm looking for a plugin that will make status ailments appear in a separate window on the battle screen. Are there any for front facing battles?
//=============================================================================
// * KShowBattleStatesMV.js
//=============================================================================
/*:
* @plugindesc It simply creates a new window where you can keep track of all
* of the heroes' states without cluttering the Actors' Status Window
* @author Kyonides Arkanthes
* @help Date: 2023-02-10.
* # * Free as in Beer * #
* If you want to change the button that changes the Battle Status window's
* contents, simply click on the only Plugin Parameter this code has and
* enter your favorite button therein.
* @param View Mode Button
* @type text
* @text View Mode Button
* @value shift
* @default shift
*
*/
function KShowBattleStates() {
throw new Error('Seriously, why would you ever treat a static class just ' +
'like a regular function?');
};
const param = PluginManager.parameters("KShowBattleStatesMV");
KShowBattleStates.view_button = param["View Mode Button"];
KShowBattleStates.default_mode = true;
KShowBattleStates.times = 0;
KShowBattleStates.view_command = "Show/Hide States";
KShowBattleStates.make_comm_list = Window_PartyCommand.prototype.makeCommandList;
KShowBattleStates.win_init = Window_BattleStatus.prototype.initialize;
Window_BattleStatus.prototype.initialize = function() {
KShowBattleStates.win_init.call(this);
this.view_button = KShowBattleStates.view_button;
this.reset_timer();
KShowBattleStates.times = 0;
};
Window_BattleStatus.prototype.reset_timer = function() {
Input.clear;
KShowBattleStates.times++;
this.input_timer = 1;
};
Window_PartyCommand.prototype.makeCommandList = function() {
KShowBattleStates.make_comm_list.call(this);
this.addCommand(KShowBattleStates.view_command, 'states');
};
Window_BattleStatus.prototype.drawItem = function(index) {
let actor = $gameParty.battleMembers()[index];
this.drawBasicArea(this.basicAreaRect(index), actor);
if (KShowBattleStates.default_mode) {
this.drawGaugeArea(this.gaugeAreaRect(index), actor);
}
};
Window_BattleStatus.prototype.basicAreaRect = function(index) {
let rect = this.itemRectForText(index);
if (KShowBattleStates.default_mode) {
rect.width -= this.gaugeAreaWidth() + 15;
}
return rect;
};
Window_BattleStatus.prototype.drawBasicArea = function(rect, actor) {
this.drawActorName(actor, rect.x + 0, rect.y, 150);
if (!KShowBattleStates.default_mode) {
this.drawActorIcons(actor, rect.x + 156, rect.y, rect.width - 156);
}
};
Window_BattleStatus.prototype.is_time_up = function() {
return this.input_timer == 0 && KShowBattleStates.times == 0;
};
Window_BattleStatus.prototype.update = function() {
Window_Selectable.prototype.update.call(this);
if (this.input_timer > 0) {
this.input_timer--;
KShowBattleStates.times = this.input_timer == 0 ? 0 : 1;
return true;
}
if (Input.isTriggered(this.view_button) && this.is_time_up()) {
SoundManager.playOk;
KShowBattleStates.default_mode = !KShowBattleStates.default_mode;
this.refresh();
this.reset_timer();
}
};
KShowBattleStates.times++;
KShowBattleStates.times = 0;