How do I "Event Script > Plugin"

Status
Not open for further replies.

Zelda

Villager
Member
Joined
Mar 5, 2017
Messages
6
Reaction score
1
First Language
German
Primarily Uses
RMMV
I've tried a few different things, but I'm not really sure what to do. In an event how do I tell the script command to call a plugin?.

-- Zelda
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
You don't "call a plugin" per se. A plugin is essentially just adding new functions or modifying existing ones, and they can all be called from a script call. What exactly is it you're attempting to call?
 

Zelda

Villager
Member
Joined
Mar 5, 2017
Messages
6
Reaction score
1
First Language
German
Primarily Uses
RMMV
You don't "call a plugin" per se. A plugin is essentially just adding new functions or modifying existing ones, and they can all be called from a script call. What exactly is it you're attempting to call?
That is what I mean.. In the event when I click "Script" what is it that I type in there for it to load a plugin?. That way when I click on the event in game it'll read the script and call the plugin.

-- Zelda
 
Last edited:

chrrsy

Veteran
Veteran
Joined
Feb 5, 2017
Messages
74
Reaction score
14
First Language
English
Primarily Uses
RMMV
@Zelda You can install a plugin by pressing F10, and then double-tapping in a slot in the plugin manager. Then you can choose what plugin to install from a drop-down list in your game/ js/plugins file.
In the case that you've already done this, then you can view the plugin's help file to see the plugin commands that can be used.
 

Zelda

Villager
Member
Joined
Mar 5, 2017
Messages
6
Reaction score
1
First Language
German
Primarily Uses
RMMV
@Zelda You can install a plugin by pressing F10, and then double-tapping in a slot in the plugin manager. Then you can choose what plugin to install from a drop-down list in your game/ js/plugins file.
In the case that you've already done this, then you can view the plugin's help file to see the plugin commands that can be used.
I'm not talking about installing a plugin. I'm talking about, for example: You can create an event, use the "plugin command" to call a plugin you have installed once clicking on the event.. I need to know how to replicate that process except doing so within a script.. That way when I click on an event that is using the "script" feature in the events it'll load a plugin that same way.

Like how in the script function if I type "
SceneManager.push(Scene_Name);

SceneManager.prepareNextScene(actorNumber, 16);" it'll bring up the screen for naming a character, even though I could just click "input name process" instead. I'm needing to know how to do that same thing, except with a plugin.

-- Zelda
 

chrrsy

Veteran
Veteran
Joined
Feb 5, 2017
Messages
74
Reaction score
14
First Language
English
Primarily Uses
RMMV
You can script call a Plugin Command:

var aliasPluginCommand = Game_Interpreter.prototype.pluginCommand;

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

Is this what you mean?
 

Zelda

Villager
Member
Joined
Mar 5, 2017
Messages
6
Reaction score
1
First Language
German
Primarily Uses
RMMV
You can script call a Plugin Command:

var aliasPluginCommand = Game_Interpreter.prototype.pluginCommand;

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

Is this what you mean?
Maybe. I saw that somewhere a few hours ago when I was searching, but there was absolutely no explanation as to which part you edit to call a specific plugin, or any information on understanding how it works. I don't know much about scripting, so I don't really know what to alter sometimes. I did try that earlier before I posted on the forums, I just don't know what part to edit for calling a specific plugin if that is what that does.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
If a plugin has something like...
PHP:
var myAwesomeFunction = function(){
// too much stuff to fit in an event eval
}
just do in event script...
PHP:
myAwesomeFunction();
Or if you want to activate a plugin late in the game that's not turned on by default...
PHP:
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", "js/plugins/MyAwesomePlugin.js");
document.head.appendChild(script);
Turning it off again would mean learning that plugin's functions and undoing them all one by one.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
I'm talking about, for example: You can create an event, use the "plugin command" to call a plugin you have installed once clicking on the event.. I need to know how to replicate that process except doing so within a script.. That way when I click on an event that is using the "script" feature in the events it'll load a plugin that same way
You're making a wrong assumption here.

Both script calls and plugin commands are only possible if the plugin has been prepared for that option.
In the case of a plugin command, that is absolute - if a plugin does not give you a plugin command, then that will never work.
In the case of a script call, you can either use script calls provided by the plugin writer (preferred method) or you can try to jump into the plugin at existing functions (requires enough programming knowledge to find the functions and to understand them, and that the function can be called out of context which is not always the case).

So you are usually limited to the script calls and plugin commands given in the description of the plugin.
It will require a good understanding of a specific plugin to find how to use a function out of context by script call, and that will always be specific to that plugin.

So if you really need something like that, you have to give a link to the plugin you need that for, and wait for someone to find out if it is even possible to do and give you that script call - and repeat the process with different results for every single plugin you want something like that for.

(there is a reason why both plugin command and script call are given as event commands - if they could be interchanged at will, it would not be neccessary to give both options)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
[mod]closed on OP request[/mod]
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top