Category Items // Using item notetags, you can display regular and key items in the Weapons and Armor tab.
Customization: None.
Screenshots:
Setup:
Customization: None.
Screenshots:
Setup:
- Paste under the Materials slot, above main.
- Open your game's database, and in your item's note section, write either <weapon> or <armor>.
- Script is allowed for commercial, non-commercial projects. Reposting isn't allowed.
Code:
#==============================================================================
#
# ** Title: ZS Category Items 1.1
#
#------------------------------------------------------------------------------
# 1.1 - Added support for notetagging armor and weapon items.
# 1.0 - Initial release.
#------------------------------------------------------------------------------
#
# Instructions:
# Type <weapon> in an item's note window for it to be shown in the Weapons tab.
# Type <armor> in an item's note window for it to be shown in the Armor tab.
#
# >> Items can only be given one notetag. You can give notetags to Key Items.
# >> Armors and Weapons will still appear in the Items menu.
#
#==============================================================================
module GhostChecker
WeaponTagRegex = /<weapon>/i
ArmorTagRegex = /<armor>/i
end
class Window_ItemList < Window_Selectable
alias ghost_include include?
def include?(item)
case @category
when :item #no tags
item.is_a?(RPG::Item) && !item.key_item? && item.note == ""
when :weapon
item.is_a?(RPG::Weapon) && item.note == "" ||
item.is_a?(RPG::Item) && item.note =~ GhostChecker::WeaponTagRegex ||
item.is_a?(RPG::Armor) && item.note =~ GhostChecker::WeaponTagRegex
when :armor
item.is_a?(RPG::Armor)&& item.note == "" ||
item.is_a?(RPG::Item) && item.note =~ GhostChecker::ArmorTagRegex ||
item.is_a?(RPG::Weapon) && item.note =~ GhostChecker::ArmorTagRegex
when :key_item #no tags
item.is_a?(RPG::Item) && item.key_item? && item.note == ""
else
false
end
end
end