Skip Skill Type and update Help Window [MV]
Dear RPG Maker MV community.I have made a simple plugin to skip the skill type menu.
Code here:
Spoiler
/*:
* @plugindesc Skills Menu
* @author Jerdz
* @help
*/
Scene_Skill.prototype = Object.create(Scene_ItemBase.prototype);
Scene_Skill.prototype.constructor = Scene_Skill;
Scene_Skill.prototype.initialize = function() {
Scene_ItemBase.prototype.initialize.call(this);
};
Scene_Skill.prototype.create = function() {
Scene_ItemBase.prototype.create.call(this);
this.createHelpWindow();
this.createSkillTypeWindow();
this.createStatusWindow();
this.createItemWindow();
this.createActorWindow();
this.refreshActor();
this.commandSkill();
this._skillTypeWindow.active = false;
};
Scene_Skill.prototype.createSkillTypeWindow = function() {
var wy = this._helpWindow.height;
this._skillTypeWindow = new Window_SkillType(0, wy);
this._skillTypeWindow.setHelpWindow(this._helpWindow);
this._skillTypeWindow.setHandler('skill', this.commandSkill.bind(this));
this._skillTypeWindow.setHandler('cancel', this.popScene.bind(this));
this._skillTypeWindow.setHandler('pagedown', this.nextActor.bind(this));
this._skillTypeWindow.setHandler('pageup', this.previousActor.bind(this));
this.addWindow(this._skillTypeWindow);
};
Scene_Skill.prototype.createStatusWindow = function() {
var wx = this._skillTypeWindow.width;
var wy = this._helpWindow.height;
var ww = Graphics.boxWidth - wx;
var wh = this._skillTypeWindow.height;
this._statusWindow = new Window_SkillStatus(wx, wy, ww, wh);
this._statusWindow.reserveFaceImages();
this.addWindow(this._statusWindow);
};
Scene_Skill.prototype.createItemWindow = function() {
var wx = 0;
var wy = this._statusWindow.y + this._statusWindow.height;
var ww = Graphics.boxWidth;
var wh = Graphics.boxHeight - wy;
this._itemWindow = new Window_SkillList(wx, wy, ww, wh);
this._itemWindow.setHelpWindow(this._helpWindow);
this._itemWindow.setHandler('ok', this.onItemOk.bind(this));
this._itemWindow.setHandler('cancel', this.popScene.bind(this));
this._itemWindow.setHandler('pagedown', this.nextActor.bind(this));
this._itemWindow.setHandler('pageup', this.previousActor.bind(this));
//this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this));
this._skillTypeWindow.setSkillWindow(this._itemWindow);
this.addWindow(this._itemWindow);
};
Scene_Skill.prototype.refreshActor = function() {
var actor = this.actor();
this._skillTypeWindow.setActor(actor);
this._statusWindow.setActor(actor);
this._itemWindow.setActor(actor);
};
Scene_Skill.prototype.user = function() {
return this.actor();
};
Scene_Skill.prototype.commandSkill = function() {
this._itemWindow.activate();
this._itemWindow.selectLast();
};
Scene_Skill.prototype.onItemOk = function() {
this.actor().setLastMenuSkill(this.item());
this.determineItem();
};
Scene_Skill.prototype.onItemCancel = function() {
this._itemWindow.deselect();
this._skillTypeWindow.activate();
};
Scene_Skill.prototype.playSeForItem = function() {
SoundManager.playUseSkill();
};
Scene_Skill.prototype.useItem = function() {
Scene_ItemBase.prototype.useItem.call(this);
this._statusWindow.refresh();
this._itemWindow.refresh();
};
Scene_Skill.prototype.onActorChange = function() {
this.refreshActor();
this._skillTypeWindow.activate();
};
As you see, I just recreate the Scene_Skill exacty like in the rpg_scenes.js, and I just bypass the SkillTypeMenu.
HOWEVER, as you can see on the screen below, the help windows does not refresh to show the Skill Description (It would refresh if I select another skill)
https://forums.rpgmakerweb.com/attachments/1659477788438-png.236478/
This seems like a minor annoyance, but on the current project I am working on, it is a pretty big deal as the help window is very important.
Thanks makers !
本贴来自国际rpgmaker官方论坛作者:jerdz处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/skip-skill-type-and-update-help-window-mv.150045/
页:
[1]