[Ace]Item list modification
Started by Todd, Jun 29 2012 12:15 AM
12 replies to this topic
#1
Posted 29 June 2012 - 12:15 AM
I'm trying to include an armor type under the item category and prevent the armor type from appearing under the armor category. I've tried a few different things, does any one know a way to do this?
#4
Posted 03 July 2012 - 08:54 PM
I'll try that thanks.
Can I see how you would do it? I can't get it to work.
Can I see how you would do it? I can't get it to work.
Edited by Todd, 03 July 2012 - 10:08 PM.
#5
Posted 03 July 2012 - 10:13 PM
class Window_ItemList < Window_Selectable
def include?(item)
case @category
#~ when :item
#~ item.is_a?(RPG::Item) && !item.key_item?
#~ when :weapon
#~ item.is_a?(RPG::Weapon)
#~ when :armor
#~ item.is_a?(RPG::Armor)
when :key_item
item.is_a?(RPG::Item) && item.key_item?
else
#~ false
true
end
end
end
You might as well just remove the armor/weapon commands since you're not going to be using them.
Edited by Tsukihime, 03 July 2012 - 10:14 PM.
#6
Posted 03 July 2012 - 10:30 PM
I think you may be confused about what I'm trying to do. I'm just trying to make a certain type of armor appear under items and not under armor. I still need armor and weapons.This is what I tried.
#-------------------------------------------------------------------------- # * Include in Item List? #-------------------------------------------------------------------------- def include?(item) case @category when :item item.is_a?(RPG::Item) && item.is_a?(RPG::Armor.type_id(7)) when :weapon item.is_a?(RPG::Weapon) when :armor item.is_a?(RPG::Armor)&& !item.is_a?(RPG::Armor.type_id(7)) end end
#8
Posted 03 July 2012 - 10:50 PM
Unfortunately that didn't work.
#10
Posted 03 July 2012 - 11:41 PM
I'm sure, this is what I did.
#-------------------------------------------------------------------------- # * Include in Item List? #-------------------------------------------------------------------------- def include?(item) case @category when :item item.is_a?(RPG::Item) || item.is_a?(RPG::Armor) && item.atype_id == 7 when :weapon item.is_a?(RPG::Weapon) when :armor item.is_a?(RPG::Armor) || !item.is_a?(RPG::Armor) && item.atype_id == 7 end end
#13
Posted 07 July 2012 - 10:19 PM
I have a solution, may a Mod please close this?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users

This topic is locked










