Kain Nobel
Member
Actors : Append Skills
Version: 1.0
By: Kain Nobel
Introduction
This snippet was made with projects in mind that release a seperate demo for sequel chapters, which are subject to changes in a Class's skill library. In lamens terms, lets say you set it so [Hero] was supposed to learn [Skill] at [level #] in your next release, but the previous release this skill wasn't present in the Class's Skill Learnings library; there is a possibility the player has already leveled up past the point where he was supposed to learn that [skill] in the previous chapter.
The remedy; call $game_actors.append_skills from the first map in your demo, and each actor will learn skills they leveled too high to get in the next chapter!
Features
Script
FAQ
Compatibility
Should be compatible with most anything under the sun, might even work for VX.
Terms and Conditions
Free to use at your own discression, commercial or non-commercial projects. You can credit me if you'd like
Version: 1.0
By: Kain Nobel
Introduction
This snippet was made with projects in mind that release a seperate demo for sequel chapters, which are subject to changes in a Class's skill library. In lamens terms, lets say you set it so [Hero] was supposed to learn [Skill] at [level #] in your next release, but the previous release this skill wasn't present in the Class's Skill Learnings library; there is a possibility the player has already leveled up past the point where he was supposed to learn that [skill] in the previous chapter.
The remedy; call $game_actors.append_skills from the first map in your demo, and each actor will learn skills they leveled too high to get in the next chapter!
Features
- One simple call script to append skills in your next project.
Script
Code:
#===============================================================================
# ** Game_Actors
#===============================================================================
Â
class Game_Actors
 #-----------------------------------------------------------------------------
 # * Append Skills
 #-----------------------------------------------------------------------------
 def append_skills
  @data.each {|actor|
  unless actor.nil?
   actor.append_skills
  end}
 end
end
Â
#===============================================================================
# ** Game_Actor
#===============================================================================
Â
class Game_Actor < Game_Battler
 #-----------------------------------------------------------------------------
 # * Append Skills
 #-----------------------------------------------------------------------------
 def append_skills
  old_level = @level
  @level = 0
  begin
   @level += 1
   for j in $data_classes[@class_id].learnings
    if j.level == @level
     learn_skill(j.skill_id)
    end
   end
  end until @level == old_level
 end
end
FAQ
It calls all actors to level up from level 1 back up to their current level, thus triggering the skills set by class to be learned again if they haven't already been.
If thats what you want to do, just paste this little snippet along with the above script...
...and thats it!
Code:
#===============================================================================
# ** Scene_Load
#===============================================================================
Â
class Scene_Load < Scene_File
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :appendskills_scnload_readsavedata, :read_save_data
 #-----------------------------------------------------------------------------
 # * Read Save Data
 #-----------------------------------------------------------------------------
 def read_save_data(file)
  appendskills_scnload_readsavedata(file)
  $game_actors.append_skills
 end
end
...and thats it!
Compatibility
Should be compatible with most anything under the sun, might even work for VX.
Terms and Conditions
Free to use at your own discression, commercial or non-commercial projects. You can credit me if you'd like