- Joined
- Jan 7, 2019
- Messages
- 6
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMMV
Hi! I'm currently editing a script to hide a window, specifically Window_BattleStatus when you escape from battle. This is because when my windows fade in and out, there's an extra second of Window_BattleStatus fading that looks sloppy. Sometimes it doesn't show up, sometimes it does.
The script I'm editing is AutoBattlePlus. Here is what I have so far:
Using this.visible = false gives me the effect that I want at first, but when entering another battle Window_BattleStatus is as expected, not visible. I'm not really sure how to get it to appear normally again. Or should I just do something else entirely?
Any and all help is appreciated, thanks in advance.
The script I'm editing is AutoBattlePlus. Here is what I have so far:
Code:
//=============================================================================
// AutoBattlePlus.js
//=============================================================================
/*:
* @plugindesc add 'auto' and 'repeat' to battle party command
* @author Sasuke KANNAZUKI (thx to tomoaky)
*
* @param Auto Command Name
* @desc Command name of Auto
* @default Auto
*
* @param Repeat Command Name
* @desc Command name of Repeat
* @default Repeat
*
* @help This plugin does not provide plugin commands.
*
* - Choose "Auto" to all actors determine automatically their actions
* at the turn.
* - Choose "Repeat" to make actors the same action as the previous turn.
*
* note:
* - At "Repeat" mode, when the actor cannot perform the same action
* (ex. MP has run out), perform normal attack instead.
* - When choose "Repeat" at first turn, let all actions be normal attack.
*
* copyright: this plugin is based on tomoaky's RGSS3 script material.
* see "Hikimoki" http://hikimoki.sakura.ne.jp/
* Thanks to tomoaky.
*
* This plugin is released under MIT license.
* http://opensource.org/licenses/mit-license.php
*/
(function() {
var parameters = PluginManager.parameters('AutoBattlePlus');
var autoName = parameters['Auto Command Name'] || 'Auto';
var repeatName = parameters['Repeat Command Name'] || 'Repeat';
Window_PartyCommand.prototype.makeCommandList = function() {
this.addCommand(autoName, 'auto');
this.addCommand(TextManager.escape, 'escape');
};
var _Scene_Battle_createPartyCommandWindow =
Scene_Battle.prototype.createPartyCommandWindow;
Scene_Battle.prototype.createPartyCommandWindow = function() {
_Scene_Battle_createPartyCommandWindow.call(this);
this._partyCommandWindow.setHandler('auto', this.commandAuto.bind(this));
this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this));
};
Scene_Battle.prototype.commandAuto = function() {
$gameParty.members()[0].addState(11);
$gameParty.members()[0].makeAutoBattleActions();
BattleManager.startTurn();
};
Scene_Battle.prototype.commandEscape = function() {
BattleManager.processEscape();
Window_BattleStatus.prototype.update = function() {
this.visible = false;};
};
})()
Using this.visible = false gives me the effect that I want at first, but when entering another battle Window_BattleStatus is as expected, not visible. I'm not really sure how to get it to appear normally again. Or should I just do something else entirely?
Any and all help is appreciated, thanks in advance.
Last edited:

