Bobstah's Battle Commands Customization v2.2.1 - Updated 05/17/2017

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
680
Reaction score
594
First Language
German
Primarily Uses
RMMV
@lonewolph
i79-STypes(Elements):1,2,3,4!

This would add a command called "Elements" with the icon 79 and holds all skills with skill types 1 to 4.
 

Kisai

Veteran
Veteran
Joined
Aug 7, 2013
Messages
35
Reaction score
17
First Language
English
Primarily Uses
N/A
Would it possible to do something like this with this plugin?

In the first turn of this battle, all other actions are removed from the list, leaving only Attack.

A few turns later, "Sword Art" becomes available, but "Attack" is grayed out and disabled.

Later, someone else comes into the battle to help out. His only command available is Items.

Afterwards, the first character's menu options include Item, while also returning accessibility to Attack.

The second character now gets access to Attack as well.

And after this battle, all battle commands become available.

Obviously this is already possible with a plugin I'm currently using, but it's not compatible with this one, and was wondering if this plugin could do the same as in this image. Graying out commands, or making them unavailable entirely.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
680
Reaction score
594
First Language
German
Primarily Uses
RMMV
@Kisai
That is not possible with the plugin. However I did an addon to that plugin for myself which enables you to define certain conditions for commands. Depending on the condition the commands will be greyed out/not shown.

I could post that addon here, if you want.
 

Kisai

Veteran
Veteran
Joined
Aug 7, 2013
Messages
35
Reaction score
17
First Language
English
Primarily Uses
N/A
@Kisai
That is not possible with the plugin. However I did an addon to that plugin for myself which enables you to define certain conditions for commands. Depending on the condition the commands will be greyed out/not shown.

I could post that addon here, if you want.
If it's not too much trouble. ^^ Honestly, the main reason I wanted to use this plugin was for the icons that show up next to the commands. I tried using this but it didn't seem to work. I just thought adding icons would be kind of visually neat.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
680
Reaction score
594
First Language
German
Primarily Uses
RMMV
This is an edit by waynee95.
https://www.dropbox.com/s/ndh9qorv6hyikhw/BOB_BattleCommandList_waynee95-edit.js?dl=0

Make sure to not rename this file and import it instead of the original one. Make sure to place the plugin at the bottom, otherwise the Yanfly commands will not work.

It allows you to specify conditions for commands in order to disable/enable or show/hide them. It also includes every yanfly command addition I posted in this thread (Actor Party Switch, Equip Battle Skills, etc..)

Added features of this edit:
  • Equip - Adds the YEP_X_ChangeBattleEquip command
  • ActorSwitch - Adds the YEP_X_ActorPartySwitch command
  • EquipSkills - Adds the YEP_EquipBattleSkills command
  • EquipSkill:slotID - Adds the skill equipped in the specified slot id
  • BattleStatus - Adds the YEP_X_InBattleStatus command
All these command should work with the features already provided by the original plugin, like icon etc.

Conditional Battle Commands
This plugin adds a new syntax to the commands.

i208-Items!{put condition here}

You can add a block of { } at the end of every command. Inside this block you can define your condition. If you add the ! before the { }-Block it will
hide the command if that condition is false, if there is no ! it will just grey the command out if the condition is false.

The following variables are available inside the { }-Block:
a - for the current actor
s - switches (for example s[42] would refer to switch with id 42)
v - variables (for example v[12] would refer to variable with id 12)
p - party

Here are some example commands:
Attack{a.level > 5} - This would grey out the attack command until the actor is level 5
Attack!{a.level > 5} - This would hide the attack command until the actor is level 5
i34-Items!{!a.isStateAffected(10)} - This would hide the items command if the user is affected by state 10

This should work with most of the commands. Although I haven't tested every command!

@Bobstah I hope you don't mind that I post an edited version here.
 
Last edited:

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
680
Reaction score
594
First Language
German
Primarily Uses
RMMV
Here's the code when you want to add the Status Command from YEP_X_InBattleStatus. Place this plugin below YEP_X_InBattleStatus Plugin.

