Tsukihime 1,489 Posted February 19, 2013 (edited) Command Manager Tsukihime The Command Manager provides a plugin API that allows developers to quickly define new commands, and allows users to take these commands and add them to the game. Download Get it at Hime Works Sample plugin: Command - Use Skill Compatibility Seems to work with Yami's Symphony engine (as shown in screenshot) and Yanfly's Ace Battle Engine. Have not tested on others. Usage For users An actor's initial command list is the combination of its own commands, plus its class' commands. To set up an actor's commands, tag actor or class 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 command. You must specify the stype ID (check the terms tab in the database) <cmd: item> - adds the item command <cmd: use_skill id> - use the specific skill directly <cmd: use_item id> - use the specified item directly Additional command plugins will specify how the note-tags should be written.Note that unlike the default actor command system, it does not automatically show all skill types that the actor can use; you must manually add them to the list, and they will always be shown even if they are empty. For developers The Command Manager API allows you to quickly define a command and add it to the game. Developing a new command can be done in 4 easy steps. Here is an example plugin if you are not sure how it works http://forums.rpgmakerweb.com/index.php?/topic/9448-skill-command/ 1. Register your command plugin CommandManager.register(idstring, type, api_version) The idstring is a symbol that will be associated with your command.It is important to pick a unique idstring. The type refers to the type of command you are writing. Please refer to the reference section in the script for a list of available command types. If you are writing a plugin that requires a later version of this API, you can specify one. It is optional. 2. Define your Command class This API provides a Game_Command class which is used by all command windows to uniformly process commands. There are cases where a simple Game_Command object just isn't enough. 3. Define an add_command method. You must define an add_command method in order to tell the system how to process your command. 4. Write the command handling logic The appropriate scenes have already associated your idstring with your command. The method you are given uses the format command_IDSTRINGYou can do basically anything you want with this method. Edited March 2, 2015 by Tsukihime 1 Share this post Link to post Share on other sites
Tsukihime 1,489 Posted February 20, 2013 (edited) Experimental party battle command API has been added. I couldn't find a good place to put where the party commands should be placed so I just put it inside the configuration. Might change it later for more dynamic party commands... Some core features that I am working on: 1. Command Feature. Commands will be treated as features: all commands that an actor is able to perform depends on the commands that are assigned to any actors, classes, weapons, armors, and states. The input format is the same as usual, and it is really just an extension on top of what I have already done. <cmd: idstring args> It's just that there will be more uses for it. 2. Command display order. Currently, you are only able to determine the order of the initial commands, and that's ok because the initial release doesn't have any support for adding/removing commands dynamically at play-time. However, if I'm treating commands as features, suddenly you can have arbitrary commands being added to the actor, and then you might actually want one command to always appear before another. Some plugins that I have in mind, which will rely on either of the above updates to be usable in an aesthetic way -Command replace. Just like how in FF7, when your limit gauge is filled up, your "attack" command is replaced with a "limit" command, or in FF9 where you go into "trance" state and then your "attack" command changes appropriately. -Command setup. In FF8, you can select up to 4 commands to use in battle (or maybe 3 + attack, don't remember). This plugin will provide a way to setup actor commands. Since the order of the commands is chosen by the player, it isn't necessary for the engine to automatically sort them. Edited February 20, 2013 by Tsukihime Share this post Link to post Share on other sites
Tsukihime 1,489 Posted April 16, 2013 Minor update to script. All commands are now separate classes of their own. For example class Command_Item < Game_Command class Command_Skill < Game_Command class Command_Attack < Game_Command This allows you to easily add conditions to the usability or visibility of a command.Recall the following methods defined in Game_Command # Whether the command can be selected or not def usable?(user) true end # Whether the command is shown or not def enabled?(user) true end You may add arbitrary conditions to any command by simply aliasing one of those methods.For example, someone was looking for a script that only allowed a "chemist" class to use items in battle. Assuming the chemist class ID is 9, the request can be fulfilled with this snippet class Command_Item < Game_Command alias :th_command_manager_usable? :usable? def usable?(user) return false unless user.class.id == 9 th_command_manager_usable?(user) end end Share this post Link to post Share on other sites
Daniel Babineau 1 Posted September 16, 2014 (edited) Big bump, but I'm having a problem with this script. It has served me very well, but I've noticed that I can't use it in conjunction with Yanfly's Ace Menu Engine if I want to enable custom commands on the main menu. No custom commands show on the menu unless I physically remove Command Manager from my project. Edited September 16, 2014 by Daniel Babineau Share this post Link to post Share on other sites
Tsukihime 1,489 Posted September 16, 2014 (edited) The two scripts overwrite the same methods for inserting menu commands. I've made it so that menu command manager is separate from actor and party commands. Get the latest version of Command Manager and it should not interfere with yanfly's menu commands. Edited September 16, 2014 by Tsukihime Share this post Link to post Share on other sites