MZ ANY way of Turning off a plugin during the game?

So for my game, I'm using SumRndmDde's Timed Attack Plugin (compatible because of FOSSIL), but i want to have an option in game where you can choose to turn timed attacks on or off.

there are two (probably more) main problems i can see with this and one small problem:

1. Apparently there is no way to turn off Plugins using script calls

2. the player would have to start a new game for plugin changes to take effect

as for the small problem, in order to make the attacks stronger or weaker based on your score, all skill damage formulas are
(damage formula) * ((1 + gameTemp.tas_power) / 1.6)

gameTemp.tas_power is the value between 0 and 1 that corresponds to how well you did on the timed attack minigame.

im assuming if the plugin was turned off, the gameTemp.tas_power would be at 0 or whatever it was last attack, which would obviously be terrible, but since this is a value i think you can change it with a script call, right?

If you can't do this, I guess it's not the absolute end of the world, but it would be really nice if you could.
I've never done anything like this, but I'm... pretty sure if the plugin was turned off, the game would stop when you use a skill because "gameTemp.tas_power" would no longer be a parameter the game could reference, so I'm pretty sure even if you could turn off the plugin in the middle of the game, I think the game would then crash during the next encounter.
If you can identify which specific function(s) in the plugin you want to skip over, you can just add in a switch check that returns early

Like:

var _BattleManager_startAction = BattleManager.startAction;
BattleManager.startAction = function() {
_BattleManager_startAction.call(this);
if ($gameSwitches.value(switchId)) return;
if(this._subject.isActor() && this._subject.currentAction() && this._subject.currentAction().makeTargets()) {
var subject = this._subject;
var action = subject.currentAction();
var targets = action.makeTargets();
this[_.pass + "Temp Subject"] = subject;
this[_.pass + "Temp Action"] = action;
this[_.pass + "Temp Targets"] = targets;
$gameTemp.setTemporarilyDisableLogWindow(true);
this._logWindow.push('performActionStart', subject, action);
}
};


that wouuld have the battle stuff proceed as normal, without breaking any parameter references
It may indeed be possible (though very, very difficult) to disable a plugin at runtime… but that's probably not what you actually want to do.

Rather than attempting to disable the entire plugin, I suggest finding a way to edit the plugin so that it does nothing if a certain flag is set. Basically what the previous post outlined in more detail.
switching on or off plugins for the engine is like working on your car engine - it can't be done while driving 40 mph on the highway.

what can be done is to disable specific functions of a plugin - IF the programmer installed commands for it, same way as if a mechanic installed a switch for something in your car.

That is what several of the posters above are talking about - but doing this requires some knowledge of programming and some understanding of the plugin in question.
and it will always be a solution specific to that function of that plugin - there is no general answer.

Just one example of what will never work: if the plugin saves and loads its own data from the savefile, then disabling that part will make the savefile incompatible - because older savefiles suddenly contain data that the engine doesn't know how to handle with those parts of the plugin missinig.

Original thread: https://forums.rpgmakerweb.com/threads/any-way-of-turning-off-a-plugin-during-the-game.175138/