MZ WAY_CustomOnEquipEval Skill Retaining

This issue is very similar to the issue I've brought up in this post: https://forums.rpgmakerweb.com/inde...witching-weapons-classes.179903/#post-1528705

However, for some reason, the issue has returned even after using a.initSkills() in the note tags.

Here's what's going on:

There's a major issue that I have whenever I'm using WAY_CustomOnEquipEval. Say for example, I equip a weapon that allows me to use Class 1 and its skills. However, when I decide to equip Class 2, the skills for Class 1 then merge with Class 2, and this issue continues with every other class switch.

The scripts for these classes are as follows:

Class 1:
=================

<Custom On Equip Eval>

a.changeClass(13)

a.initSkills()

</Custom On Equip Eval>

<Custom On Remove Equip Eval>

a.changeClass(15)

a.initSkills()

</Custom On Remove Equip Eval>

Class 2:
=================
<Custom On Equip Eval>

a.changeClass(4)

a.initSkills()

</Custom On Equip Eval>

<Custom On Remove Equip Eval>

a.changeClass(15)

a.initSkills()

</Custom On Remove Equip Eval>

Now as you can see a.initSkills() was added to have the lasses retain their skills. And it worked up until I decided to test skills out in battle. I had planned to make skills that when activated, would cause the user to switch classes. This is what the skills' note tags say in regard to switching to a certain class

Weapon 1
<Custom Show Eval>
if ($gameParty.hasItem($dataWeapons[5], false)) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

Weapon 2
<Custom Show Eval>
if ($gameParty.hasItem($dataWeapons[13], false)) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

Additionally, I've created Common Events that allow me to switch the class in the skills Effects section.

How do I fix this?
if you want not to have dataweapons or equipped:


Code:
<Custom Show Eval>
visible = !$gameParty.hasItem($dataWeapons[5]);
</Custom Show Eval>

to shorten it or around this, depending what it exactly does.
but this toggle it on or off on an one-liner.

for the equip part, I don't know, but do you simply swap? or unequip first?
and would that work too?
if you want not to have dataweapons or equipped:


Code:
<Custom Show Eval>
visible = !$gameParty.hasItem($dataWeapons[5]);
</Custom Show Eval>

to shorten it or around this, depending what it exactly does.
but this toggle it on or off on an one-liner.

for the equip part, I don't know, but do you simply swap? or unequip first?
and would that work too?

The equip part works exactly like the equipment menu. When you equip a weapon in the menu, it's supposed to change classes and skills. The issue is that despite having a.initSkills() in the code to have the class retain the skills, it's still messing up.

I'll make a video that shows how it works.

EDIT: Here's a video that shows the issues.



I tried replicating the way personas are swapped in the Persona series. There are some issues with it like how the skills carry over from class to class and how swapping a weapon can reset the base class. Plus the skill Change Flail will automatically disappear since its connected to the class you get it from.

(Also, to give you a bit more information, I'm using WAY_CustomOnEquipEval with Lazi_ClassChange
if you want to swap (performClassSwap) or whatever,
can you try to set below it: a.refresh() ?

I can't tell if that works, as the perform class swap refresh it if
show levels in menu parameter = true.

if that is false, try to add in and maybe it works, otherwise I have no idea.
if you want to swap (performClassSwap) or whatever,
can you try to set below it: a.refresh() ?

I can't tell if that works, as the perform class swap refresh it if
show levels in menu parameter = true.

if that is false, try to add in and maybe it works, otherwise I have no idea.
It works in the menus, but it doesn't work when I use the skill in battle. I can't tell if it's because the common event I use that uses the Change Class button to cause the class switch.

Screenshot 2026-01-18 101705.png
try to find a plugin if its not by the plugin you use, call the common event,
but you may check the actor ID and class you want to swap.
I don't know if that works, but I'm out of options if "a.refresh()" in
the skill fails (last line on remove/add)
try to find a plugin if its not by the plugin you use, call the common event,
but you may check the actor ID and class you want to swap.
I don't know if that works, but I'm out of options if "a.refresh()" in
the skill fails (last line on remove/add)

Okay I managed to get my hands on a previous backup and managed to fix everything. The common event I used to switch classes was the issue because I was switching the class directly instead of switching the weapon which allowed the plugin's code to activate to switch the class.

So sorry about this. 😅

Original thread: https://forums.rpgmakerweb.com/threads/way_customonequipeval-skill-retaining.182014/