I threw together this plugin to move the Guard command after the Attack command and before the Skill commands:
//=============================================================================
// Move Guard Under Attack
// GuardUnderAttack.js
// Last Updated: 2016.10.25
//=============================================================================
/*:
* @plugindesc Moves the Guard command under the Attack command and before Skill commands.
* @author Bryan Caiola
* @help Plug and play!
*/
Window_ActorCommand.prototype.makeCommandList = function() {
if (this._actor) {
this.addAttackCommand();
this.addGuardCommand();
this.addSkillCommands();
this.addItemCommand();
}
};
How do I make it so that the change only happens when the notetag <move guard> is places in the notes area?
You can put <moveGuard> in the actor's notebox and then check for this._actor.meta.moveGuard.
Thank you. I tried this and it didn't work. What did I get wrong?
//=============================================================================
// Move Guard Under Attack
// GuardUnderAttack.js
// Last Updated: 2016.10.25
//=============================================================================
/*:
* @plugindesc Moves the Guard command under the Attack command and before Skill commands.
* @author Bryan Caiola
* @help Plug and play!
*/
if (this._actor.meta.moveGuard) {
Window_ActorCommand.prototype.makeCommandList = function() {
if (this._actor) {
this.addAttackCommand();
this.addGuardCommand();
this.addSkillCommands();
this.addItemCommand();
}
}
};
Also, how do I do it for weapon notes?
"Cannot read property 'moveGuard' of undefined"
TypeError: Cannot read property 'moveGuard' of undefined
at Window_ActorCommand.makeCommandList (/S:/OneDrive/Faceless%20Gnome/Productions/Video%20Games/The%2013th%20Sign/RPG%20Maker/The%2013th%20Sign/js/plugins/GuardUnderAttack.js:16)
at Window_ActorCommand.setup (rpg_windows.js:5413)
at Scene_Battle.startActorCommandSelection (rpg_scenes.js:2270)
at Scene_Battle.startActorCommandSelection (/S:/OneDrive/Faceless%20Gnome/Productions/Video%20Games/The%2013th%20Sign/RPG%20Maker/The%2013th%20Sign/js/plugins/YEP_BattleEngineCore.js:4228)
at Scene_Battle.changeInputWindow (rpg_scenes.js:2071)
at Scene_Battle.selectNextCommand (rpg_scenes.js:2299)
at Scene_Battle.selectNextCommand (/S:/OneDrive/Faceless%20Gnome/Productions/Video%20Games/The%2013th%20Sign/RPG%20Maker/The%2013th%20Sign/js/plugins/YEP_BattleEngineCore.js:4207)
at Scene_Battle.selectNextCommand (/S:/OneDrive/Faceless%20Gnome/Productions/Video%20Games/The%2013th%20Sign/RPG%20Maker/The%2013th%20Sign/js/plugins/YEP_InstantCast.js:560)
at Scene_Battle.startPartyCommandSelection (/S:/OneDrive/Faceless%20Gnome/Productions/Video%20Games/The%2013th%20Sign/RPG%20Maker/The%2013th%20Sign/js/plugins/YEP_BattleEngineCore.js:4176)
at Scene_Battle.changeInputWindow (rpg_scenes.js:2073)
okay.
this._actor is a Game_Actor, but the note is on the Data_Actor.
Just change that condition to this._actor.actor().meta.moveGuard and it ought to work.
Thank you! That worked. How do I make it also work for weapon notetags?
what do you want to do with weapon notetags?
EDIT: I found another way to accomplish my end goal, so I don't need this solved anymore. But feel free to answer in case someone comes across this wanting the same thing. Thanks for the help, Shaz.
----------
When the weapon is equipped, Guard will move below Attack.
I'm trying use Yanfly's Weapon Unleash to change attack and guard, but I want them to be next to each other. However, I only want that to happen with certain weapons. My goal is to give the user two attacks with the same weapon and I have everything figured out except how to make the two attacks the first two items on the list. I'm starting to think I'm going about it the wrong way.
I'd have to add a second guard skill using VE's Direct Commands, which is fine, but the new guard still has all the quirks of a skill that I'd need to get rid of. And even after replacing guard, the actor still uses the guard sprite and not the ready sprite, even though there's no guard state or special flag. I'm sure that's more coding. I'm to to the point where something I thought was simple is turning into something complicated. There's probably another, much easier way out there, too and I'm wasting my time.
I'm sorry, I'm not explaining this well at all, am I? I'm very tired and have had a bad headache for most of the day.