Go to Game_Actor in the Script Editor
Find this in the beginning -
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
def setup(actor_id)
actor = $data_actors[actor_id]
@actor_id = actor_id
@name = actor.name
@character_name = actor.character_name
@character_index = actor.character_index
@face_name = actor.face_name
@face_index = actor.face_index
@class_id = actor.class_id
@weapon_id = actor.weapon_id
@armor1_id = actor.armor1_id
@armor2_id = actor.armor2_id
@armor3_id = actor.armor3_id
@armor4_id = actor.armor4_id
And add this after it
#---------------------------------------------------------------------------
# * Equip Requisites (Tsunokiette | June 15, 2008)
# ~~~~~~~~~~~~~~~~~~~
# Example : [[3,1,4,5]]
# Explanation : '3' is the ID of the item you wish to equip
# '1' is the TYPE of the item you wish to equip
# '4' is the ID(s) of the item(s) required to equip the item
# - or the level the actor must be to equip
# '5' is the TYPE(s) of the item(s) required to equip the item
# - or indicates that a level is required
# TYPE : 1 = Weapon
# 2 = Armor 1 (Shield)
# 3 = Armor 2 (Helmet)
# 4 = Armor 3 (Body Armor)
# 5 = Armor 4 (Accessory)
# 6 = level
# ~~~~~~~~~~~~~~~~~~~
# To make multiple requisites, simply separate with a comma :
# [[3,1,4,5],[4,1,5,2],[1,2,3,4]] ... et cetera
# To make an item have multiple requisites, simply change the last two
# numbers into arrays with everything separated by a comma :
# [[3,1,[2,3,4,5],[1,2,3,4]]]
# You can make an item require an item AND a level by using the same method
# as stated above:
# [[3,1,[2,3,6],[1,2,57]]]
#---------------------------------------------------------------------------
@equip_requirements = []
#---------------------------------------------------------------------------
# End of Equip Requisites
#---------------------------------------------------------------------------
And find this
#--------------------------------------------------------------------------
# * Change Equipment (designate object)
# equip_type : Equip region (0..4)
# item : Weapon or armor (nil is used to unequip)
# test : Test flag (for battle test or temporary equipment)
#--------------------------------------------------------------------------
def change_equip(equip_type, item, test = false)
last_item = equips[equip_type]
unless test
return if $game_party.item_number(item) == 0 if item != nil
$game_party.gain_item(last_item, 1)
$game_party.lose_item(item, 1)
end
item_id = item == nil ? 0 : item.id
case equip_type
when 0 # Weapon
@weapon_id = item_id
unless two_hands_legal? # If two hands is not allowed
change_equip(1, nil, test) # Unequip from other hand
end
when 1 # Shield
@armor1_id = item_id
unless two_hands_legal? # If two hands is not allowed
change_equip(0, nil, test) # Unequip from other hand
end
when 2 # Head
@armor2_id = item_id
when 3 # Body
@armor3_id = item_id
when 4 # Accessory
@armor4_id = item_id
end
end
And replace it with this:
#--------------------------------------------------------------------------
# * Change Equipment (designate object)
# equip_type : Equip region (0..4)
# item : Weapon or armor (nil is used to unequip)
# test : Test flag (for battle test or temporary equipment)
#--------------------------------------------------------------------------
def change_equip(equip_type, item, test = false)
last_item = equips[equip_type]
#---------------------------------------------------------------------------
# * Don't allow equip if requirement is not met
#---------------------------------------------------------------------------
@equip_requirements.each do |requisite1|
if requisite1[0] == item.id
if requisite1[2].is_a?(Array)
for i in 0...requisite1[2].size
case requisite1[3][i]
when 1
return change_equip(equip_type,last_item,test) if @weapon_id != requisite1[2][i]
when 2
return change_equip(equip_type,last_item,test) if @armor1_id != requisite1[2][i]
when 3
return change_equip(equip_type,last_item,test) if @armor2_id != requisite1[2][i]
when 4
return change_equip(equip_type,last_item,test) if @armor3_id != requisite1[2][i]
when 5
return change_equip(equip_type,last_item,test) if @armor4_id != requisite1[2][i]
when 6
return change_equip(equip_type,last_item,test) if @level < requisite1[2][i]
end
end
else
case requisite1[3]
when 1
return change_equip(equip_type,last_item,test) if @weapon_id != requisite1[2]
when 2
return change_equip(equip_type,last_item,test) if @armor1_id != requisite1[2]
when 3
return change_equip(equip_type,last_item,test) if @armor2_id != requisite1[2]
when 4
return change_equip(equip_type,last_item,test) if @armor3_id != requisite1[2]
when 5
return change_equip(equip_type,last_item,test) if @armor4_id != requisite1[2]
when 6
return change_equip(equip_type,last_item,test) if @level < requisite[2]
end
end
end
end
#---------------------------------------------------------------------------
# End Equip Requisites (Equip Legal? Function)
#---------------------------------------------------------------------------
unless test
return if $game_party.item_number(item) == 0 if item != nil
$game_party.gain_item(last_item, 1)
$game_party.lose_item(item, 1)
end
item_id = item == nil ? 0 : item.id
case equip_type
when 0 # Weapon
@weapon_id = item_id
unless two_hands_legal? # If two hands is not allowed
change_equip(1, nil, test) # Unequip from other hand
end
when 1 # Shield
@armor1_id = item_id
unless two_hands_legal? # If two hands is not allowed
change_equip(0, nil, test) # Unequip from other hand
end
when 2 # Head
@armor2_id = item_id
when 3 # Body
@armor3_id = item_id
when 4 # Accessory
@armor4_id = item_id
end
#---------------------------------------------------------------------------
# * If an item is unequiped, unequip any items that required it
#---------------------------------------------------------------------------
@equip_requirements.each do |requisite2|
if requisite2[2].is_a?(Array)
for i in 0...requisite2[2].size
if requisite2[2][i] == last_item.id
case requisite2[1]
when 1
change_equip(0,nil,test) if @weapon_id == requisite2[0] and last_item.id != item_id
when 2
change_equip(1,nil,test) if @armor1_id == requisite2[0] and last_item.id != item_id
when 3
change_equip(2,nil,test) if @armor2_id == requisite2[0] and last_item.id != item_id
when 4
change_equip(3,nil,test) if @armor3_id == requisite2[0] and last_item.id != item_id
when 5
change_equip(4,nil,test) if @armor4_id == requisite2[0] and last_item.id != item_id
when 6
p "How the heck did you equip this if your level was too low?" if @level < requisite2[2][i]
end
end
end
else
if requisite2[2] == last_item.id
case requisite2[1]
when 1
change_equip(0,nil,test) if @weapon_id == requisite2[0] and last_item.id != item_id
when 2
change_equip(1,nil,test) if @armor1_id == requisite2[0] and last_item.id != item_id
when 3
change_equip(2,nil,test) if @armor2_id == requisite2[0] and last_item.id != item_id
when 4
change_equip(3,nil,test) if @armor3_id == requisite2[0] and last_item.id != item_id
when 5
change_equip(4,nil,test) if @armor4_id == requisite2[0] and last_item.id != item_id
when 6
p "How the heck did you equip this if your level was too low?" if @level < requisite2[2]
end
end
end
end
#---------------------------------------------------------------------------
# End Equip Requisites (Unquip Function)
#---------------------------------------------------------------------------
end