Is there a way to disable mouse function on certain maps for different minigames?

I researched a bit into how rpg maker as an engine could do with point and click mechanics and I found that point and click features can only be done via plugins, even then it isn't 100% pure point and click as it uses the player characters that are present in game as the "cursor"

After experimenting with the native mouse controls in MV, I find it less than ideal for a usual point and click mechanic as it requires each click to be instantaneously while I found after clicking with MV native mouse controls there's an initial lag, I try putting impassable tiles to even adjusting the speed of the character to force a pseudo point and click but found the response not consistent as sometimes the click immediately shows text while sometimes it either doesn't show text or even show the event text even though I'm clicking on other places (I think the character model and the area that's not the event actually share's a trajectory and that's why the other points show text where it shouldn't), it's also frustrating that the mouse clicks at times ignore the impassable objects and moved the character around anyways

I want to use plugins to fix this issue but unfortunately Yanfly's point and click plugin is paid to use while I myself don't have the means to purchase the plugin

There is this Mouse System Ex by Tor Damian Design that seems promising, but I see the documentation site is broken, the one download link contains a setup which I find very suspicious as what I understood javascript files don't require a setup (do correct me if I'm mistaken)

After moments of contemplation, I think I have no choice but to compromise the design as I save money for Yanfly's plugin (to this day I'm sad that my currency is so weak 🙁 ), I think I'm not going to make a fully point and click game, instead I'm going to make the keyboard the main control while the mouse is only used for certain minigames like puzzles and the like.

(I will be beyond happy if there's an easier and more effective way to implement point and click elements in MV)

But I'm kind of at a loss in how I can disable the mouse controls in only certain points in the game without outright disabling mouse controls fully. How can I readjust mouse controls if I may ask?
Create a new plugin file with any name and import it as a plugin. Paste this:

Code:
(function() {
function condition() {
    return !(SceneManager._scene instanceof Scene_Map && $gameSwitches.value(1)) // <--
}
const _isPressed = TouchInput.isPressed;
TouchInput.isPressed = function() {
    return condition() && _isPressed.call(this);
}
const _isTriggered = TouchInput.isTriggered;
TouchInput.isTriggered = function() {
    return condition() && _isTriggered.call(this);
}
const _isRepeated = TouchInput.isRepeated;
TouchInput.isRepeated = function() {
    return condition() && _isRepeated.call(this);
}
const _isLongPressed = TouchInput.isLongPressed;
TouchInput.isLongPressed = function() {
    return condition() && _isLongPressed.call(this);
}
const _isReleased = TouchInput.isReleased;
TouchInput.isReleased = function() {
    return condition() && _isReleased.call(this);
}
})()

Replace the 1 with a Switch ID of your choice. Once the Switch is ON, all Touch Inputs are ignored.
Create a new plugin file with any name and import it as a plugin. Paste this:

Code:
(function() {
function condition() {
    return typeof $gameSwitches === 'undefined' || !$gameSwitches.value(1) // <--
}
const _isPressed = TouchInput.isPressed;
TouchInput.isPressed = function() {
    return condition() && _isPressed.call(this);
}
const _isTriggered = TouchInput.isTriggered;
TouchInput.isTriggered = function() {
    return condition() && _isTriggered.call(this);
}
const _isRepeated = TouchInput.isRepeated;
TouchInput.isRepeated = function() {
    return condition() && _isRepeated.call(this);
}
const _isLongPressed = TouchInput.isLongPressed;
TouchInput.isLongPressed = function() {
    return condition() && _isLongPressed.call(this);
}
const _isReleased = TouchInput.isReleased;
TouchInput.isReleased = function() {
    return condition() && _isReleased.call(this);
}
})()

Replace the 1 with a Switch ID of your choice. Once the Switch is ON, all Touch Inputs are ignored.
Ohhhh, this might work

what's your terms as I use your plugin? Are you fine with me using your plugin in a commercial r rated project?
It's too small to call it a "plugin"; you can do with it what you want 😂
Odd, the plugin broke the game (image 1)
Is it because I copied and pasted it in visual studio code and saved it as javascript? (Image 2)
There's no way the plugin widow is supposed to be this empty (Image 3)

What did I do wrong?
Avoid spaces in the plugin's filename 😉
I actually recommend Mouse System Ex – I'm using it myself, though I don't personally use the point-and-click functionality. You can find the documentation in the WayBack Machine, and the latest version of the plugin at GitHub (click the plugin, right-click Raw, save as).
I actually recommend Mouse System Ex – I'm using it myself, though I don't personally use the point-and-click functionality. You can find the documentation in the WayBack Machine, and the latest version of the plugin at GitHub (click the plugin, right-click Raw, save as).
The github doesn't support download though
Should I manually tweak it?

Ps. Nevermind the site actually supports downloads!
Avoid spaces in the plugin's filename 😉
I'll try that after this, thanks!
Avoid spaces in the plugin's filename 😉
Uhhh, I'm so sorry to bother you but even when I typed the filename with no spaces, my game still refuse to run
I've updated the code from my previous post; now it should work!

I also extended it so that the plugin only forbids TouchInput when you are on the map and not in any menus.
I've updated the code from my previous post; now it should work!

I also extended it so that the plugin only forbids TouchInput when you are on the map and not in any menus.
I'll take a quick look after this, thanks!
I've updated the code from my previous post; now it should work!

I also extended it so that the plugin only forbids TouchInput when you are on the map and not in any menus.
I'll take a quick look after this, thanks
Update, the plugin didn't break the game this time

And I managed to fix my initial problem with this particular plugin

It turns out I didn't set the self-switch properly, now it works

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-disable-mouse-function-on-certain-maps-for-different-minigames.180865/