Changing Characters But Keeping Same Level?

I have a character that's with the player from the very beginning. At one point during the opening dungeons this character loses their sword, forcing them to use other means in combat for the remaining of the opening chapter. I know how to do this in scripts using Theo's Side-View Battle system, that's actually quite easy to do.

But how do I keep the character's level and other equipment the same? I read I could with variables, but it didn't explain exactly how. If anyone can help me with this, I'd be very appreciative. ^^
What exactly are you changing? Class? Or the whole actor? I'll assume class.

Before the change, set a variable to the actor's EXP. I was changing class in my game and found out that the new class starts with zero EXP, so after the change, use Change EXP and increase it by that variable. It should automatically put the character on the level they were before (assuming that the changed class has the same parameter curves).

If you're just changing class, the equipment should stay the same, no?

Does this help a bit, or did I misunderstand? I could give details if necessary.
But how do I keep the character's level and other equipment the same? I read I could with variables, but it didn't explain exactly how. If anyone can help me with this, I'd be very appreciative. ^^
Why would a character lose their levels? If the equipment is removed then you are doing something that is not necessary.
You just need to force remove the weapon from the actor, that's all. If you remove the actor and put in another one, then I would advise to not do that.

Please provide details on what you are doing so we can understand what is happening.
What exactly are you changing? Class? Or the whole actor? I'll assume class.

Before the change, set a variable to the actor's EXP. I was changing class in my game and found out that the new class starts with zero EXP, so after the change, use Change EXP and increase it by that variable. It should automatically put the character on the level they were before (assuming that the changed class has the same parameter curves).

If you're just changing class, the equipment should stay the same, no?

Does this help a bit, or did I misunderstand? I could give details if necessary.
Can you tell me how to set this variable up?

I didn't think to just change the class, that'll actually help to remove the sword related skills and keep everything else.
Hmm, if all you need is to remove skills, maybe you can tie the skill(s) that the actor is using to the weapon type, and if the weapon is gone, they wouldn't be able to use them. But as Roninator2 said, we really need more detail to be able to give you the best solution. So just take us step by step through the process. After the character loses the sword, they can't slash anything. So what are they supposed to do? Will it open a new skill/skills for them? You could do it through class change, but there are handy scripts that can do it without all that. Details, we need details.
I didn't think to just change the class, that'll actually help to remove the sword related skills and keep everything else.
So you need to remove specific skills? That can be done by sealing the skills type. The skills would still show up but the actor can't use them without the sword.
If you don't know about setting variables to game data then there is much to learn.
1680986249503.png
Sorry for the late reply, got rather busy. As far as I can tell you in detail of what I'm talking about, the combat is like this.

Spoiler
1681011643869.png

Antoine, the guy holding his chest in fear, mostly uses his sword to fight. But when he loses it, he cowardly fumbles about combat until gaining a new sword near the end of his chapter. What'll happen is when I remove the sword from his inventory, his level, and armor remains the same, but now he has to slowly learn new skills he wouldn't have otherwise learn with the sword.

Does this help? I guess what I need to do, is change his class. When he regains a sword I'll have him again change classes to keep his new skills but readd the previous sword related skills as well if they were unlocked before this swap.

This is important to build his courage character wise.
Remove the weapon and remove the skills.
1681012685551.png

1681012702637.png
And if the skills to be forgotten are not fixed (as you say, they may be unlocked already, or not yet), make switches to remember what skills were already learned before the sword was lost.

skill learned.png


After the sword is retrieved, have the actor learn only the unlocked skills again, checking the switches.
Well, remembering the weapon skills (actually all of the available skills) is as easy as using my latest scriptlet. And yes, you can let your hero get them back by using a different script call.

Ruby:
# * Fake Weapon Skill Removal * #
#   Scripter : Kyonides Arkanthes
#   2023-04-09

# * Distributed AS IS * #

# * Script Calls * #

# - Basic Actor Call:
# actor = $game_actors[ActorID]

# actor.remove_weapon_skills
# actor.restore_weapon_skills

class Game_Actor
  alias :kyon_virtual_skrm_gm_sys_init :initialize
  def initialize
    kyon_virtual_skrm_gm_sys_init
    @old_weapon_skills = []
  end

  def restore_weapon_skills
    @skills += @old_weapon_skills.dup
    @old_weapon_skills.clear
  end

  def remove_weapon_skills
    @old_weapon_skills = @skills.dup
    @skills.clear
  end
  attr_reader :old_weapon_skills
end
Thank you guys for giving me those methods of how to do this. If I run into any trouble I'll let you know. For the now I'll try each moethod and see what works best, and yes I've just seen these. Life is that busy. ^^;

Original thread: https://forums.rpgmakerweb.com/threads/changing-characters-but-keeping-same-level.156513/