Is it possible to turn Plugins on and off ingame?

Praygon

Coolio Foolio
Member
Joined
Apr 28, 2015
Messages
24
Reaction score
14
First Language
English
Primarily Uses
RMMV
Hello everyone. 

Firstly if this is in the wrong forum my apologies, feel free to inform me if i've done goofed and ill move this post to the correct place. Secondly I want to know is it possible to disable and activate Certain plugins via a script or event call in game. 

An example of what im trying to achieve is for one Chapter of a personal project im working on I want to disable the Sideview yanfly battle system im using and enable A undertale style battle system and its related plugins. Obviously I cant have both on at the same time and I noticed MV has a option to Turn Plugins on and off via the plugin menu. I want to know is this possible in game?

Thank you for your time.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Short answer: no.


Long answer: Only if the plugin creator gives you a way to enable/disable at runtime.  Most would not.


The plugin manager has nothing to do with enabling/disabling at runtime.  It simply states whether a plugin is enabled/disabled at all, and whatever setting you choose will apply to the whole duration of the game.  In fact, if you set it to disabled, it probably will not even be included in a deployment.


You would need to either modify the plugins yourself, or get someone else to modify them, to allow you to turn the plugin or individual features on/off.  
 
Last edited by a moderator:

Sekunri

Creator of Worlds
Veteran
Joined
Jan 12, 2014
Messages
132
Reaction score
75
First Language
English
Primarily Uses
RMMV
It may not be that hard of a modification.


I may be wrong so please someone correct me if im wrong but wouldn't surrounding both plugins in:


function() {


   If (variable is true) {


       All the Plugins code


   }


}();


And then having a separate plugin command turn the variable on and off work?


I've never tried so if im wrong, sorry about that.


SPOILER: I was WRONG
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
@Sekunri yes, you are completely wrong - because plugins can't work that way.


Just as one example - most plugins store data in the savefiles, and they need that data.


This is the reason why older savefiles become incompatible upon installing one of those plugins and why you always need to start a new game after adding a plugin.


Your switching the plugin would also make the savefile incompatible - if the plugin is on it would redirect the load function to get its data, if it is off it cannot do that.


So switching the plugin on and off will change if you get errors on a saved games or not - both ways, because a save while the plugin is on will be incompatible to when the plugin is off as well as a save from when the plugin is off to be incompatible to when the plugin is on.


And that is just one reason where that would cause problems.


A plugin can be written to allow specific functions to be switched on and off - in fact some plugin writers do that. But it is absolutely impossible to switch off the entire plugin - some code needs to be always on for the engine and saves to work.


But only the plugin writer knows enough of his code to be able to write it that way, adding those changes for switching is not easy and requires an intense understanding of the plugin.
 
Last edited by a moderator:

Sekunri

Creator of Worlds
Veteran
Joined
Jan 12, 2014
Messages
132
Reaction score
75
First Language
English
Primarily Uses
RMMV
Well i hoped lol. Thanks Andar.


Though now I'm intrigued by it. Off to learn new stuff I go
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I actually saw somebody the other day state that you CAN do that (the reason was because they can do it in Ace, so it must also apply to MV - not that they've actually done it in MV).  I haven't tried it but it would be interesting to give it a go and see if it really is that simple.  Of course that would only work on plugins that operate while a game is in progress, so plugins that change the loading screens or the title screen you couldn't do it, because you don't have event commands at that point, and if you're using switches or variables, they won't have been initialized at this stage.
 

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,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top