Hey friends,
Today I worked really hard to produce a simple script.
I was so happy to finally make something so that I too can contribute to the forum.
I've been working on this all day. Literally all day. more than 8 hours.
I used another script as a guide to help me.
But my script won't work.
I am disappoint....
All I wanted to do was flip the battle windows (for now).
But I can't seem to get it.
Can anyone offer some advice?
/*********************************************************************
* Kiwa's Custom Battle Windows *
* KiwasCustomBattleWindows.js *
* Version 1.0 *
*********************************************************************/
/*:
*@plugindesc Changes the Combat Menu position.
*@author Kiwa
*@version 1.0
**********************************************************************/
// This command runs the Function automatically without being called.
(function() {
/***************************************************************************
* We are going to overwrite methods that have inharitade from object to *
* object. The order of the inharitance is as follows: *
* *
* Window.js < Window_Base.js < Window_Selectable.js < Window_SkillList.js *
* < Window_BattleSkill.js *
* *
* These methods already exist. RPG maker will run them before running *
* the plugins. By typing them again they will overwrite the old methods *
***************************************************************************/
//=======================Battle Status Window Size==============================
// Window Width
Window_BattleStatus.prototype.windowWidth = function() {
return 624;
};
// Window Height
Window_BattleStatus.prototype.windowHeight = function() {
return this.fittingHeight(this.numVisibleRows());
};
//==========================Enemy Select Window Size.===========================
// Window Width
Window_BattleEnemy.prototype.windowWidth = function() {
return 624;
};
// Window Height
Window_BattleEnemy.protorype.windowHeight = function() {
return this.fittingHeight(this.numVisibleRows());
};
//============================Party Command List================================
// Window Width
Window_PartyCommand.prototype.windowWidth = function() {
return 192;
};
Window_PartyCommand.prototype.numVisibleRows = function() {
return 4;
}
//==========================Player Command Window===============================
// Window Width
Window_ActorCommand.prototype.windowWidth = function() {
return 192;
};
// Visible Selectable Command Rows
Window_ActorCommand.prototype.numVisibleRows = function() {
return 4;
};
//======================Battle Status Window Position=========================
// Refreshes the window.
Scene_Battle.prototype.updateWindowPositions = function() {
this._statusWindow.x = 0;//624;
this._statusWindow.y = 0; //180;
this._statusWindow.opacity = 255;
this._statusWindow.contents.fontSize = 28;
};
//==================Create the Player's action select window===================
// Creates the Actor's window.
Scene_Battle.prototype.createActorWindow = function() {
this._actorWindow = new Window_BattleActor(0, this._statusWindow.y);
this._actorWindow.contents.fontSize = 28;
this._actorWindow.opacity = 255;
this._actorWindow.setHandler('ok', this.onActorOk.bind(this));
this._actorWindow.setHandler('cancel', this.onActorCancel.bind(this));
this.addWindow(this._actorWindow);
};
//==================The party's Command window position========================
Scene_Battle.prototype.createPartyCommandWindow = function() {
this._partyCommandWindow = new Window_PartyCommand();
this._partyCommandWindow.contents.fontSize = 28
this._partyCommandWindow.x = 0;
this._partyCommandWindow.y = 0;
this._partyCommandWindow.opacity = 255;
this._partyCommandWindow.setHandler('fight', this.commandFight.bind(this));
this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this));
this._partyCommandWindow.deselect();
this.addWindow(this._partyCommandWindow);
};
//=====================The Actor's Command window position=====================
Scene_Battle.prototype.createActorCommandWindow = function() {
this._actorCommandWindow = new Window_ActorCommand();
this._actorCommandWindow.x = 0;
this._actorCommandWindow.y = 0;
this._actorCommandWindow.opacity = 255;
this._actorCommandWindow.comtent.fontSize = 28;
this._actorCommandWindow.setHandler('attack', this.commandAttack.bind(this));
this._actorCommandWindow.setHandler('skill', this.commandSkill.bind(this));
this._actorCommandWindow.setHandler('guard', this.commandGuard.bind(this));
this._actorCommandWindow.setHandler('item', this.commandItem.bind(this));
this._actorCommandWindow.setHandler('cancel', this.selectPreviousCommand.bind(this));
this.addWindow(this._actorCommandWindow);
};
//=================Creates the Enemie choice window Position===================
Scene_Battle.prototype.createEnemyWindow = function() {
this._enemyWindow = new Window_BattleEnemy(0, this._statusWindow.y);
this._enemyWindow.content.fontSize = 28;
this._enemyWindow.Opacity = 255;
this._enemyWindow.setHandler('ok', this.onEnemyOk.bind(this));
this._enemyWindow.setHandler('cancel', this.onEnemyCancel.bind(this));
this.addWindow(this._enemyWindow);
};
//=========================The Skill window position===========================
Scene_Battle.prototype.createSkillWindow = function() {
this._skillWindow = new Window_BattleSkill(192, 0, 180, 624); // (x, y, h, w)
this._skillWindow.content.fontSize = 28;
this._skillWindow.opacity = 255;
this._skillWindow.setHelpWindow(this._helpWindow);
this._skillWindow.setHandler('ok', this.onSkillOk.bind(this));
this._skillWindow.setHandler('cancel', this.onSkillCancel.bind(this));
this.addWindow(this._skillWindow);
};
//===================The Item window size and position=========================
Scene_Battle.prototype.createItemWindow = function() {
this._itemWindow = new Window_BattleItem(192, 0, 180, 624); //(x, y, h, w)
this._itemWindow.content.fontSize = 28;
this._itemWindow.opacity = 255;
this._itemWindow.setHelpWindow(this._helpWindow);
this._itemWindow.setHandler('ok', this.onItemOk.bind(this));
this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this));
this.addWindow(this._itemWindow);
};
//=======================Create the Help window================================
Scene_Battle.prototype.createHelpWindow = function(){
this._helpWindow = new Window_Help();
this._helpWindow.x = 0;
this._helpWindow.y = 0;
this._helpWindow.height = 100;
this._helpWindow.width = 816;
this._helpWindow.opacity = 255;
this._helpWindow.content.fontSize = 28;
this._helpWindow.visible = false;
this.addWindow(this._helpWindow);
};
//=====================Log window Position and size============================
Scene_Battle.prototype.createLogWindow = function() {
this._logWindow = new Window_BattleLog();
this._logWindow.x = 0;
this._logWindow.y = 444;
this._logWindow.height = 100;
this._logWindow.width = 816;
this._logWindow.content.fontSize = 28;
this._logWindow.Opacity = 255;
//this._logWindow.Visible = false;
this.addwindow(this._logWindow);
};
//==================Finish the opening automatic Function================
})();
For now I wanted to flip the screen so that the Status and commands are at the top and the log is at the bottom.
Eventually changing everything to Variables so that I can set up 4 or so default designs.
Any help would be appreciated.
Thanks fellas.
************************EDIT*************************
As of now I've got it working as intended. I discovered the debug f8 key and solved my issues almost immediately.
I had an extra close bracket and I spelled a .prototype wrong.
I'm trying to add a few extra things. But I'm excited to finally contribute something (even small) to the forum
I'll Hopefully post it up a bit later today. got some stuff to do before I can finish it.
Thanks Friends.