Anyone know how I would start with making a Plugin that prevents you from gaining EXP?

This'll be my first time making one, and I wanna get some help on learning how to really start. So it would be nice, and I'd really appreciate it if someone could give me some tips on where to beginning. The entire plugin is based on Lv1 Critical mode runs of Kingdom Hearts 2 Final Mix. So how I stop the acquisition of EXP to have this set?
If you want to stop your characters gaining EXP completely, why not just set EXP to 0 for all your enemies?

If you want to do it via plugin, you need to find the places where EXP is given, and overwrite those functions to not give it. If you don't want it displayed at the end of battle, you need to find the place where it's displayed, and overwrite that function to not display it.

I think you'll find them both in rpg_managers.js in the BattleManager class.
If you want to stop your characters gaining EXP completely, why not just set EXP to 0 for all your enemies?

If you want to do it via plugin, you need to find the places where EXP is given, and overwrite those functions to not give it. If you don't want it displayed at the end of battle, you need to find the place where it's displayed, and overwrite that function to not display it.

I think you'll find them both in rpg_managers.js in the BattleManager class.
I was thinking that, but I wanted to set this to carry over in NG+1. I was gonna make it an accessory as well, or even an ability. So I wanted to do this without adding or changing enemies so very often that would just be annoying.
An accessory or ability that stops you gaining EXP? Can't imagine why I'd want to use that. Not familiar with the game you referenced.

So if you want to make it conditional, allocate a switch - when on, you get EXP, when off, you don't. I think you can turn on a switch in NG+ to change things on the next run. And in your plugin, instead of overwriting the methods to NOT gain/show EXP, make them dependent on the switch. You could simply alias the functions that change/display EXP gained, and call the aliased functions if the switch is on.

Something like this:
Code:
var _BattleManager_oldFunction = BattleManager.prototype.oldFunction;
BattleManager.prototype.oldFunction = function() {
  if ($gameSwitches.value(x)) {
    _BattleManager_oldFunction.call(this);
  }
};
An accessory or ability that stops you gaining EXP? Can't imagine why I'd want to use that. Not familiar with the game you referenced.

So if you want to make it conditional, allocate a switch - when on, you get EXP, when off, you don't. I think you can turn on a switch in NG+ to change things on the next run. And in your plugin, instead of overwriting the methods to NOT gain/show EXP, make them dependent on the switch. You could simply alias the functions that change/display EXP gained, and call the aliased functions if the switch is on.

Something like this:
Code:
var _BattleManager_oldFunction = BattleManager.prototype.oldFunction;
BattleManager.prototype.oldFunction = function() {
  if ($gameSwitches.value(x)) {
    _BattleManager_oldFunction.call(this);
  }
};
I'm gonna need some more of your help my game is currently giving me a problem lots of people ran into, "Cannot read property "0" undefined.
Can I send you my game so you can take a look? I tried everything, and at this point, I have no other way of fixing it that I know of.

EDIT: FIXED THE PROBLEM.

Original thread: https://forums.rpgmakerweb.com/threads/anyone-know-how-i-would-start-with-making-a-plugin-that-prevents-you-from-gaining-exp.77343/