Storage Boxes

SceneManager.call(Scene_ItemStorage)
# SceneManager.scene.prepare(3)

Edit: see below
Wait... I just looked at what I just copied from my scene call and figured out my own problem lmao
I forgot to remove the # from when I was making notes to myself
Oops

Now the problem is when I tried to open the Wardrobe with my armor in my inventory (which I have labeled as "clothing" allowed in the wardrobe with the Item Type add on) I get this error:
error code.jpg

The script call is:

# Box 0: Farm Workshop Drawers
0 => :all,

# Box 2: Farm Nightstand
2 => [😮nly, "Small Item"],

# Box 3: Farm Wardrobe
3 => [😮nly, "Clothing"],

And for the armor:

<item type: Clothing>

However I'm having no problem with the call for the bedside table, and when I try to open the bedside table with armor in my inventory I get the same error so I suspect the armor itself is creating the error in the script.

(Thankyou for your help by the way 😅)
And for the armor:

<item type: Clothing>
What script does this?

You may have a compatibility problem. Which means you will need to make a new thread under script support.
It's the item note box script call for the Storage Boxes Add On: Item Types for this Storage Boxes script.
I'll check if its a compatibility problem with another script (other than storage boxes), but I don't think any of my other scripts affect armor.

Spoiler: Item Type Add On Version
==============================================================================
# Storage Boxes Addon: Item Types
# by IMP1
#------------------------------------------------------------------------------
# THIS SCRIPT REQUIRES THE 'STORAGE BOXES' SCRIPT BY IMP1
#
# Now items can only be put in a box if that box allows that type of item.
# You can give a type to an item with the notetag <item type: Clothing> in the
# items notebox (replacing Clothing with whatever types you want).
# To specify that a box can handle items of a type, or can handle all types
# except a few, see below.
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Version History:
# v1.0 [2015/06/27] : Initial release.
#==============================================================================
Storage Boxes Add On: Item Types
Thanks. I put that in and do not get any error. I can only save the Clothing item type in the storage box
Can you give links to what scripts you are using and then I can tell you if they work for me.
Sure:
still works for me with all those script added in.
Maybe it is a copy paste error for the storage box script.
Quite possibly.
I've negated the error by turning KEY_ITEMS_NOT_STORABLE to false for some godunknown reason.
I'll try updating the script but at least I've found a workaround.
Thankyou 🙂
KEY_ITEMS_NOT_STORABLE to false
Didn't even realize. I had it set to false by default. So it never gave me an error.
I fixed it (I think). change the code to this
Code:
  def enable?(item)
    return !(item.note.include?("<not storable>") ||
      IMP1_Storage_Boxes::KEY_ITEMS_NOT_STORABLE && item.is_a?(RPG::Item) && item.key_item?)
  end
That seems to be working, thanks!
I'll tell you if there's any issues 🙂
@Roninator2: Thanks a lot for the help! This looks like a bug (and fix) only relating to the base script, right?
relating to the base script
That is where the code is. I didn't change the addons.
is there any way to know how many objects has a chest by script?
@remainderstudios:

It depends what you mean. It you want to know how full a box is, you can use the following script call:

Ruby:
$game_boxes.fullness(YOUR_BOX_ID)

If you'd like to know how many different items there are in a box, there isn't currently an immediate way to do that, but it would be a very minor addition.
@remainderstudios:

It depends what you mean. It you want to know how full a box is, you can use the following script call:

Ruby:
$game_boxes.fullness(YOUR_BOX_ID)

If you'd like to know how many different items there are in a box, there isn't currently an immediate way to do that, but it would be a very minor addition.

it doesn't work for me. I put a conditional and it always show the same "box full", even when the box has items inside

I need (a conditional) to know if a box is empty, if it is, I allow the player to delete it and add it to the inventory.

(sorry for my english)

a.jpg
Puedes usar este 'Script' en tu separación condicional.

Code:
$game_boxes.empty?(0)

Yo recommendo 'empty?', pero este deberia funcionar también:

Code:
$game_boxes.fullness(0) == 0

(Disculpe para mí español)

(No se como explicar esta parte siguente en español)

The reason what you have doesn't work, is because you're checking to see if the result of fullness is true.
In Ruby, everything is true except for 'false', and 'nil'. This includes 0.

But if you check to see if the fullness is 0, then it should give you the result you want.
Puedes usar este 'Script' en tu separación condicional.

Code:
$game_boxes.empty?(0)

Yo recommendo 'empty?', pero este deberia funcionar también:

Code:
$game_boxes.fullness(0) == 0

(Disculpe para mí español)

(No se como explicar esta parte siguente en español)

The reason what you have doesn't work, is because you're checking to see if the result of fullness is true.
In Ruby, everything is true except for 'false', and 'nil'. This includes 0.

But if you check to see if the fullness is 0, then it should give you the result you want.

thanks for everything, it worked for me!
help, i'm trying to put a locker that can be stolen in my game but i can't.

Which exact script call should I put in the closet so that the countdown appears and objects can be stolen?

I don't understand how "Item Thefts" script works.

this is my script in a box:

Spoiler: script
box_id = 0
name= "box"
size= 20
$ game_boxes.setup (box_id, name, size)
open_sound = {
name: "chest",
volume: 80,
pitch: 100,
}
close_sound =
{
name: "chest",
volume: 80,
pitch: 60,
}

SceneManager.call (Scene_ItemStorage)
SceneManager.scene.prepare (0)
The Item Thefts add-on allows for items to be "taken" (actually just removed) from boxes while the player is not interacting with them, to simulate the danger of leaving containers alone and add a bit of risk associated with certain containers, with the option to have some containers more secure than others.

I'm not what you want it to do. Not sure what countdown you're talking about. Sounds cool though,
Updated the main script to version 1.10.
Now you can also Give All (or N) as well as Take All (or N).

Thanks to remainderstudios for working asking for it, and testing while I cobbled it together.

I don't really add much to this script anymore, but I will do bugfixes.

Original thread: https://forums.rpgmakerweb.com/threads/storage-boxes.27727/