Learning skills past change class

I'm making a half script, half engine that requires one char changing classes in the process. This char may or not be on lvl 99 by the time it's used, player's choice. The change class I must use is the one from the script call, {actor}.changeClass function.
The issue I came across, is one of the most basic ones in all rpg maker iterations, if your char changes class past the level (or even the same level) they learn a skill, they don't learn it, and they also don't lose their former skills.
I know this is intended to work like this, but I need it to be the opposite, they learn all the skills corresponding to their level in the new class and forget all class skills they had learnt in the previous class.
Is there any way without using a script to do so?

[EDIT] $gameActors.actor(id).initSkills() is a scripting way to do something close. The issue is that it also cleanses the skills learnt through the game in many different ways.
actor.initSkills?

should be the default behavior within the change class call within the editor, which you won't trigger if you call changeClass by script.
actor.initSkills?

should be the default behavior within the change class call within the editor, which you won't trigger if you call changeClass by script.
I also tested it out of pure eventing. Character retains their former skills and doesn't learn the new ones, in MV.
I'll try that, thanks in advance. I will edit this post to say if it worked or not.

[EDIT]It does work! But it also deletes the skills learnt by items and events...
Character retains their former skills and doesn't learn the new ones, in MV

backtrack the code from the level-up method to the learning of skills.
the learning of skills happens upon leveling up, and leveling up is just adding numbers to an XP pile, and the pile is a property of classes.... so, the problem has to be there in the leveling up not being passed correctly
I had a similar problem in Ace, and I *think* I solved it by forcing an initSkills.

did you pass the experience flag? changeClass(class, TRUE) ?
I'm not back home to try the line yet.

Yes, I have keep experience true, that's one of the main points, keeping the experience rather than saving the exp, restarting it and leveling it back up.
Characters can learn class unrelated skills during the playthrough in multiple ways, and I can't keep track of all of them.
Keep exp is true.

I still prefer a more... vanilla way if anyone knows (this is the reason it's in maker specific instead js help), the pseudo engine is already far too close to becoming a plugin, and I want to keep it engine with scripts.


[EDIT]
{$actor}.initSkills() did work... but the skills learnt from events, items and more also get deleted...

Original thread: https://forums.rpgmakerweb.com/threads/learning-skills-past-change-class.105263/