Main Menu
  • Welcome to The RPG Maker Resource Kit.

Error with grid inventory

Started by fredcowgill, April 22, 2010, 10:38:21 AM

0 Members and 1 Guest are viewing this topic.

fredcowgill

There seems to be a problem with the script. That is modern algebra's Grid Inventory 1.0b. And that is with certain items, it crashes the game when you choose the option, "Description." See the attached image for information. What it looks like, although I don't really have a clue, is that when a class cannot use a weapon it has in its inventory, the description is somehow tied to the equipability of that item. If that makes sense?

fredcowgill

Another problem, not necessarily an error, seems to be compatibility between modern algebra's Grid Inventory and Item Drop Ranks. I finally figured out how to add items directly into my container within my inventory, but it seems that when I set it to add a dummy item for the drop, it plants the dummy item itself. And yes I'm sure I set the dummy and drops right, because I tried that separately and it worked fine.

modern algebra

#2
Did you try putting Item Drop Ranks below Grid Inventory in the Script Editor like I told you? I tested it out and it worked.

As for the other one, it looks like it will occur whenever you have a weapon or armor that isn't equippable by any class. It's kind of weird to have weapons or armors that are unequippable by all classes, but whatever. Putting this patch in its own slot below the Grid Inventory should fix it.


class Window_ItemInfo
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # * Draw Item Equippable Classes
 #    item : the item to draw equippable classes of
 #    x, y : coordinates to draw
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 def draw_item_equippable_classes (item, x, y)
   eq_classes = item.equippable_classes
   # Convert class names into 4 letter abbreviations
   class_names = []
   eq_classes.each { |i|
     name = $data_classes[i].name.dup
     if name.size > 4
       name.gsub! (/[aeiou]/) { "#{$1}#{$2}" }
       if name.include? (" ")
         nm2 = name.split (" ")
         nm2.delete ("")
         if nm2.size > 1 && nm2[0].size >= 2 && nm2[-1].size >= 2
           name = nm2[0][0, 1] + nm2[0][-1, 1] + nm2[-1][0, 1] + nm2[-1][-1, 1]
         end
       end
       name.gsub! (/ /) { "" }
       if name.size > 4
         name = name[0, 2] + name[-2, 2]
       end
     end
     name.upcase!
     class_names.push (name + ';')
   }
   return if class_names.empty?
   # Draw Signifying Text
   tw = contents.text_size (Vocab::GI_CLASS_EQUIP).width + 4
   contents.font.color = system_color
   contents.draw_text (x, y, tw, WLH, Vocab::GI_CLASS_EQUIP)
   class_names[-1].slice! (-1, 1)
   x = tw + 8
   contents.font.color = normal_color
   class_names.each { |name|
     # Write each of the class names.
     tw = contents.text_size (name).width
     if x + tw > 200
       x = 12
       y += WLH
     end
     contents.draw_text (x, y, tw, WLH, name)
     x += tw + 6
   }
 end
end

fredcowgill

Yes, but the item drop rank already was below the grid inventory in the scripts.

modern algebra

But still above Main?

I just tested it and it worked. What did you put in the notebox of the dummy item?

fredcowgill

I'm sorry. I must have just messed up the script somewhere. Some small error to throw the whole thing off. I re-did it and it works fine. Thanks.