[MZ] Set different Max Levels for each class?

Hello again, i came upon another problem. Is there an easy way to set different max levels for different classes? Preferably via class notetags.

I haven't found a plugin for MZ and i did not manage to make the MV plugins work via FOSSIL. I always get an error probably due to the VisuStella Class Change plugin.

As always, any help is highly appreciated.
Have a nice day!
maybe, but if you want to change class on the level, you can try [this].
if you want to max out and no exp gain, when level is reach and only
continue from choosing a class, than I'm not entire sure if one exist.

Eli has some plugins to check out, and might restrict the level or how
the class handles on a certain level. [this handles the class promotion],
but unsure if it stops from leveling though.

you can check his plugins if there is something you need or see if there
is a way to stop leveling when a class is made.

it depends what you exactly seek which is a bit unclear.
Thank you for the input. I fear it is a little more complicated than that. But i had an idea over night.

Since i am leveling via an item using a common event i can set conditions where i can check for levels and deny level ups and inform the player that the class is already max level.

I feel like this could look something like this if lvl 10 is max level for classes 1,2,3,4:

act = $gameActors.actor(1); cid = act._multiclasses[1]; clvl = act.classLevel(cid); if (cid == 1 || 2 || 3 || 4 && clvl > 9)

But I am not sure where to go from there. Return 1 or otherwise 2? Put it in a variable? And check via Conditional Branch afterwards?
From an old post but it seems related to MV tho I assume you have scripting knowledge?:

From Eli, as shadow said, not sure if the plugin locks levels

Alternatively, you can go to the Game_Actor max level function in the plugin and set custom max levels according to class ID. Eg:

const _alias_actor_max_level = Game_Actor.prototype.maxLevel
Game_Actor.prototype.maxLevel = function(){
const classId = this._classId;
switch(classId){
case 1: return 10;
case 2: return 30;
default: return _alias_actor_max_level.call(this)
}
}

Just copy and paste that into a .js file and load it into your plugin manager and you should be fine.
Thanks for the input. The my idea with the if statement worked like a charm altough it got a little more complex than that. The common event is very huge now but as long as it works, that's fine with me. You can close the thread. Hit me up if anyone needs some inputs.
Okay, happy it works for you but you keep saying that it's complicated and complex but now nobody know what you were trying to accomplish...

The class system in RMMZ is far from functional since (out-of-the-box) any actor's skillset is 100% dependent on their class and level. So any kind of multi-classing is bound to be complicated and complex. Would therefore appreciate if you describe what exactly the class system is you're envisioning and what the problems are...

There are a couple plugins out there that handle multi-classing, but they all handle things differently...
My system finally works altogether.

The setup is that everyone has a locked primary class which levels with exp till 99. Then there is a secondary class that levels via item use and consumes CP in the progress. Those classes have limited levels and unlock follow up classes which are basically better versions.
That's about it, and with this last step i have all my puzzle pieces together 🙂
Big part is thanks to the community due to the help they provided

Original thread: https://forums.rpgmakerweb.com/threads/mz-set-different-max-levels-for-each-class.160029/