Plugin Commands?

So can anyone tell me why someone would want plugin commands over an actual script command?

I mean I don't get why plugin commands are even a thing. They don't add anything special and they can't be used everywhere script calls can be. So what's the point with them anyways?
They're easier to use. It's my favorite new feature of MV, because I can let people write commands in a way that is easier to understand. Check some samples of plugin commands from some of my plugins, compared to their script counterpart:

Code:
COMMAND: run common event 15 in 2 minutesSCRIPT:  OrangeTimeSystem.runInMinutes(15, 2);
Code:
COMMAND: spawn event 10 from map 2 on region 7SCRIPT:  OrangeCustomEvents.spawnMapEventFrom(2, 10, 7);
Simplicity. If you read the documentation on eventing it states Script is:

Evaluates text as JavaScript.
It all comes down to the K.I.S.S methodology, keeping it simple stupid. The moment you make "Script calls" a standard, people will try to have the average RMMV user execute full blown javascript, as thats what the event command is for, to execute full blown javascript that wouldn't necessarily be its own plugin. I often use it for short for-loops that don't need their own plugin, because having such a for loop be its own plugin (e.g: A for loop to simply increase all the HP at that moment, of every party member by a specified formula) is not keeping it simple.
Ya I suppose that makes sense, it's just the exact opposite of the standard set by previous rpg makers.

And they'll add a lot of function call bloat the more plugins you get that add them, if you have 30 plugins all aliasing or hooking the same function. I don't know if that bloat will be bad or not I don't know how fast JavaScript is compared to other languages like ruby or lua.
Yeah, we have been discussing that on other threads. It makes a big relative difference (but not big enough to cause lag).

I'll start adding a param on my plugins for people to decide if they want to use plugin commands or not.
JavaScript is much faster than Ruby. Also, your version of Game_Interpreter.pluginCommand should return, if it matches with your command, so it won't have to call all aliases methods, but only as many as needed. I wouldn't use plugin commands for stuff, that's executed every few frames, anyway.
Oh ya I didn't think about the return, and good ruby was slow I knew lua was faster than ruby but wasn't sure how java compared.

So I'm not the only one who thought of the impact awesome I thought maybe I was understanding something wrong. But if it's not a laggy impact then I suppose it's not horrible.

I guess I'll just accept it as the new practice. It's just weird after playing with dog makers since xp lol.

By the way handy link in your signature.

Just a thought on proformance and the endlessly hooked function would it be worth it to try and get something wrote up for the MVCommons that handles this without hooking the same function?

Like say

MVCommons.addPlugin(name, func) {

_data[name ] = func;

}

And then it would just call

_data[name](args);

Or would it be pointless?
try this... call a script call of a plugin...

remove the plugin because somehow you decided to not using it. (let's say it cause lag / incompatible with other plugin)

crash... (you need to edit ALL your event and remove that script call).

vs

call a plugin command of a plugin

remove the plugin because of same reason as above.

work fine without crash.

so i would prefer using plugin command as user.
Us I suppose, but I'd rather the error so I can know which events have useless data in them.

But good thought anyways I wouldn't of even thought about that.
JavaScript is much faster than Ruby. Also, your version of Game_Interpreter.pluginCommand should return, if it matches with your command, so it won't have to call all aliases methods, but only as many as needed. I wouldn't use plugin commands for stuff, that's executed every few frames, anyway.
I don't agree. If the command matches something that your plugin handles, please, still continue execution. You can't be a 100% sure that another plugin doesn't implement the same command.

This method is, in my opinion, supposed to always run its entire chain, regardless of whether or not your plugin handles the command.
If 2 plugins share the same command, i'm inclined to say that they are incompatible. That's why i add a plugin parameter to all of my plugins, that can be used to modify the commands (i probably should disable them entirely, if the parameter is empty, though).
I can't really think of a convincing example where two compatible plugins would use the same command. You have a point there 🙂

I would still call the original method though. Just feels better.
I always call the original method too.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-commands.52213/