I'm not familiar with this script, but did you simply copy and paste it into your script tab? If so, I think it is telling you "nil" because there aren't any chests configured?:
#========================================================================== # Config Chest Items # Use this # when chest_id then return [[id, amount, type], [id, amount, type]] # id = item, weapon, or armor id # amount = the amount # type = 0, 1, or 2 0 = item, 1 = weapon, 2 = armor # Example: # when 1 then return [[1, 3, 0], [1, 1, 1]] # This has 3 potions, and 1 bronze sword. So when this is called # $scene = Scene_Chest.new(1) # it will have those items in the chest already. #========================================================================== when 1 then return [] end return []Have you setup a chest as specified?
I predefined a chest:
#========================================================================== # Config Chest Items # Use this # when chest_id then return [[id, amount, type], [id, amount, type]] # id = item, weapon, or armor id # amount = the amount # type = 0, 1, or 2 0 = item, 1 = weapon, 2 = armor # Example: # when 1 then return [[1, 3, 0], [1, 1, 1]] # This has 3 potions, and 1 bronze sword. So when this is called # $scene = Scene_Chest.new(1) # it will have those items in the chest already. #========================================================================== when 1 then return [[1, 3, 0], [1, 1, 1]] end return []and I called it exactly how it says, by using $scene = Scene_Chest.new(1) (for chest #1). Same error. Also, that section is to have items in the chest already, which I don't want. I'm really lost 🙁
I have removed the script from your post. When you are using a script you downloaded and you need help with it, please JUST post a link - don't add the whole script to your post.
I would almost wager you had a saved game, added the script, then loaded your saved game. You need to start a new game after adding this script (and many others).
I don't have my laptop with me.
You ARE making an RMXP project? Does armor have elements? Or does that require another script?
Can you give the COMPLETE error message (there should be a script name and line number)
Yes, element_set is the list of checkboxes for elements - or not checkboxes, but the boxes where you select A-F for strength. I think (don't have laptop again) if there is a list of elements for armor, it's the elements you're protected against when you have that armor on.
That does seem a bit weird, unless you have other scripts that redefine the classes and don't include that variable.
Are you able to zip up your project folder and load it up somewhere so someone can take a look?
Hi,
The script checks an items element set to check if the item should be treated as a key item. In RMXP, the method uses to access this set is called element_set for items and weapons, and guard_element_set for armors. The script considers that difference most of the time, except in line 516 where element_set is called regardless of the item type.
This line is executed when you try to move an item from the partys inventory into a chest.
You could fix that by...
1) ...either define element_set for armors (what I'd personally recommend):
class RPG::Armor def element_set guard_element_set endend2) ...or change the said line from
if @item.element_set.include?(GameGuy::KeyItemId)
to
if (@item.is_a?(RPG::Armor) ? @item.guard_element_set : @item.element_set).include?(GameGuy::KeyItemId)