RMMZ MV to MZ Compatibility question: Ammunition Plugin

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
221
Reaction score
61
First Language
english
Primarily Uses
RMMV
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.
 

rexie09

Villager
Member
Joined
Apr 4, 2021
Messages
26
Reaction score
10
First Language
English
Primarily Uses
RMMZ
Last edited:

Drakkonis

Veteran
Veteran
Joined
Mar 5, 2021
Messages
210
Reaction score
160
First Language
English
Primarily Uses
RMMZ
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.
 

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
221
Reaction score
61
First Language
english
Primarily Uses
RMMV
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!
 
Last edited:

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
848
Reaction score
711
First Language
English
Primarily Uses
RMMV
Glad it seems to be working. I'll add it to the 'supported' list :)
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
943
Reaction score
593
First Language
English
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Posted some halloween freebies! Grab them while on season :kaopride:
hallow_cat.png
So my birthday was about a week ago! Just forgot to post it. I went to a Golden Corral, and it was soooooo good! :kaojoy: I also got some Animal Crossing in my life! Yay, Animal Crossing!
At this point, "unique and diverse cast of characters" might as well be slang for Every Character is a Human-Sue.
I found an absolutely brilliant lifehack on the internet today.

Screenshot_760.jpg

Forum statistics

Threads
116,143
Messages
1,096,138
Members
151,570
Latest member
grungewitch
Top