MZ MV to MZ Compatibility question: Ammunition Plugin

So, I ran across an ammunition plugin system that I'd quite like to take advantage of but it's sadly for MV rather than MZ. It can be found here:

I tried testing compatibility by loading it into an MZ project with no other programs, but I got this error when going to the skill menu for a character who had one of the tagged skills.

1621748025083.png



And when I go into a battle, I get this error:

1621748089938.png



I'm completely JS illiterate, but from what I understand some plugins are just a few tweaks away from compatibility between MV and MZ. So, I was curious if anyone could tell me if there's a novice-friendly solution where I can just change a few lines of code or do a find-and-replace of terms.

Alternatively, if anyone knows of an equivalent plugin for MZ then I'd be interested in knowing where to find it.
You could try this and see if this works
https://forums.rpgmakerweb.com/inde...-plugins-in-mz-200-plugins-fossilized.135523/

and if you dont want extra plugins in a really bad and quick explanation
the rectangle problem is caused by any making of a window as mz added the Rectangle object requirement to it.

and the text color is a no longer used function
Compatibility between MV and MZ is a very tricky subject. Some plugins are just fine, because they deal with aspects that are identical between the two, or are largely original code that branches from a location that's the same in both.

But pretty much anything involving windows is instantly incompatible. Which includes text colors, oddly enough(in MV colors are attached to the window itself, in MZ there's a whole Color Manager system that handles that stuff). In MV, a window is built using location and size information, in MZ, it's built with a rectangle object that contains that same information.

Very similar, but just different enough they don't play nice together on their own. That's why FOSSIL and RETRO exist. FOSSIL work to make MV plugins compatible with MZ, and RETRO does the opposite. In your case, FOSSIL is the one to pick, unless you want to find an MZ plugin that does what you're wanting. If you get FOSSIL and the plugin still doesn't work, make sure to let the FOSSIL creator know.
Interesting. I will check that out. Thanks for the help!

EDIT: so far, it seems to be working. Time will tell if it plays nice with my other plugins, but it's a good start!
Glad it seems to be working. I'll add it to the 'supported' list 🙂
Window_Base.prototype.textColor() was removed as a function in MZ, which is where the first error comes from. It was moved to ColorManager, so you could replace any instance of this.textColor() with ColorManager.textColor() instead.

As was mentioned above as well, the rectangle argument crash is because Window_Base.prototype.initialize requires a rectangle as its argument, instead of individually taking the x, y, height and width parameters, as it did in MV. Plugins like fossil can take the original call and turn the individual arguments for the size of the rectangle and turn them into a rectangle before providing them to the Window_Base object, bypassing this error. You could find the function where the new window calls the Window_Base.prototype.intialize function, take the x, y, height, and width parameters yourself and make a rectangle out of them, then provide that to the function instead. Although, since fossil seems to have done that with no work on your part, it's probably better to just use that instead, at least in this case.

While a lot of MV plugins will work in MZ, anything that deals with text or windows will generally have these problems. It's good that fossil seems to be able to fix them automatically in at least a few cases though.

Original thread: https://forums.rpgmakerweb.com/threads/mv-to-mz-compatibility-question-ammunition-plugin.136759/