Enabling Plugins only on certain maps

Hi all -

I'm trying to use Tomoaky's amazing platforming plugin (http://hikimoki.sakura.ne.jp/plugin/jump_action.html). However, I was hoping to only use it for one section of the game and have the rest be more of a traditional top-down RPG.

After trying to read through the instructions in Google Translate, it doesn't look like there is any Plugin Command or Comment Tag or anything that would allow you to Turn On/Turn Off the plugin. Wondering if there's any way to do this at the RPG Maker level if the developer didn't provide any On/Off tags, or if I'm just out of luck.

Thanks in advance!
If that script doesn't modify any core functions or managers, then (and this way is a little dangerous) you could deactivate the script by re-embedding the scripts with the altered functions. A plugin simply runs after the game scripts and that's how it modifies the game functions. So if you make the game scripts run after the plugin again, it will undo the plugin.

This way isn't plug and play because it could depend on if you are using other plugins and stuff, but here is an example plugin to deactivate/reactive plugins.
PHP:
var repeatJS = function(file){
   var js = document.createElement("script");
   js.setAttribute("type", "text/javascript");
   js.setAttribute("src", file);
   document.body.appendChild(js);
}
var nullifyPlugins = function(){
   var defaultScripts = [
       "js/rpg_objects.js",
       "js/rpg_scenes.js",
       "js/rpg_sprites.js",
       "js/rpg_windows.js"
   ];
   for(var i = 0; i < defaultScripts.length; i++) {
       repeatJS(defaultScripts[i]);
   }
}
var reactivatePlugins = function(){
   var pluginScripts = [
       "js/plugins/TMJumpAction.js"
   ];
   for(var i = 0; i < pluginScripts.length; i++) {
       repeatJS(pluginScripts[i]);
   }
}

Then call
PHP:
nullifyPlugins();
by event script to deactivate plugins and
PHP:
reactivatePlugins();
to reactivate.

Though I do believe there are many other factors to consider, for instance if he has active window functions... That part I don't know. I'll look into it, if you need more help.

I tested this out to deactivate one small plugin and it does work, but I also learned the core and managers js will crash the game if re-embedded and that's why I removed them from the defaultScripts.

I've also had bad experience with running double javascripts with web stuff, so this will really only work if those default scripts are written fundamentally to handle repeat defines, which I think it should be because it was made for plugins.
Hey Mogwai, thanks for the post! I can generally interpret JS but can't write it, so forgive me if I'm a bit noob here 🙂

I gave this a try and when I try to Nullify it crashes with "TypeError: Cannot read property 'call' of undefined" when I try to move. The JumpAction changes core things about movement like movement speed and acceleration speed, so I'm guessing that it's still trying to find those components of the plugin even after reloading the default scripts.

You answered my question (much appreciated) about whether or not there was a built-in way to do this. If you'd like to keep playing with it I'd definitely be down for testing it, but seems like this may not be possible given how much the Action script modifies the game.
Yeah, I figured there would be some lingering script stuff at play. Sorry about that. I kinda doubted my first method.

The only alternative is to modify the plugin so it only runs on a particular map. If you know the script's author, I'd ask him for a solution. I'm not sure if you would so..

...if you want me to take a crack at it, I will try.
This is the script => http://hikimoki.sakura.ne.jp/plugin/plugin_ja/TMJumpAction.js
...correct?

It's over 2000 lines so it could take me a week, but I will try.
Yea that's the one - if you're so inclined and a bit bored would be much appreciated! 😀
I'm already halfway there.

Are the battles jump/platformer too?
There seems to be some battle stuff using params doing visual stuff like pop-up text. I'm not sure what it's for because it's all in Japanese.
Do you want battle stuff left in (all maps)?
Ideally would be able to completely turn off all systems it adds, so on any other maps game behaves as normal.

The game I'm making is kind of a genre spoof satire, so will have one segment that's platforming action-y and then the rest is other genres.

So no, dont need the battle stuff in all maps 🙂
This is a little bit rough, but I've added a param "onlyOnMaps" and you just put the platform map numbers like 1,2,3 that is the number of the Map001 <- id=1 etc.

This went faster than I expected. It turned out to be a very cleanly written script.

Let me know if you find any bugs. I only tested on two maps.

Only credit the original author; don't credit me. I'm not being humble; I just don't want to freak out the original author if he unknowingly discovers his script with another person's name on it. It's like kissing their significant other behind their back.

It only lets me attach txt files, so just remove the .txt at the end.
Played around with it a bit before work this morning and it works great so far! Awesome! Thank you so so so much!!!!! You rock.
wait how did you import the java script with just the code?
Necro-post notice: Priden
Also, your query is not the same as that of the opening poster, so this is also hi-jacking a thread.
Please start a new thread in Javascript/Plugin Support, stating exactly what your question is. You can link back to this topic if there is something of particular relevance.

Original thread: https://forums.rpgmakerweb.com/threads/enabling-plugins-only-on-certain-maps.74957/