I'm using Kread-Ex's rune enchantment script and I face a problem where the runes appear in the armor category rather than the item category (since they have to be made in the armor category). I looked at Window_ItemList and tried to make them only appear in the item category and it didn't work. Is there a way to do this?
BUMP
BUMP
BUMP
Can some one please help me? I've tried a few different things and nothing has worked.
You'll probably have to download an item categorization script or something, or make one yourself.
It should only take a line of code but I can't figure out what it is. I tried RPG::Armor.atyped_id(7) but that didn't work.
BUMP
BUMP
Some one tried to help me on the RPG Maker web forums with this, but it didn't work.
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
Hi,
You find a script that have items categories for shops, mayne it could help you figure out something:
http://www4.plala.or.jp/findias/codecrush/material/vxace_rgss3/index.html
The little snippet the RPG Maker Web person wrote for you has the right concept but the wrong logic.
#==============================================================================
# ** Window_ItemList
#==============================================================================
class Window_ItemList
def include?(item)
case @category
when :item
item.is_a?(RPG::Item) && !item.key_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.atype_id != 7
when :key_item
item.is_a?(RPG::Item) && item.key_item?
else
false
end
end
end
The above code should work. Not sure if that's what you wanted, though. And it's not the best workaround, either.
I got an error when trying to use it because of another script that is a patch for Individual equipment and the Runic enchantment script. The Rune is in there because it is both an armor and labeled as Rune. The line looks like this.
when :armor
(item.is_a?(Game_CustomEquip) && item.object.is_a?(RPG::Armor)) ||
(item.is_a?(RPG::Armor) && item.is_rune?)
Even if you remove the bottom line it'll still display under armor. I did manage to get it under items though.
when :item
item.is_a?(Game_CustomEquip) || (item.is_a?(RPG::Item) && item.is_rune?)
Is there anything I can do so the Runes are just under items?
when :armor
(item.is_a?(Game_CustomEquip) && item.object.is_a?(RPG::Armor)) && !(item.is_a?(RPG::Armor) && item.is_rune?)
Nope it still appeared under armor.
Oh sorry didn't notice the custom equip script that you're using.
This should work then:
when :armor
(item.is_a?(Game_CustomEquip) && item.object.is_a?(RPG::Armor)) && !(item.object.is_a?(RPG::Armor) && item.is_rune?)
Otherwise, you should list all the scripts you're using and such.
Thanks cozziekuns, it works fine now.