MV Yanfly Equip Core - Dynamically Changing Equip Slots

Hello all,

I am using Yanfly's Equip Core plugin (http://www.yanfly.moe/wiki/Equip_Core_(YEP)) to assign equipment to my classes:
1609084830224.png


As the game progresses, I have characters change classes to gain access to additional slots:
1609084858463.png



However, I have a few issues with class changing being the solution to my problem here. Without getting into too much detail, changing classes causes issues with other plugins and resetting parameters.

I'm wondering if there is a way to instead allow Equip Slots to change after a switch is on. That way, as the game progresses, characters will retain their classes, but will have proper access to their equipment.

Thanks in advance for any help.
You could try making subclasses whose only purpose is to define the equip slots. That way it doesn't get in the way of whatever's in your main classes. I believe you can even make it so the subclasses aren't shown in the menu if that's what you want.
I will give that a try and report back.

Edit: Unfortunately, I don't think that this works. It appears that defining the equip slots in the Subclass does not carry them over to the primary Class.

Subclasses would likely work if all equipments were unique, however, each character can equip two accessories, meaning I have to use the <Equip Slot:> tag.

Another unfortunate downside of Subclass is that even turning everything off, the name still appears in the menu. I'm sure I could remove that pretty easily though.
This probably isn't helpful, since it doesn't really solve the problem, but I'll write it out here anyway, so someone else could see it and maybe figure out how to fix it.

The note tags that set the equip slots are stored on the class, and can be see on the class at $dataClasses[x].equipSlots. During runtime, you can change these slots by changing the elements in that array using a script command. For example, you could do $dataClasses[1].equipSlots.push(5) to add a second accessory slot to the end of the array, or $dataClasses[1].equipSlots[0] = 2 to change the weapon slot into something else entirely.

However, since this is stored entirely on the $dataClasses object, any changes you make during runtime are not saved, and therefore when you load the save later, those changes will revert to the way they were in the database originally. Meaning that in order to allow temporary modifications to the equip slots allowed, you'd need to change the way they are handled entirely, to read them from the $dataClasses object first, and then apply modifiers to them, or look for something on the actor that sets the equipment slots a certain way, and then falls back to the class object if the actor doesn't have that on them.
Thanks for the info. It's good to know, and maybe I can use it to help piece things together.

I'm wondering if it would be possible store the equip slots in an array and upon game loading run a common event that applies that. My only concern would be changing equipment before loading forcing unequips to happen.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-equip-core-dynamically-changing-equip-slots.131471/