Place this at the bottom of the plugin file. (If you use my edited version above, this code is already included.)
Code:
//=============================================================================
// YEP_X_InBattleStatus by waynee95
//=============================================================================
if (Imported.YEP_X_InBattleStatus) {
   Bobstah.BattleCmds.YEP_X_InBattleStatus_processCommandEntry = Window_ActorCommand.prototype.processCommandEntry;
   Window_ActorCommand.prototype.processCommandEntry = function (cmd) {
       if (cmd.command === "battlestatus") {
           return this.addInBattleStatusCommand();
       } else {
           return Bobstah.BattleCmds.YEP_X_InBattleStatus_processCommandEntry.call(this, cmd);
       }
   }

   Bobstah.BattleCmds.YEP_X_InBattleStatus_addInBattleStatusCommand = Window_ActorCommand.prototype.addEquipChangeCommand;
   Window_ActorCommand.prototype.addInBattleStatusCommand = function () {
       if (this._cmdContext === null) {
           return Bobstah.BattleCmds.YEP_X_InBattleStatus_addInBattleStatusCommand.call(this);
       }
       if (this._cmdContext.hide === true) {}
       var icon = this._cmdContext.iconOverride || null;
       var name = Yanfly.Param.IBSCmdName;
       this.addCommand(name, 'inBattleStatus', true, null, icon);
       return true;
   };

   Bobstah.BattleCmds.YEP_X_InBattleStatus_createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
   Scene_Battle.prototype.createActorCommandWindow = function () {
       Bobstah.BattleCmds.YEP_X_InBattleStatus_createActorCommandWindow.call(this);
       var win = this._actorCommandWindow;
       win.setHandler('inBattleStatus', this.commandInBattleStatus.bind(this));
   };

   Scene_Battle.prototype.onInBattleStatusCancel = function () {
       this._helpWindow.hide();
       this._inBattleStatusWindow.hide();
       this._inBattleStateList.hide();
       this._inBattleStateList.deactivate();
       this._actorCommandWindow.activate();
       this._statusWindow.deselect();
       if (Imported.YEP_X_PartyLimitGauge) {
           $gameSystem.setShowPartyLimitGauge(this._showPartyLimitGauge);
           $gameSystem.setShowTroopLimitGauge(this._showTroopLimitGauge);
       }
   };
   Scene_Battle.prototype.commandInBattleStatus = function () {
       this._helpWindow.show();
       this._inBattleStatusWindow.show();
       this._inBattleStateList.show();
       this._inBattleStateList.activate();
       var actor = BattleManager.actor() ? BattleManager.actor() : $gameParty.battleMembers()[0];
       this._inBattleStateList.setBattler(actor);
       if (Imported.YEP_X_PartyLimitGauge) {
           this._showPartyLimitGauge = $gameSystem.isShowPartyLimitGauge();
           this._showTroopLimitGauge = $gameSystem.isShowTroopLimitGauge();
           $gameSystem.setShowPartyLimitGauge(false);
           $gameSystem.setShowTroopLimitGauge(false);
       }
   };
}
Example: i34-battlestatus!

@Bobstah
Also it seems there is a bug, when you don't want to show icons. Even when the "Show Icons" Parameter is set to 0, the command text will be pushed to the right, because it will still add the icon width to the x position.
Here is a fix for that. Just find that function inside the plugin and replace it.
Code:
Window_ActorCommand.prototype.drawItem = function(index) {
    var icon;
    if (Bobstah.Param.BattleCommandList_ShowIcons === 0) {
        icon = null;
    } else {
        icon = this.commandIcon(index);
    }
    var rect = this.itemRectForText(index);
    var align = this.itemTextAlign();
    this.resetTextColor();
    var nx = rect.x;
    var nw = rect.width;
    if (Bobstah.Param.BattleCommandList_ShowIcons === 1) {
        var iconPadding = Bobstah.Param.BattleCommandList_IconPadding;
        // Only offset the command text x position, when show icons is enabled
        nx += iconPadding + Window_Base._iconWidth;
        nw -= iconPadding + Window_Base._iconWidth
    } else {
        var iconPadding = 0;
    }
 
    if (icon !== null) {
        this.drawIcon(icon, rect.x, rect.y);
    }
    this.changePaintOpacity(this.isCommandEnabled(index));
    this.drawText(this.commandName(index), nx, rect.y, nw, align);
    if (this.commandCostShow() && this._list[index].symbol === "customSkill") {
        this.drawCommandCost(this.commandExt(index), rect.x, rect.y, rect.width);
    }
    return;
};
 
