I had an idea to make it so that your character can equip whatever he/she wants and depending on what you have equipped will give you a class.
My problem is, I'm not really sure where to start and I've looked, but found nothing about this.
Any ideas? With or without script. I assume this can be done with variables.
Well, it can certainly be done in engine.
Basically you'll have a common event run when exiting the menu that wil check the character's equipment and depending on the equipment will change the character's class accordingly.
It will be very tedious however because you'll have to check slot per slot for each actor what they have, assign it to variables and then check all the variables before deciding the class. It could get quite complex depending on the number of different equipment slots and classes.
This could probably be simplified a lot if you organize your database in a way that all equipment that will lead to the same class is within a certain range. This would allow you to check for weapon id between 1 to 5 for knight class instead of checking for weapon id 1 or 3 or 17 or 234 for knight class. That should save you a lot of conditionnals.
It can be done in engine but it will be a hassle. If you want the class to change while you're in the menu then it will require a plugin.