Command Manager

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

commandManager5

The command manager is a framework that changes the way commands are handled in RPG Maker. It provides developers with an intuitive way to customize each and every actor’s commands from the basic “Attack” and “Item” commands to advanced, user-created commands that allow you to cast spells directly, to change equips, to change party members, and anything you can think of.

With a new scripting interface, every command supports conditions that will determine whether they are shown and whether they can be used by the actor.

In addition to actor battle commands, the command manager can be extended to support any type of command, including

  • Party battle commands
  • Party menu commands
  • Title screen commands
  • Game over screen commands

All commands are handled uniformly, allowing you to easily create new commands that are tailored to your project.

Download

Script: download here

Addons

Support for additional commands. They are implemented as separate modules for compatibility reasons (with other scripts)

Plugins

Usage

commandManager6

Basic Usage

To set up actor commands, tag actor objects with

<cmd: command_name args>

Where

command_name is the name of the command that the actor will use
args are any arguments that the command requires

The system comes with five commands built-in:

<cmd: attack>       - adds the attack command
<cmd: guard>        - adds the guard command
<cmd: skill_list>   - adds all available skill types
<cmd: skill id>     - adds a skill type command. Use the Stype ID from the Terms database
<cmd: item>         - adds the item command

Extended Commands

The command manager comes with two plugins built into it.

Use Skill

The Use Skill plugin allows you to create commands that will execute a specific skill directly. All skill conditions must be met in order to use the skill. If the skill cannot be used, the command will be disabled.

To use this command, note-tag actors with

<cmd: use_skill id>

Where the id is the ID of the skill that you want to use. The name of the command is the same as the name of the skill.

Use Item

commandManager7

Similar to the Use Skill command, the Use Item command allows you to create a command that will order an actor to use an item directly. All item conditions must be met to use the item, and if the conditions are not met, the command will be disabled.

To use this command, note-tag actors with

<cmd: use_item id> - use the specified item directly

Where the id is the ID of the item that you want to use. The name of the command is the same as the name of the item.

Other plugins

Additional functionality can be achieved by installing Command plugins. Each plugin will specify how the note-tags should be written. Please refer to those instructions for further information.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

