Basically, this is the script:
#==============================================================================
# ** Data Item Teacher
#==============================================================================
class Data_Additional_Item_Effects
#--------------------------------------------------------------------------
# * Public Instance Variable
#--------------------------------------------------------------------------
attr_reader :skill_teacher_effects
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
#----------------------------------------------------------------------
# * Editable Region
#----------------------------------------------------------------------
# For each item that you desire to teach a skill, merely place it in the
# array like this:
# [item_id, skill_id]
# where item_id is the ID of the item in the database which teaches
# the skill, and skill_id is the ID of the skill it teaches. By default,
# The 1st Item in the database (by default Potion) teaches the 5th skill
# in the database (by default Greater Remedy) and the 4th Item in the
# database (by default a Perfume) teaches the 2nd Skill in the database
# (by default, Greater Heal)
#----------------------------------------------------------------------
@skill_teacher_effects = [[1, 5], [4, 2]]
#----------------------------------------------------------------------
# * END Editable Region
#----------------------------------------------------------------------
end
end
#==============================================================================
# ** Game_Actor (Skill Teacher Modification)
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor
#--------------------------------------------------------------------------
# * Item Effect
#--------------------------------------------------------------------------
# Aliases Item Effect to add in the special effect
#--------------------------------------------------------------------------
def item_effect (item)
# If item is a skill teacher effect
for i in $data_additional_item_effects.skill_teacher_effects
item_id, skill_id = i
if item_id == item.id
# Teach the skill to the actor
learn_skill (skill_id)
# Turn Used ON
used = true
end
end
# Run super method
used |= super (item)
return used
end
end
#==============================================================================
# ** Scene_Title (Skill Teaching Item Modification
#------------------------------------------------------------------------------
# This class performs title screen processing.
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
# Aliases to intialize Data_Additional_Item_Effects
#--------------------------------------------------------------------------
alias add_new_data_item_effect main
def main
$data_additional_item_effects = Data_Additional_Item_Effects.new
add_new_data_item_effect
end
end
And as you can see, there are instructions here:
#----------------------------------------------------------------------
# * Editable Region
#----------------------------------------------------------------------
# For each item that you desire to teach a skill, merely place it in the
# array like this:
# [item_id, skill_id]
# where item_id is the ID of the item in the database which teaches
# the skill, and skill_id is the ID of the skill it teaches. By default,
# The 1st Item in the database (by default Potion) teaches the 5th skill
# in the database (by default Greater Remedy) and the 4th Item in the
# database (by default a Perfume) teaches the 2nd Skill in the database
# (by default, Greater Heal)
#----------------------------------------------------------------------
@skill_teacher_effects = [[1, 5], [4, 2]]
#----------------------------------------------------------------------
# * END Editable Region
#----------------------------------------------------------------------
To sum it up, all you have to do is be able to use it is to modify this line:
@skill_teacher_effects = [[1, 5], [4, 2]]
Basically, [1, 5] means that Item 1 will teach skill 5 and [4, 2] means that Item 4 will teach skill 2. The numbers represent the Database IDs of the items and skills, respectively. If you go into the Database (the main editing tool, where you set everything up) and go to the Items and Skills Tabs, you will see that each item or skill has a number next to it. That is the ID of the item or skill. So, in the default, Item 1 is a Potion and Skill 5 is Greater Remedy, meaning that if you use Potion, the actor who you use it on will learn Greater Remedy. Item 4 is a perfume and Skill 2 is Greater Heal, and so using a Perfume on an actor will teach them Greater Heal.
If we wanted to add new items. Say, we make a Scroll as Item 33, and we want it to teach Skill 1: Heal, and that is the only item that should teach a skill, our array would look like this:
@skill_teacher_effects = [[33, 1]]
And then if we wanted to make another scroll as Item 34 and have it teach Skill 2: Greater Heal, our array would look like this:
@skill_teacher_effects = [[33, 1], [34, 2]]
And you can continue adding items to the array just like that