Turn a plugin OFF

I would like to know how I can turn a plugin off in middle game? (An script call to force it off?) More precisely that plugin http://yanfly.moe/2015/11/21/yep-30-visual-hp-gauges/


I'm using a mini game from mog hunter. Everything works fine except Visual HP Gauges gives me a "Cannot read property Height of undefined" error.


So, If I could turn the gauge off before call the mini game probaly would fix the inssue.


thanks.
You can't, not unless the plug in writer added the ability to turn it off and on with a switch. You'll have to ask someone to edit it so that it can be done this way, or use something else I'm afraid.
You can't.


Post the error you get in the console.
If you just added that plugin, and are testing by resuming a game you started before adding the plugin, that is probably the cause for the error.  Start a NEW game and see if the error still happens.


Some plugins set up stuff on actors when you first start a game, and then rely on that data being there throughout the game, which includes when you save and resume a game.  If you started a game before the plugin was added, and the extra info wasn't set up, and you then saved the game, and added the plugin, the info that the plugin needs won't be in the save file, so it will cause an error just like the one you described.
I aways test with a new game.


9rkRWuS.png
I think that it is possible to use the following plugin.


http://mvplugins.com/plugin/biud436/Refresh Manager


this plugin will modify the plugin's status directly during the game. But this way is not recommended in RPG Maker MV. 


You should note that this way might be so many problems in your project. Before you apply its plugin, you need to recognize in this fact. 


if you want to automatically change the status of the certain plugin, you can try this :

Spoiler
Use this code (1 page) : 



PluginManager.setStatus('YEP_X_VisualHpGauge', false);
SceneManager.push(Scene_PluginManager);


Screen Shot (1 page) :


f5BaPih.png



Use this code (2 page) : 



PluginManager.setStatus('YEP_X_VisualHpGauge', true);
SceneManager.push(Scene_PluginManager);


Screen shot (2 page) : 


FwIFUuJ.png
I think that it is possible to use the following plugin.


http://mvplugins.com/plugin/biud436/Refresh Manager


this plugin will modify the plugin's status directly during the game. But this way is not recommended in RPG Maker MV. 


You should note that this way might be so many problems in your project. Before you apply its plugin, you need to recognize in this fact. 


if you want to automatically change the status of the certain plugin, you can try this :



I get a error "Uncaught Error: You were used incorrect tokens.-" and "Undefined"; when play testing.


When I use the folder html the game can't run the plugins. Gives error in each plugin. (A big messy error screen)
you are FAR better off trying to find out why you are having the error.  Looking for band-aid patch-ups is only going to make matters worse.
you are FAR better off trying to find out why you are having the error.  Looking for band-aid patch-ups is only going to make matters worse.



If was RGSS3 I could try, but my knoledge of javascript is almost 0. It seen I will have to give up on the minigame since the HP Bars cant be removed (or the player wont be able to see the Barrier).


I'm since yesterday trying convert THAT into MP Sharing (Like Mana Channeling) w/o success. i thought would be easy like change hp to mp (and life to mana) but I subestimed javascript. lmao
You just need to be more patient and wait for people to come who can help you out.  You posted less than 24 hours ago - a lot of people wouldn't have even seen your post yet.  Surely you have something else you could work on while waiting for someone to help?
I get a error "Uncaught Error: You were used incorrect tokens.-" and "Undefined"; when play testing.


When I use the folder html the game can't run the plugins. Gives error in each plugin. (A big messy error screen)



I apologize for the mistake that had not added the code that is processing a token called 'hyphen (-)'. That issue has now fixed. But as you know, This plugin has a lot of the problem currently. In the first place, This plugin executes using File System functions that are built into a nw.js that uses in Windows or Mac. So it does not properly execute on the browsers or mobile platform which is not available them. In the second place, It uses a big memory to parse texts into the file called 'js/plugins.js'. So it is usually not processing some texts. therefore, I also remind you that this plugin should always be a last resort.
I apologize for the mistake that had not added the code that is processing a token called 'hyphen (-)'. That issue has now fixed. But as you know, This plugin has a lot of the problem currently. In the first place, This plugin executes using File System functions that are built into a nw.js that uses in Windows or Mac. So it does not properly execute on the browsers or mobile platform which is not available them. In the second place, It uses a big memory to parse texts into the file called 'js/plugins.js'. So it is usually not processing some texts. therefore, I also remind you that this plugin should always be a last resort.



Thanks but now the "-" changed to + and ! (If i call the windows one and if I call the script the other). Anyway i see turning a plugin off may be serious damaging so If I can't find I way to make both work together I will just drop the minigame (Thankfully is not something that is core of the project).
This issue is pretty simple. Anything that tries to use the 'Sprite_Battler' outside of the battle scene (the mog plugin probably try) will cause the game to crash.


I had a similar issue with my Sprite on Windows plugin and this same visual gauge plugin. This solved the issue people was having with my plugin, try it to see if it solves your issue too.
This issue is pretty simple. Anything that tries to use the 'Sprite_Battler' outside of the battle scene (the mog plugin probably try) will cause the game to crash.


I had a similar issue with my Sprite on Windows plugin and this same visual gauge plugin. This solved the issue people was having with my plugin, try it to see if it solves your issue too.



Thanks. I inserted that code line in the Visual HP and worked. :3


if (!$gameParty.inBattle()) return;




Case Closed people. Tyvm everyone.

Original thread: https://forums.rpgmakerweb.com/threads/turn-a-plugin-off.65536/