Tsukihime 1,487 Posted January 26, 2013 (edited) Learn and Replace -Tsukihime This script allows you to have a newly learned skill "replace" an old skill. For example, if you have Fire 1, Fire 2, and Fire 3, and you want to simulate skill mastery where higher levels of the skill replace lower levels, then learning Fire 2 may replace Fire 1. Download Script: Download here Usage Note-tag Learning objects with <replace: ID1 ID2 ID3 ... > Where the ID's are the ID's of skills that will be forgotten upon learning the new skill. Compatibility As reported by HellKiteChaoS, there is an issue with yanfly's Victory Aftermath where new skills aren't shown if they replace one existing skill. This is a bug in the victory script that does not do an accurate check on whether the actor learned anything new or not (instead it checks skill count, which happens to be the same if you replace an old skill) Place the following script below the Victory script (or make the appropriate changes): class Window_VictorySkills < Window_Selectable def refresh(actor, temp_actor) contents.clear # fixed. We are checking whether we learned any new skills # so we should be checking for any differences new_skills = actor.skills - temp_actor.skills if new_skills.empty? unselect @data = [] create_contents return end @data = actor.skills - temp_actor.skills if @data.size > 8 select(0) activate else unselect deactivate end create_contents draw_all_items end end Edited March 1, 2016 by Tsukihime Share this post Link to post Share on other sites
Napkiins 0 Posted January 26, 2013 Couldn't figure it out at first, I thought "Note-tag Learning objects with" meant in the Skills tab of the database. You tag the skill whilst in the Classes tab. I have to say, this is pretty nice. Share this post Link to post Share on other sites
Fated 13 Posted January 26, 2013 I was hoping a script like this would be made. Thanks. Share this post Link to post Share on other sites
estriole 326 Posted January 27, 2013 nice script. the second scripter who use 'rarely used note'. and also use it perfectly for it's purpose (first one is formar in his trait lv up) Share this post Link to post Share on other sites
AzgarthX 0 Posted January 28, 2013 thanks for the script Share this post Link to post Share on other sites
HellKiteChaoS 35 Posted January 30, 2013 Hey Tsukihime, I hate bringing up script adjustment requests, but I just really enjoy this script and would hate to have to remove other scripts. I'm really glad you took the time to make this script, this is one I've been hunting for a long time. I've even attempted doing something like this with events and it was a nightmare. My question is: I use Yanfly's Victory Aftermath script. (Here) With your script, when the character levels up, if there is a spell being replaced, it does not display that new spell. Example: Mage has Fire I learned. Mage levels up, and learns Fire II. Fire II will replace Fire I. In the aftermath screen, it does not display that the mage learned Fire II, it just simply has the new spell in the spell list. What can I do to have it display the new spell being learned or is it simply a script compatibility issue? Thanks, ChaoS Share this post Link to post Share on other sites
Tsukihime 1,487 Posted January 30, 2013 (edited) Paste this under the victory aftermath script. All I did was change how the check was done to more accurately reflect what it is actually checking. class Window_VictorySkills < Window_Selectable def refresh(actor, temp_actor) contents.clear # fixed. We are checking whether we learned any new skills # so we should be checking for any differences new_skills = actor.skills - temp_actor.skills if new_skills.empty? unselect @data = [] create_contents return end @data = actor.skills - temp_actor.skills if @data.size > 8 select(0) activate else unselect deactivate end create_contents draw_all_items end end I have not tested the scripts, but from looking at the aftermath script, I imagine this is the problem Window_VictorySkills#refresh if actor.skills.size == temp_actor.skills.size unselect @data = [] create_contents return end If you are replacing one skill, then the number of skills doesn't change, and therefore the script assumes there weren't any changes. I would say this is a bug in yanfly's script since you're supposed to check whether there are new skills, not checking whether the count has changed. I'll re-write the above function and release it as a patch and put it somewhere. Edited January 31, 2013 by Tsukihime Share this post Link to post Share on other sites
HellKiteChaoS 35 Posted February 1, 2013 Paste this under the victory aftermath script. All I did was change how the check was done to more accurately reflect what it is actually checking. class Window_VictorySkills < Window_Selectable def refresh(actor, temp_actor) contents.clear # fixed. We are checking whether we learned any new skills # so we should be checking for any differences new_skills = actor.skills - temp_actor.skills if new_skills.empty? unselect @data = [] create_contents return end @data = actor.skills - temp_actor.skills if @data.size > 8 select(0) activate else unselect deactivate end create_contents draw_all_items end end I have not tested the scripts, but from looking at the aftermath script, I imagine this is the problem Window_VictorySkills#refresh if actor.skills.size == temp_actor.skills.size unselect @data = [] create_contents return end If you are replacing one skill, then the number of skills doesn't change, and therefore the script assumes there weren't any changes. I would say this is a bug in yanfly's script since you're supposed to check whether there are new skills, not checking whether the count has changed. I'll re-write the above function and release it as a patch and put it somewhere. Works perfectly. Thanks again for taking the time to make this update. Share this post Link to post Share on other sites