Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Griver03 on May 13, 2012, 07:36:33 pm

Title: [XP] Class Change Skill Fix
Post by: Griver03 on May 13, 2012, 07:36:33 pm
hi, i need help with that what the title says :<_<:
everytime you change your class all leraned skills will be forgotten.
but if you switch back to it the learned skills are not relearned...
i want that if i switch back to a class that all skills that the class already have leraned get relearned !
hope someone can help me :^_^':
thx in advance
Title: Re: [XP] Class Change Skill Fix
Post by: G_G on May 14, 2012, 09:09:12 am
You must have a script that's physically removing the actor's skills then. Whenever I change classes, I still have all previous learned skills. Unless you want those skills to be removed whenever you change classes and reverted back.

EDIT:
Regardless, it was an easy feat. Whenever you change classes, all previously learned skills will be wiped, new skills will be learned according to the new class. If you choose to revert back, it'll re-learn the skills. Now this is simply going off the assumption that you aren't using any custom scripts or systems to force the actor learn skills.

class Game_Actor < Game_Battler
  alias gg_change_class_skills_lat class_id=
  def class_id=(id)
    gg_change_class_skills_lat(id)
    @skills = []
    for i in 1..@level
      for j in $data_classes[@class_id].learnings
        if j.level == i
          learn_skill(j.skill_id)
        end
      end
    end
  end
end
Title: Re: [XP] Class Change Skill Fix
Post by: Griver03 on May 14, 2012, 09:35:45 am
thx alot i will test it and hope it works for me...

maybe its because the legacy class change script, the class specific skills function doesnt work correct.
so it maybe comes because that, i never tested class changing in a blanco project.