RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VXA][Resolved]Item Categories

Started by DoctorTodd, June 16, 2012, 10:35:28 PM

0 Members and 1 Guest are viewing this topic.

DoctorTodd

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?

DoctorTodd


DoctorTodd


DoctorTodd

BUMP
Can some one please help me? I've tried a few different things and nothing has worked.

Wiimeiser

You'll probably have to download an item categorization script or something, or make one yourself.

DoctorTodd

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.

DoctorTodd


DoctorTodd

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

Chaos17

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

cozziekuns

#9
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.

DoctorTodd

#10
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?

cozziekuns


when :armor
    (item.is_a?(Game_CustomEquip) && item.object.is_a?(RPG::Armor)) && !(item.is_a?(RPG::Armor) && item.is_rune?)

DoctorTodd

Nope it still appeared under armor.

cozziekuns

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.

DoctorTodd

Thanks cozziekuns, it works fine now.