- Joined
- Feb 22, 2016
- Messages
- 1,846
- Reaction score
- 1,599
- First Language
- English
- Primarily Uses
- RMMV
Hi, I'm looking for a way to bring up the "InBattleStatus" scene via a Common Event. The plugin only has 2 plugin commands and those are only to show/hide the command itself during the battle scene. This doesn't work for me since I'll never be in the default battle scene due to me using LTBS. So I thought linking an LTBS command to a Common Event that brings up Yanfly's "InBattleStatus" screen might work. All I need is the scriptcall to manually call it.
I think one of these code blocks might contain what I need, but I'm too noob to tell lol...
Let me know if I need to remove the code I pasted since it's a paid plugin. My thinking is that since it's only a small fraction of the plugin, it can't actually be used w/ just what I posted.
Edit:
I also need to do the same w/ YEP_X_ChangeBattleEquip.js, which I think will require a similar solution.
I think one of these code blocks might contain what I need, but I'm too noob to tell lol...
JavaScript:
//=============================================================================
// Window_InBattleStatus
//=============================================================================
function Window_InBattleStatus() {
this.initialize.apply(this, arguments);
}
Window_InBattleStatus.prototype = Object.create(Window_Base.prototype);
Window_InBattleStatus.prototype.constructor = Window_InBattleStatus;
JavaScript:
//=============================================================================
// Window_BattleStatus
//=============================================================================
Window_BattleStatus.prototype.setInBattleStatusWindow = function(win) {
this._inBattleStatusWindow = win;
};
JavaScript:
//=============================================================================
// Scene_Battle
//=============================================================================
Yanfly.IBS.Scene_Battle_createAllWindows =
Scene_Battle.prototype.createAllWindows;
Scene_Battle.prototype.createAllWindows = function() {
Yanfly.IBS.Scene_Battle_createAllWindows.call(this);
this.createInBattleStatusWindows();
};
Scene_Battle.prototype.createInBattleStatusWindows = function() {
this._inBattleStatusWindow = new Window_InBattleStatus();
this.addChild(this._inBattleStatusWindow);
var win = this._inBattleStatusWindow;
this._inBattleStateList = new Window_InBattleStateList(win);
this._inBattleStateList.setHelpWindow(this._helpWindow);
this._inBattleStateList.setStatusWindow(this._statusWindow);
this.addChild(this._inBattleStateList);
this._inBattleStateList.setHandler('cancel',
this.onInBattleStatusCancel.bind(this));
this._statusWindow.setInBattleStatusWindow(this._inBattleStateList);
};
Yanfly.IBS.Scene_Battle_createPartyCommandWindow =
Scene_Battle.prototype.createPartyCommandWindow;
Scene_Battle.prototype.createPartyCommandWindow = function() {
Yanfly.IBS.Scene_Battle_createPartyCommandWindow.call(this);
var win = this._partyCommandWindow;
win.setHandler('inBattleStatus', this.commandInBattleStatus.bind(this));
};
Scene_Battle.prototype.commandInBattleStatus = function() {
this._helpWindow.show();
this._inBattleStatusWindow.show();
this._inBattleStateList.show();
this._inBattleStateList.activate();
this._inBattleStateList.setBattler($gameParty.battleMembers()[0]);
if (Imported.YEP_X_PartyLimitGauge) {
this._showPartyLimitGauge = $gameSystem.isShowPartyLimitGauge();
this._showTroopLimitGauge = $gameSystem.isShowTroopLimitGauge();
$gameSystem.setShowPartyLimitGauge(false);
$gameSystem.setShowTroopLimitGauge(false);
}
};
Edit:
I also need to do the same w/ YEP_X_ChangeBattleEquip.js, which I think will require a similar solution.
Last edited: