Verdelite's Remove Battle Commands

Verdelite

Wannabe Developer
Veteran
Joined
May 22, 2016
Messages
138
Reaction score
1,022
First Language
German
Primarily Uses
RMMV
Verdelite_RemoveBattleCommands v.1.00
Verdelite

Introduction
This simple plugin enables you to assign a switch to a battle command and remove the linked battle command from the battle command window if the switch is on. The command will return once the switch is turned off.
That's useful for creating tutorial battles where you hide commands until they're introduced or for restricting Item use for example.

Features
- Temporarily remove battle commands
- Super simple to use

How to Use
1. Download the script here or copy the code and save as a .js file (Be sure to keep the file name) and move to your project's plugin folder
2. Open the plugin manager to install the plugin. If you're using YEP_X_ChangeBattleEquip, be sure to place the this plugin above Yanfly's.
3. Assign switches by inputting the switch ID into the parameters for the corresponding battle commands.
4. Now you can remove/readd battle commands by turning the assigned switches on/off!

Script
Code:
/*: @plugindesc v1.00 Simple Plugin removing commands from the Battle Command window using switches
 * @author Verdelite
 *
 * @param Switch for removing item command
 * @desc Enter switch ID for removing Item command, enter 0 for no switch
 * @default 0
 *
 * @param Switch for removing guard command
 * @desc Enter switch ID for removing Guard command, enter 0 for no switch
 * @default 0
 *
 * @param Switch for removing skill command
 * @desc Enter switch ID for removing Skill command, enter 0 for no switch
 * @default 0
 *
 * @param Switch for removing attack command
 * @desc Enter switch ID for removing Attack command, enter 0 for no switch
 * @default 0
 *
 * @help
 * SETUP:
 * Enter the switch ID for the corresponding commands.
 * If the switch is ON (true) the command will be hidden.
 * If the switch is OFF (false) or the ID is 0, the command will show as usual.
 *
 * If using Yanfly's ChangeBattleEquip Plugin, place this plugin above Yanfly's.
 *
 * ======================================================================================
 *
 * TERMS OF USE
 * Free for any commercial or non-commercial project!
 * No credit required
 */
 
   (function() {
  var parameters = PluginManager.parameters('Verdelite_RemoveBattleCommands');
  var itemSwitch = Number(parameters['Switch for removing item command'] || 0);
  var guardSwitch = Number(parameters['Switch for removing guard command'] || 0);
  var skillSwitch = Number(parameters['Switch for removing skill command'] || 0);
  var attackSwitch = Number(parameters['Switch for removing attack command'] || 0);
 
  var _Verdelite_Window_ActorCommand = Window_ActorCommand.prototype.makeCommandList;
 
  Window_ActorCommand.prototype.makeCommandList = function() {
    if (this._actor) {
 
        if(attackSwitch==0 || ($gameSwitches.value(attackSwitch)==false)){
            this.addAttackCommand();
        }
      
        if(skillSwitch==0 || ($gameSwitches.value(skillSwitch)==false)){
            this.addSkillCommands();
        }
      
        if(guardSwitch==0 || ($gameSwitches.value(guardSwitch)==false)){
            this.addGuardCommand();
        }
 
        if(itemSwitch==0 || ($gameSwitches.value(itemSwitch)==false)) {
            this.addItemCommand();
        }
    }
};
}) ();


Terms of use
Free for any commercial or non-commercial use!
No credit required!
 
Last edited:

Masterdub

Warper
Member
Joined
Apr 26, 2019
Messages
1
Reaction score
0
First Language
French
Primarily Uses
RMMV
Your script work very well and is also very easy to use. A huge thank to you !
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top