Last edited:

BloodletterQ

Chaotic Neutral Assassin
Veteran
Joined
Aug 15, 2012
Messages
1,533
Reaction score
1,177
First Language
English
Primarily Uses
N/A
I have a few questions:
-How can I add the escape command to the actor command?
-How can I make the help menu come up for all commands?
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
680
Reaction score
594
First Language
German
Primarily Uses
RMMV
@BloodletterQ
Just give a skill the Special Effect: Escape and then add that skill to the command window using iX-Skill:ID!

The help window comes up only if the command has a description.
 

wrap

Villager
Member
Joined
Sep 2, 2017
Messages
9
Reaction score
6
First Language
Japanese
Primarily Uses
RMMV
Hello. I translate Japanese into English by Google translation.
This plugin can be done very well.
However, I hope to improve some functions.
I uploaded a video.

1. When I change LineHeight, Icon position is not displayed correctly.
Also, only the default Command icon (in this case, GUARD) is a bit dark?

2. Selecting an ally Actor When you cancel a skill (in this case, HEAL), it is returned to the first.

3. The added Command is not Command remembered.
The default Command is Command remembered.
 

SoSick.

Veteran
Veteran
Joined
Jun 29, 2016
Messages
224
Reaction score
192
First Language
english
Primarily Uses
RMMV
Wow this plugin looks dope.. Just a question before I give it a whirl.. Will it be possible for to me create a limit break system with this? Very similar to ff7.. I would like it so once TP reaches 100 attack is replaced with limit..then once the player selects limit they can choose from limit skills they have learned? Thanks :)
 

BloodletterQ

Chaotic Neutral Assassin
Veteran
Joined
Aug 15, 2012
Messages
1,533
Reaction score
1,177
First Language
English
Primarily Uses
N/A
@waynee95 I'm curious if there's a way to add a description to all the commands, including escape, item and the like.
 

Alchemancy

Terra Incognita
Veteran
Joined
Jul 25, 2016
Messages
47
Reaction score
6
First Language
English
Primarily Uses
RMMV
I'm having problem with this plugin involving the STypes commands. I'm also running YEP_SkillCore if that makes a difference.

Each character has some MP skills and TP skills. I have them sorted into their own skill types for field menu purposes (called Spells and Techniques, respectively.) I turned on the plugin and added the following notes to a class:

<Battle Commands>
i22-Attack
i8-Guard(Defend)
i7-STypes(Specials):11,12,13,14,15,16,77,78,79,80,81,82,83,84,85,86
i6-Items
</Battle Commands>

Skills 11-16 are my MP abilities and 77-86 are my TP abilities. In theory, this should show all 16 skills under a single menu called Specials. It does not. In the field menu, there is now a skill set called Specials above Spells and Techniques. Specials shows an empty skill list, though the other two still have the aforementioned skills. In battle, the Specials menu doesn't appear at all. It only shows Attack, Defend, and Items. The icons work fine. What have I done wrong? I thought this was a basic function of the plugin. Nothing is sealed, and all the abilities are already taught to the class/actor.

Any help is greatly appreciated. Thanks!
 

SuperMasterSword

That Guy You Dont Know
Veteran
Joined
Jun 28, 2014
Messages
117
Reaction score
48
First Language
Javascript
Primarily Uses
RMMV
@Alchemancy That's not how the STypes command works, all you have to put after it is the id's of Spells and Techniques in the STypes list in the database.
 

