+ rbahamut 8 Posted April 2, 2013 (edited) Unlearn Skills Addon for YEA Class System Author: Rbahamut Backstory: I was noticing that once I unlocked more classes with YEA Class System and YEA Class Unlock Level, that the new classes that could use magic ALL had the previous unlocked and used classes spells as well. Looking further into it, all the specials were shared between all characters as well! I looked and looked through the script and nothing described how to stop this! I do not use subclasses and want a true class change with individuality of abilities and non shared levels, so it can create more strategic encounters. So after nearly ripping out my hair, I finally wrote a few lines of code that WORKED!!!!! and now my mages only have the skills they naturally get by leveling up and priests and soldiers, etc. Everything is now as it should be Screenshots: priest both.bmp This shows the unlocked class of priest having the magic skills of the unlocked mage after changing from a mage(without addon) priest.bmp This shows the same unlocked priest changed from a mage(with addon) Overview: This addon allows the user to unlearn all skills from previously held classes upon switching to a new class so skills do not bleed into every class. Download: YEA Class System: http://yanflychannel.wordpress.com/rmvxa/core-scripts/class-system/ Unlearn Skills: #---------------------------------------------------------------------------- # Unlearn Skills Addon for YEA Class System by Rbahamut #---------------------------------------------------------------------------- # v1.0 #---------------------------------------------------------------------------- # RGSS3 only #---------------------------------------------------------------------------- # I made this little addon because I was tired of changing # classes and still having other classes magic/abilities # (its no fun when a black mage has heals and a white mage # has black mage attacks). I also use NO SUBCLASSES! So # if this does not unlearn subclass abilities, i am sorry. #---------------------------------------------------------------------------- #*This addon allows you to unlearn skills on class change! #---------------------------------------------------------------------------- # It is very simply to use, paste this script above main then # just insert "skills_unlearn" above "learn_class_skills(class_id)" # located around line 581 of the YEA Class System script! #---------------------------------------------------------------------------- class Game_Actor < Game_Battler def skills_unlearn i = 1 begin forget_skill(i += 1) end while (i <= 126) #This number is the total number of SKILLS you have in the database all together, change to reflect yours! end end Installation: Step 1: Install YEA Class System and customize to your hearts desire Step 2: Copy the Unlearn Skills Addon code and paste it somewhere above main (Preferably just below YEA script) Step 3: in the YEA Class System script you will find: alias game_actor_change_class_cs change_class def change_class(class_id, keep_exp = false) @subclass_id = 0 if @subclass_id == class_id game_actor_change_class_cs(class_id, keep_exp) learn_class_skills(class_id) unlock_class(class_id) end at about line 580ish. Add skills_unlearn just above "learn_class_skills(class_id)"so it should now look like this: alias game_actor_change_class_cs change_class def change_class(class_id, keep_exp = false) @subclass_id = 0 if @subclass_id == class_id game_actor_change_class_cs(class_id, keep_exp) skills_unlearn # <==== new line learn_class_skills(class_id) unlock_class(class_id) end Then play your game! Notes: This was made to be used with YEA Class System and may not be compatible with other scripts, but if it is, GREAT! If not... shoot... Credits: Big credit goes to Yanfly for creating such an awesome script, and the rest to me for making the addon Edited April 25, 2013 by rbahamut Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 12, 2013 I also added this into YEA's website in the comments Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 16, 2013 (edited) Keepin the thread alive^ Edited April 16, 2013 by rbahamut Share this post Link to post Share on other sites
+ rbahamut 8 Posted April 25, 2013 Ok, quick lil update to the script (just pseudo-code to show how to manipulate the script more efficiently) Share this post Link to post Share on other sites
TheYungVxAce 1 Posted December 5, 2014 Hi. I think I ran into a glitch/bug. All skills from all classes disappear. This happens after I level up then try to change class. Share this post Link to post Share on other sites
+ rbahamut 8 Posted January 24, 2015 Hi. I think I ran into a glitch/bug. All skills from all classes disappear. This happens after I level up then try to change class. Sorry to hear that Yung, I have been trying to replicate this bug and have had no success. What level are you leveling up to when this bug occurred? Share this post Link to post Share on other sites