Character Transformation

Hello, I'm new to Ace and I've been trying to get one character through the use of an item change into another character. By that I mean different class, sprite, etc. but I want that character to be the same level as the original and than use another item to revert the effects.

My current issue is the first transformation changes the level to one, but the second transformation brings it back to the correct level.

If anyone has any suggestions I'd appreciate it
Show us your event that's doing the transformation.


If you're using a Change Class command, by default, it does not keep EXP between different classes. However, if you see what the Game_Interpreter is doing behind the scenes, you can call it via a Script command, and pass an optional parameter that DOES allow EXP to be shared between classes.


Note though, if your EXP progression is different between the classes, though they may have the same EXP before and after the change, they may NOT have the same level.


If you will ALWAYS want the EXP to be kept when you change classes, just go into your scripts (F11 from editor), find the Game_Interpreter script, go to line 1259 (it's under the command_321 method) which says this:

Code:
actor.change_class(@params[1]) if actor && $data_classes[@params[1]]
and change it to this (I've added in an extra parameter):
Code:
actor.change_class(@params[1], true) if actor && $data_classes[@params[1]]
Yes, this seemed to do the trick thank you, but now I have one more question.

After the character changes there are events where the character talks, but the original character's face still shows up.  

Is there an easy way to fix that? I'll post a pic in a sec..

Picture.PNG
ah, yes. I did a script for that too. Give me a minute ...

Here you go:

class Window_Base < Window alias shaz_ffa_convert_escape_characters convert_escape_characters def convert_escape_characters(text) result = shaz_ffa_convert_escape_characters(text) result.gsub!(/\eF\[(\d+)\]/i) { $game_message.face_name = $game_actors[$1.to_i].face_name $game_message.face_index = $game_actors[$1.to_i].face_index '' } result endendPaste that into a new script slot below Materials.In your Show Text, instead of choosing a face, just put \f[x] at the beginning of the message, where x is the actor id whose face you want to show.

So:

Code:
\f[3]Hello
in the Show Text command will display the text Hello and show Actor 3's face.
Yup, this works, doesn't show in the preview though that's why I was show confused thank you for your help; hopefully I won't run into any more bugs.
No, it wouldn't show in the preview, because that's the engine/editor itself. The script mods don't apply to the editor - only in-game 🙂


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/character-transformation.21312/