This is the plugin i have so far. I am trying to set the Party and Actor command window to be in the same position centered at the bottom of the screen and show only text no backgrounds. Any help would be great thank you!
/*:
* @target MZ
* @plugindesc Customizes the position of the party, actor, and auto battle command windows.
* @Help This plugin changes the position of the command windows to be centered and at the bottom, and removes gaps between commands.
*/
(() => {
// Center and position Party Command Window
const _partyCommandWindowRect = Scene_Battle.prototype.partyCommandWindowRect;
Scene_Battle.prototype.partyCommandWindowRect = function() {
const rect = _partyCommandWindowRect.apply(this, arguments);
rect.x = (Graphics.width - rect.width) / 2;
rect.y = Graphics.height - rect.height - 100; // Adjust as needed
return rect;
};
// Center and position Actor Command Window
const _actorCommandWindowRect = Scene_Battle.prototype.actorCommandWindowRect;
Scene_Battle.prototype.actorCommandWindowRect = function() {
const rect = _actorCommandWindowRect.apply(this, arguments);
rect.x = (Graphics.width - rect.width) / 2;
rect.y = Graphics.height - rect.height - 100; // Same Y value as Party Command Window
return rect;
};
// Center and position Auto Battle Command Window
const _autoBattleWindowRect = Scene_Battle.prototype.autoBattleWindowRect;
Scene_Battle.prototype.autoBattleWindowRect = function() {
const width = Graphics.width;
const height = this.calcWindowHeight(1, false);
const x = 0;
const y = (Graphics.height - height) / 2;
return new Rectangle(x, y, width, height);
};
// Customize commands in the Party Command Window
Window_PartyCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.fight, 'fight');
this.addCommand(TextManager.autoBattle, 'autoBattle');
this.addCommand(TextManager.escape, 'escape', BattleManager.canEscape());
};
// Customize the window drawing to remove gaps
Window_PartyCommand.prototype.drawItem = function(index) {
const rect = this.itemRectForText(index);
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, 'center');
};
Window_PartyCommand.prototype.itemRectForText = function(index) {
const rect = Window_Selectable.prototype.itemRectForText.call(this, index);
rect.y = index * this.lineHeight();
return rect;
};
// Customize commands in the Actor Command Window
Window_ActorCommand.prototype.makeCommandList = function() {
if (this._actor) {
this.addAttackCommand();
this.addSkillCommands();
this.addGuardCommand();
this.addItemCommand();
}
};
Window_ActorCommand.prototype.drawItem = function(index) {
const rect = this.itemRectForText(index);
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, 'center');
};
Window_ActorCommand.prototype.itemRectForText = function(index) {
const rect = Window_Selectable.prototype.itemRectForText.call(this, index);
rect.y = index * this.lineHeight();
return rect;
};
})();
/*:
* @target MZ
* @plugindesc Customizes the position of the party, actor, and auto battle command windows.
* @Help This plugin changes the position of the command windows to be centered and at the bottom, and removes gaps between commands.
*/
(() => {
// Center and position Party Command Window
const _partyCommandWindowRect = Scene_Battle.prototype.partyCommandWindowRect;
Scene_Battle.prototype.partyCommandWindowRect = function() {
const rect = _partyCommandWindowRect.apply(this, arguments);
rect.x = (Graphics.width - rect.width) / 2;
rect.y = Graphics.height - rect.height - 100; // Adjust as needed
return rect;
};
// Center and position Actor Command Window
const _actorCommandWindowRect = Scene_Battle.prototype.actorCommandWindowRect;
Scene_Battle.prototype.actorCommandWindowRect = function() {
const rect = _actorCommandWindowRect.apply(this, arguments);
rect.x = (Graphics.width - rect.width) / 2;
rect.y = Graphics.height - rect.height - 100; // Same Y value as Party Command Window
return rect;
};
// Center and position Auto Battle Command Window
const _autoBattleWindowRect = Scene_Battle.prototype.autoBattleWindowRect;
Scene_Battle.prototype.autoBattleWindowRect = function() {
const width = Graphics.width;
const height = this.calcWindowHeight(1, false);
const x = 0;
const y = (Graphics.height - height) / 2;
return new Rectangle(x, y, width, height);
};
// Customize commands in the Party Command Window
Window_PartyCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.fight, 'fight');
this.addCommand(TextManager.autoBattle, 'autoBattle');
this.addCommand(TextManager.escape, 'escape', BattleManager.canEscape());
};
// Customize the window drawing to remove gaps
Window_PartyCommand.prototype.drawItem = function(index) {
const rect = this.itemRectForText(index);
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, 'center');
};
Window_PartyCommand.prototype.itemRectForText = function(index) {
const rect = Window_Selectable.prototype.itemRectForText.call(this, index);
rect.y = index * this.lineHeight();
return rect;
};
// Customize commands in the Actor Command Window
Window_ActorCommand.prototype.makeCommandList = function() {
if (this._actor) {
this.addAttackCommand();
this.addSkillCommands();
this.addGuardCommand();
this.addItemCommand();
}
};
Window_ActorCommand.prototype.drawItem = function(index) {
const rect = this.itemRectForText(index);
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, 'center');
};
Window_ActorCommand.prototype.itemRectForText = function(index) {
const rect = Window_Selectable.prototype.itemRectForText.call(this, index);
rect.y = index * this.lineHeight();
return rect;
};
})();