Alchemancy

Terra Incognita
Veteran
Joined
Jul 25, 2016
Messages
47
Reaction score
6
First Language
English
Primarily Uses
RMMV
Thanks, @SuperMasterSword . I now understand that the IDs used in STypes are for the types, not the skills themselves. Silly me! They are grouped correctly now in combat under Specials.

Unfortunately, this poses another problem. They are no longer separated in the field menu under Spells and Techniques. They are combined into Specials, just like in the battle command menu. Is there a way to differentiate? I'd like to keep the original skill types for the field menu only. Possible? Thanks.
 

Alchemancy

Terra Incognita
Veteran
Joined
Jul 25, 2016
Messages
47
Reaction score
6
First Language
English
Primarily Uses
RMMV
Ah! Another problem. I'm not sure how to classify this. I'm using this script in conjunction with YEP_X_ActorPartySwitch (as well as its prerequisite scripts, BattleEngineCore and PartySwitch.) I want individual party members to be able to switch to and from the back row (a la Final Fantasy X.) The code can achieve this as a class/actor level command, so any given battlers menu shows:

iX-Attack
iX-Guard
iX-Skills
iX-Items
iX-Switch

I've successfully given the first four commands icons with BOB's code, but can't seem to give Switch one. It's technically not a skill, so I don't know if I should even list it under <BattleCommands>. I've also tried using ARP_CommandIcons, and arranged all these in different orders in the Plugin menu to achieve different outcomes. I still can't seem to give the Switch command an icon. Does anyone know a work-around for this?

I ask this here because it Switch has an icon when BOB's script turned OFF. It seems to override it.
 

phamtruong1992

Green Dragon
Veteran
Joined
Nov 22, 2015
Messages
200
Reaction score
230
First Language
English
Primarily Uses
RMMV
This is an edit by waynee95.
https://www.dropbox.com/s/udjjsi3rzi9p73g/BOB_BattleCommandList_waynee95-edit.js?dl=0

It allows you to specify conditions for commands in order to disable/enable or show/hide them.

This plugin adds a new syntax to the commands.

i208-Items!{put condition here}

You can add a block of { } at the end of every command. Inside this block you can define your condition. If you add the ! before the { }-Block it will
hide the command if that condition is false, if there is no ! it will just grey the command out if the condition is false.

The following variables are available inside the { }-Block:
a - for the current actor
s - switches (for example s[42] would refer to switch with id 42)
v - variables (for example v[12] would refer to variable with id 12)
p - party

Here are some example commands:
Attack{a.level > 5} - This would grey out the attack command until the actor is level 5
Attack!{a.level > 5} - This would hide the attack command until the actor is level 5
i34-Items!{!a.isStateAffected(10)} - This would hide the items command if the user is affected by state 10

This should work with most of the commands. Although I haven't tested every command!

@Bobstah I hope you don't mind that I post an edited version here.
The link has been broken. Could you repost it? Thanks in advance my dude.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Profile Posts

Tomorrow is Thanksgiving, and I'm so excited! I've been exploring MZ a little, and I just downloaded Effekseer to make new animations. I have experience in 3D animation software, so I'll be pretty good at the whole "particle" thing. My first game on MZ will be Fantasy Force--starring a griffin, a dragon, and a pegasus fighting against the Dragon of Darkness.
currently listening to Driftwood Gaming streaming some MZ dev time and it's delightful! had no idea they were this entertaining, love it
In quarantine, will be tested soon. This year is really something... special.
I was at another orientation yesterday and I realized I'll be working with an old friend! We met at the local water park a few years back and it was so nice to see her again! We had a chat, and next week when I officially start, I'll see if maybe we can trade our Zoom IDs so we can talk!
I made some sideview closets for MV!
You can find them in my MV resource thread.

Forum statistics

Threads
105,512
Messages
1,014,339
Members
137,198
Latest member
mmc1980
Top