Adding event commands througth plugins

Would you like this feature?

  • Yes

    Votes: 7 100.0%
  • No

    Votes: 0 0.0%
  • Yes but not important

    Votes: 0 0.0%

  • Total voters
    7

ICF-Soft

Veteran
Veteran
Joined
Aug 15, 2015
Messages
254
Reaction score
124
First Language
Spanish
Primarily Uses
RMMV
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:
Code:
/**
 * Tells that this version allows adding custom commands througth plugins.
 *
 * @static
 * @property allowCustomCommands
 * @type Boolean
 * @final
 */
Utils.allowCustomCommands = true;

$dataCommands = {};
Code:
// Custom Plugin Command
Game_Interpreter.prototype.command357 = function() {
    if ($dataCommands[this._params[0]] && $dataCommands[this._params[0]][this._params[1]]) {
        $dataCommands[this._params[0]][this._params[1]](this._params[2]);
    }
    return true;
};
To add a command througth a plugin you use tags like these inside main block:
Code:
 * 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:
Code:
 if (Utils.allowCustomCommands) {
    $dataCommands.ICF = $dataCommands.ICF || {};
    $dataCommands.ICF.command1 = function(obj) {
        //Some code here
    };
    $dataCommands.ICF.command2 = function(obj) {
        //Some code here
    };
}
Mockups:
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
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top