Adding event commands througth plugins

Discussion in 'Editor Suggestions and Improvement' started by ICF-Soft, Dec 24, 2017.


Would you like this feature?

  1. Yes

    6 vote(s)
  2. No

    0 vote(s)
  3. Yes but not important

    0 vote(s)
  1. ICF-Soft

    ICF-Soft Veteran Veteran

    Likes Received:
    First Language:
    Description of the Feature:
    Adding a new way of creating custom commands throught plugins. These custom commands can have their own parameters and prevent plugin commands to be bad written. The other plugin command version can still be for back compatibility.

    Code for Implementation:
    Inside core scripts should be:
     * Tells that this version allows adding custom commands througth plugins.
     * @static
     * @property allowCustomCommands
     * @type Boolean
     * @final
    Utils.allowCustomCommands = true;
    $dataCommands = {};
    // Custom Plugin Command
    Game_Interpreter.prototype.command357 = function() {
        if ($dataCommands[this._params[0]] && $dataCommands[this._params[0]][this._params[1]]) {
        return true;
    To add a command througth a plugin you use tags like these inside main block:
     * commandKey ICF
     * commandText ICF%1
     * commandGroup Group 1
     * command command1
     * commandName Process Selfvariables
     * commandParams struct<something>
     * commandGroup Group 2
     * command command2
     * commandName Process Traits
     * commandParams struct<something>
    commandKey: A name given to a group of commands. If more than one plugin uses the same all fields will be merged.
    commandText: A name to show in a tab for it's key. If there are too much commands inside a tab a it will being divided into various and a number will be placed for %1 for every one.
    commandGroup: A name to show for a group of commands. Commands must be inside groups.
    command: A name for a function that is called when command is executed.
    commandName: A name to show for a command.
    commandParams: A struct where parameters are taken from. Unlike normal plugin parameters these should be stored as the right data types instead of a text that needs to be parsed.

    And to register inside code you'll use something like this:
     if (Utils.allowCustomCommands) {
        $dataCommands.ICF = $dataCommands.ICF || {};
        $dataCommands.ICF.command1 = function(obj) {
            //Some code here
        $dataCommands.ICF.command2 = function(obj) {
            //Some code here
    Mockup1.png Mockup2.png

    Why is this feature good?
    This feature is great because of the following:
    • Avoids normal plugin command interferences
    • More friendlyness for users
    • Less typing and errors
    • More profesional look

    Possible issues with this feature?
    Issues that might arise from this feature:
    • Maybe it could make too many tags

Share This Page