How 2 replace skills?

How do I make it so that when an actor reaches a certain level, one of their skills is replaced by another?

One way is a small script that makes a skill remove another one when it’s learned. In the Script Editor, add a new script under Materials and paste this:

class Game_Actor < Game_Battler
  alias baz_replace_learn_skill learn_skill
  def learn_skill(skill_id)
    baz_replace_learn_skill(skill_id)
    skill = $data_skills[skill_id]
    if skill && skill.note =~ /<replaces:\s*(\d+)>/i
      forget_skill($1.to_i)
    end
  end
end

Then put <replaces: 5> in the new skill’s note, where 5 is the ID of the skill it takes the place of, and add the new skill to the class’s Skills to Learn at the level you want. When the actor reaches that level and learns it, the old one gets removed.

Yo Baz you always show up to our problems and make it five trillion billion times easier by just straight up making a script for it. You’re goated dude
I just thought, what if you put all your scripts, big and small, in one spot? There’s a lot of incredibly useful stuff of yours.