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?
[Ace]Item list modification
RGSSx Script SupportBUMP
Just disable item filtering in the include? method.
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.
Code:
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
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.
Code:
#--------------------------------------------------------------------------
# * 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
Code:
item.is_a?(RPG::Item) || (item.is_a?(RPG::Armor) && item.atype_id == 7)
Unfortunately that didn't work.
You're probably not doing something right then. I included armor type 1 and get cloth armors as expected.
Are you sure the armor type is 7?
Are you sure the armor type is 7?
I'm sure, this is what I did.
Code:
#--------------------------------------------------------------------------
# * 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
I don't see why armor type 7 wouldn't show up under the item list then.
Well thanks for trying.
I have a solution, may a Mod please close this?
Original thread: https://forums.rpgmakerweb.com/threads/ace-item-list-modification.2870/