37 Responses

  1. Cleosetric says:

    I have incompability with YEA – ATB i need it both with this script, please create fix for this.

  2. Michael Dionne says:

    Wow! But my project is now on RPG Maker MV. I know where to change the menu commands in .js files, but I need those to launch common events, and this is where I am stuck. Since this is during battle, common events don’t seem to run at all, or maybe -most probably- I am doing something completely wrong.

    Hime, I can hire you for that, quite soon, and we would then share it for free for the community to use in their own projects. Even if not as elaborated or complete as many of your other pre-MV plugins, this would be very useful in the future for some developers.

    RPG Maker MV has a bright future, people will want to differenciate as much as possible in gameplay from other RPG Maker MV games, because it’s now multi-platform. I can already foresee a ton of new Facebook and WiiU games within 1-3 years made on RPG Maker MV. The market is now BIGGER than ever for RPG Maker. More and more plugins should be developed and shared for RPG Maker MV, to support those future indie game developers that need more different gameplay possbilities!

  3. Hermit says:

    Awesome Script!! But I am totally beginner with script and I dont know how to do! :O 🙁 Can you put some downloable demo? or screen what I must write in scripts, because I write everything in notes and still didnt work 🙁

    • Hime says:

      Is there something in particular that you’re confused with? There are a few screenshots showing note-tags and what you should expect to see in-game.

  4. Meteodros says:

    Well, I took every script off the project and then added them back on one at a time, and when the Command Manager script was on its own, it still had the message. It said “System stack error ocurred” and on the RGSS console manager it said “-6.492 Command Manager:612: stack level too deep”. The only other scripts I am using are: Effect Manager by Hime (you), Skill Link by Hime, TP Max State by Hime, Learn and Replace by Hime, Inventory Sorting by Hime, Large Choices by Hime, Aeon Party by Formar0153 and Fantasy Bestiary by Shadowmaster. All these other scripts are working perfectly fine.

  5. Meteodros says:

    When I cancel selecting a target when using the attack command, the message “Stack level too deep” comes up on my screen. I found out that it comes from this script. I thought you should know this. Do you know how to stop this from happening?

  6. Dioca says:

    hello, i’m currently experimenting with the command manager script, can you please help me on this one case.

    inside a battle scene, I have an actor induced with a state that seals all commands for one turn, except though for two commands: a particular stype skill command and the “item” command.

    How do you seal the “item” command during this state? while leaving only the stype skill command solely available for the actor to choose….? any info will be a great help….

    • Hime says:

      The command manager currently provides a scripting API to extend your commands. You can add custom “enabled” conditions by adding a script like this under the command manager.

      class Command_Item < Game_BattlerCommand
      
        # disable if state 3 is applied  
        def enable?(user)
          !user.state?(3)
        end
      end
      

      Modify it as you need. The same idea can be used for every other command.

      • Dioca says:

        hello again hime, thanks to your help on the script above i was close to achieving the result i wanted… but there is a slight problem…

        i was using a system (not a script) that particular skills types can be accessed trough equipping accessories (features, add skill type)…

        and boy do i love accessories… i happened to have 3 slots of them…. meaning that when 3 accessories are equipped an actor gains 3 new stype on battle….
        before using the command manager this system works fine…
        but it is not so when i started using command manager…

        1). the only stype that was available as a command was the initial stype that was set in the actor’s initial equipments and features…

        2). the stype doesn’t change when i swap accessories in-game

        3). the initial goal was to freely swap magic types with the the use of Mediums (Accessories in Wild Arms) and each Stypes are named after their respective Guardians…

        perhaps hime can help me solve this…
        because your idea of enabling commands trough state applications is also something that really fits for me…
        if you are even reading this i do thank you….
        and double thanks for the one before….

  7. Oriceles says:

    Hime sama, is there a way to set a condition to a ?, because i have some skill types that I don’t want to display on battle and if I use they are going to be displayed

  8. koldsack says:

    for anybody who is facing the problem of the Guard command not working as a result of script incompatibility between Yanfly’s Command List and any other FTB/ATB systems:

    Use the default “Guard” action provided in this script by Hime, but use “cmd: guard” without the “<” and “>” symbols in between the , for example:

    “SKILL x”
    “SKILL x”
    “SKILL 1”
    cmd: guard
    “SKILL LIST”
    “ITEMS”
    </command list>

    your guard command will work as it should instead of doing nothing and skipping a turn.

    Thank you Hime, once again, you’ve saved my butt 🙂 Hats off.

    • koldsack says:

      Oh btw, i just discovered Hime’s attack skill command plugin, that is great! Now i can do away with Yanfly’s command list script for good! As it randomly crashes the turn when an ATB/FTB system is used. I’m using Moghunter’s ATB if anyone wants to know. Thanks again, Hime.

    • Hime says:

      That’s pretty cool, I didn’t realize these commands can be used with yanfly’s battle commands.

  9. thegrop says:

    This script is very helpful! But I have one problem, could someone help me? One of the actors in my game changes class with a certain skill, and I wanted that skill to be a command and it's part of why I needed this script. But the thing is that she does not have that ability to switch from the start and even when she does not know the skill, in the menu it has the skill there but grayed out. I don't want the player seeing that command at all until the proper point in the game where she learns it since it basically spoils it. Is there a way to make that command start appearing with a script call or something?

  10. Titan_12 says:

    Hello! Hime!
    May I ask something?
    I'm using Galv's Army Manager Script and I want that to activate in battle. How to add it at the battle commands?

  11. Nate Bodine says:

    Can this be used, for example, to make a character who is possessed by, but in control of, a demon, and is able to use the skill "Unleash" to change into his demon form, but the skill changes to "Revert" while in that form to change back?

    • Hime says:

      Yes, assuming you have a script that will provide the unleash/revert effect. The Shapeshift effect would allow you to add that kind of functionality to your skills, and then you can add the skill as a command.

      • Nate Bodine says:

        Hmm, I was thinking more along the lines of it checking for the "Unleashed", having the "Unleash" command if it isn't present, and having the "Revert" command if it is present. I'll take a look at the Shapeshift effect, though. Thanks!

        • Nate Bodine says:

          Rather, the "Unleashed" state.

        • Hime says:

          The easiest way to accomplish this is to write a custom command using this script that will check the user's state and determine what name and skill to use. So for example, is "Unleashed" state is not applied, it would be the "Unleash" command, but if it is applied, then it will be displayed as a "Revert" command that executes a revert skill.

  12. Allusion says:

    Hi, Hime! Thank you so much for sharing all of your amazing scripts!
    I have only a slight problem with command manager; when I try to add Venka’s crafting script, it won’t appear on the main menu. I realize it’s set to show when a switch is on, but even then, it doesn’t appear. I’ve tried this both in my project, and in a clean one, and this is only ever the case if I try to use these two together. Other scripts, such as Modern Algebra’s quest script, attach to the main menu perfectly fine, so I’m a little confused. I’ve tried to add the command manually using your script, and while it won’t crash, it still doesn’t show. Any help would be much appreciated!

    Here is the link to the crafting script:
    https://www.dropbox.com/s/ihmcgdr9nu8xwtc/Cooking.txt

    • Hime says:

      My command manager uses a completely different model for commands.

      Most menu systems I see use the “original commands, extra commands” model, and that’s what that crafting script is based on. This is unsuitable for my needs because if I want to change the menu commands completely depending on who is in the party, that is extremely tedious.

      My commands are all dynamic depending on who is in the party, and what commands the party has. Anyways, to add the command through the command manager you need to insert this script

      CommandManager.register(:crafting, :party_menu)
      
      class Game_Party < Game_Unit
        def add_menu_command_crafting(args)
          cmd = Game_Command.new("Crafting", :crafting)
          add_menu_command(cmd)
        end
      end
      

      And then in the configuration section of the command manager you need to insert

      [:crafting, ""]
      

      Somewhere in the “Party_MenuCommands” list.

      • Allusion says:

        It works like a charm! Thank you!
        I really like the concept of switching the menu commands depending on who is in the party; you’re full of such neat little ideas like that! I would love to implement that aspect into of this script my game, but…well, I’m at that point where I have lots of scripts installed, and so I’m tip toeing around carefully, using whatever doesn’t crash, lol. They’re mainly to help individualize abilities per actor. I really needed this one to go with the ‘talk’ script you have, which is another amazing add-on, so thank you for that as well! 🙂

  13. Jonathang says:

    Hi Tsukihime, this script is really useful, but I have a problem…
    I keep getting this error when I fight enemies in a map, but battle testing works. I get this error:

    Script ‘Command Manager’ line 465: NoMethodError occurred.
    undefined method `each’ for nil:NilClass

    Is there any way to fix this?

    • Tsukihime says:

      What do you mean by “in a map”? Make sure you have copied the entire script. There may also be incompatibilities with another script. Try placing the script near the below other custom scripts.

      • Jonathang says:

        I mean in the game not in the map. Sorry got a little mixed up there. I did copy the entire script and I did place it below all the other scripts (I did try placing it above other scripts too, but I still got that error.) Is this script compatible with Victor’s battle script, and his animated battle script?

        • Tsukihime says:

          I don’t know I’ve never tested with any of victor’s scripts cause his links require me to go through some ads. Maybe you can try it in a new project to see whether there is compatibility issues with those scripts?

  1. March 11, 2014

    […] Script: download here Required: Command Manager […]

  2. October 5, 2014

    […] Command Manager […]

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax