Just finished this for ya.
Just read the instructions and you should do great!
By the way, I have not added a function to where one item requires multiple items. If you need that just ask
.
I also added a demo for ya.
To get the items talk to the guy on the far left (the one that says "club").
In the demo the shuriken requires the ninja gloves to be equipped. The mithril shield (i think) requires the shuriken to be equipped, and the iron helm (I think) requires the ninja gloves as well. You also get a circa, etc. (was to help test bugs).
The other guy just tests the line needed to unequip something, and the fairy... I don't remember what the fairy was for... she just counts lol.
Spoiler for Weapon Requisites :
#--------------------------------------------------------------------------- # * If an item is unequiped, unequip any items that required it #--------------------------------------------------------------------------- @equip_requirements.each do |requisite2| 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 end end end #--------------------------------------------------------------------------- # End Equip Requisites (Unquip Function) #---------------------------------------------------------------------------
Just replace Game_Actor with the code.
Also, if you're wondering why there's a method kind of randomly placed in the script list named bible... well... bible was just easier to remember as it was the first word that came to mind lol.
Last but not least, if you have any questions feel free to ask
EDIT : Also, for some weird reason, if you have two requirement items. Let's say, two ninja gloves. Even if you switch to the other set of ninja gloves, any items requiring the ninja gloves will be unequipped. I'm not entirely sure how to fix that, being new to the RGSS2 and all.
EDIT 2: Disregard that last edit. I fixed the problem (feels stupid). I was originally making it only unequip if the required item was unequipped and the slot contained the item that required the equip (if that makes sense). I forgot to make it make sure the new item wasn't the same as the last one, and if it was, to not unequip (if that makes sense) *updates demo*
EDIT 3: Not sure why the rest of the code is cut out... Just download the demo and copy the Game_Actor code from there.