Problem about plugin command

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
How can I use plugin command through script. (I am not creating plugin)

I want something like this
$gameMessage.add("Show Text Script Call");
$gameParty.gainGold(n);
$gameParty.removeActor(n);
that is using event command with script.
And this time I want to use plugin command.
(I am not creating plugin)

Thanks for reading my question.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
If you're not creating a plugin, then why not use a plugin command separately from that script?
Using plugin commands through script is possible, but I don't really like it. However, you can find it
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Those things are called via script because they are script commands. They are not plugin commands. There is no plugin to do what those script calls do.

You only need to use a plugin command to run functionality that has been introduced by the plugins you've added to your project.
 

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
If you're not creating a plugin, then why not use a plugin command separately from that script?
Using plugin commands through script is possible, but I don't really like it. However, you can find it
Well I just want to know how to use it because I can do the other event command with script but I can't do it with plugin command.
So I was wondering if I can do it with plugin command.
After reading, I still failed to do it.

I guess this is for plugin

var aliasPluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
aliasPluginCommand.call(this, command, args);
if (command === 'plugincommandtextname') {
dostuff(args);
}
};

right?
Can you tell me how to use it?
I just change 'plugincommandtextname' to a plugin command but I fail.
If it's ok, could you give me an example.

Maybe use
http://sumrndm.site/camera-core/
the roomin plugin command for example.
ZoomIn [scale] [duration]

Really, really thank you for your reply.
I know I may be an idiot, but I'll try to learn.
Thank you, thank you really much.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
If you use the ZoomIn [scale] [duration] plugin command, you simply enter it to Plugin command, there is no magic in that. The functions inside the plugin will take care of the rest. If you wish to use a plugin command through script call, I have posted the script calls list earlier.

Btw. The function aliasPluginCommand is an universal thing for all plugin commands inside the plugin, so editing it won't do any good.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You said you are not writing a plugin. But the code you've put above is writing a plugin.

You do not change the code in the rpg_objects.js file. You ADD a NEW plugin and add your functionality to that.

There are hundreds of examples of plugins. Find a very, very simple one that has plugin commands, and see how it does it.


The commands you put in your first post, you CANNOT run through plugin commands, unless you WRITE a plugin to accept those codes and process them. Plugin commands are useless unless you have a plugin that processes them.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
@Shaz I think you misunderstand.
The OP isn't writing a plugin.
They are using a bunch of script calls and want to execute a plugin command after them. However, since the Plugin command didn't work through the button, they asked how to do it via script.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Ah, that makes sense. The OP should probably state what the plugin is, and provide a link. If the plugin command didn't work, then it either wasn't written correctly, or there's a problem with the plugin itself - either not installed/activated properly, wrong version, or maybe a compatibility issue.

I can't figure out if the camera zoom is the plugin he/she is trying to use or not, due to the "for example". All those commands are event commands - none of them need to be done as script calls.

Better to try and figure out the problem than come up with a workaround. If the plugin isn't installed properly or there are compatibility issues, a script call isn't going to work either.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
No

There are two different event commands because they do different things.
Theoretically you could do the same effect with a script command, but that will require you to specifically make a script call for each different plugin.

It's simply too mich of a hassle to try to do this by script call unless the Plugin writer already created script functions for this - some scripters do that, but only a minority.
 

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
OK I got it.
I'll just use plugin command not using script.
Thank you all for reply.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top