So I know how to install plugins, right? I want a way to enable or disable certain plugins. The reason I want this is that when the character enters a new area, I want the game to switch menus using a plugin. Is there any way I can do this?
Plugins
Javascript/Plugin SupportPlugins themselves cannot be disabled mid-game since they are part of the game code at that point.
A plugin's features/functions can be programmed to be ignored (i.e. "turned off") or altered mid-game if the plugin is designed for that. If the plugin does not already offer that feature then you'll need an edit of its code (or an add-on).
A plugin's features/functions can be programmed to be ignored (i.e. "turned off") or altered mid-game if the plugin is designed for that. If the plugin does not already offer that feature then you'll need an edit of its code (or an add-on).
upon entering the area, set a game variable, and have the plugin check for it.
it's the least invasive solution, if the plugin is not of your making.
it's the least invasive solution, if the plugin is not of your making.
Could you tell me how to do that?
on the target area, put an autorun event setting the variable or switch, and then removing itself.
as for the plugin, it's hard to tell without knowing the plugin itself.
as for the plugin, it's hard to tell without knowing the plugin itself.
Ah, my apologies then. The menu plugin I am using is one of SumRndmDde's alt menus, specifically the face menu. http://sumrndm.site/5-alternative-menu-screens/
We'd need to know exactly which one: Right, Down, and Up should be straightforward...Face & List less so. Due to SRD's terms of use, the only option seems to be to create an add-on (a.k.a. "extension") plugin unless you make the edit yourself and do not publicly share that edit. Due to the way SRD has scoped his aliases, this may not be possible to achieve without a complete rewrite; in that case I'm not sure I want to get involved, at least for the Face/List menus. (Right/Up/Down are so simple that I don't believe SRD's general terms of use are enforceable? 😅)
Here's an example of using an alias to toggle behaviour based on a switch:
Basically: do the normal setup, then if game switch 1 is on, change whatever needs changing. If you want to completely replace the behaviour instead of altering it, just stick the callback into an else branch instead:
Note that you'll need something similar for each function the plugin overrides. You may be able to see, now, why an edit is easier than an extension in this case. 😅
Here's an example of using an alias to toggle behaviour based on a switch:
Code:
var alias = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
alias.call(this);
if ($gameSwitches.value(1)) {
// adjust stuff here
}
};
Code:
var alias = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
if ($gameSwitches.value(1)) {
// custom stuff here
} else {
alias.call(this);
}
};
Moved to: Javascript/Plugin Support
Yes, I mentioned that I will be using face.
Original thread: https://forums.rpgmakerweb.com/threads/plugins.110579/