Class change during battle?

Hello!

I know there's a similar topic about this but it doesn't bring up a couple issues that I'm having. I'm using a Skill that calls a Common Event. The Common Event uses the Change Class Event, but when I use it, the Actor's level goes down to one. Is there a way to retain the Actor's level when they change class?

Also, is there a way to store equipment into variables so that the Actor equips them while switching classes?

Ex: The Actor is currently equipped with a Sword and Armor. When they change class during the battle, they equip a Staff and Robe. When they change their class back during battle, they equip the same Sword and Armor from before.

I would also like to do something similar with Skills.

If this is at all possible, that would be great!
yes, it is possible - but you need to make it so by event commands before and after the change class command.


For example, before the class change you use control variable:game data to store the current level, then change the level back to that after the class change.


same goes with the other options, although you'll probably have to use a control variable:script data sequence to store some of that info and use script commands to change it back.


Changing the skills when changing classes will require a script - I think there is one written by tsukihime to do that - please search on the master script list, I don't have a link at the moment.
I got the equipment to work, but level doesn't work. I stored the Actor's level into a variable and tried using this script:

$game_actors[11].change_level($game_variables[1], false)But it gives me this error:

rpgmakervxace_error_by_pklucky-d72zbpm.png


And I have not found the script you are talking about. 🙁
The window for entering script as an event command automaticly enters a line break - which breaks your script.

To shorten the line and avoid that, try this script:

Code:
x = $game_variables[1]$game_actors[11].change_level(x, false)
Alright, I got everything working. Thank you all very much.
For the record, the Tsukihime script Andar mentioned is the Class Changing script. Allows you to get rid of old skills and add new ones on class change.
I think if you pass true to that method instead of false (which is the default, so really not needed anyway), it will retain the EXP after a class change, so the level will be correct for that EXP amount for the new class.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/class-change-during-battle.22578/