"Class level" and "Total level"

So I want my actors to be able to level up and swap out different specialties (including stats, skills, etc) while retaining a certain amount of strength overall - a main actor level that's equal to the total levels of every type available to them. My goal is to get as close as humanly possible with existing scripts, then use my limited JS knowledge to hack myself the rest of the way.

My current idea for how to do this is by using Yanfly's Change Class Core. I would put the switchable aspects in primary classes that actors can switch between. The part that remains the same would be stored in a subclass that can't be changed. All I would have to do is somehow change it so that when the character levels up, the subclass also levels up.

Here's the rub: it would also be nice if characters could switch their primary classes during a battle. By using a special command, the whole party swaps to a predetermined set of classes. Think FFXIII's paradigm shifts, except the different formations are hard coded by me in advance (in fact, that's the way they get changed outside of battle too). This is probably going to require me to learn to write my own scripts, but am I overthinking this? I had thought about using a passive states script since it would be easier to change in battle, but on the flipside that would probably make the experience points and leveling aspect a lot harder... I just don't want to go down this rabbit hole unless I'm sure this is the smartest route to take.

Any other ideas? Am I nuts for even expecting this to ever work? Please help me brainstorm this puzzle!

And forgive me if it's the wrong forum. It's not really a learning JS question, but it's not entirely mechanics development either...
I was looking into that myself a few days ago. I could not find any scripts myself. A solution may be to have the stat increases per level be a little lower of an impact and have it be more equipment oriented. This would solve the problem of changing to a lvl 1 class and being very under powered. The equipment you have at your current area would help you from getting destroyed. I'm personally having classes that you unlock later in the game to have a higher stat value start on lvl 1. So say most of my characters are lvl 30, most of my characters have 4,000 - 5,000 health and I just unlocked an advance class. I am going to have the advanced class start at a higher HP with a slower growth rate. Just an idea to sort of fix it! If you find a solution to being able to do this, I'd love to hear it, though!

As far as the changing jobs mid battle, you could create an ability that calls a common event which has a plugin command of OpenClass
I haven't tried it myself but I think that would work!

Original thread: https://forums.rpgmakerweb.com/threads/class-level-and-total-level.79108/