Currently, any boxes can be stolen from. And ones that the player comes across later in the game will have had more time to be stolen from. Maybe I could have a command to set a box as unstealable (and stealable again)? Or you could only add items to those boxes late in the game as well.
1: Would you want a new button for this? Which one?
2: Will fix this tomorrow. Thanks 🙂
Well, it's just my feeling that boxes should not be stealable until the player has interacted with them and had the chance to get the items out of it first. The way it is coded now, there are some games, statistically speaking, that will have no items in them for a player to get from boxes, on the sheer probability of having them all stolen from.
1. That's a tough one, I was thinking about that. Maybe this would work. When you click an item that has more than 5 amount in a box, you get prompted
"Take One"
"Take All"
That way, if someone wants just one or two or three, etc, they can just keep spamming the button until they get the amount they want. And if someone wants all, they just need to press one additional button. No new buttons needed!
Also, can you edit the Item Size addon to make it so items designated as "<inv size: 0>" actually take up 1 space in the box? This is just a luxury, I was wondering, if its easy, like takes 5 seconds, let me know. I might try to edit it myself anyways.
Hi, I've been looking for a good chest/storage system - Theo's is broken (doesn't save and restore properly), and Bravo2Kilo's doesn't have a way to view all items in one list. And neither author has responded to my requests for help.
I found your script today, and it looks like it could fit the bill. But I've got a question about it.
Looking at the script, it looks like each instance of a box is set up ahead of time inside the script itself. Or are those just templates in the BOXES array for different types of boxes? If the box instances are set up ahead of time in the script, then is that going to be a problem for a large game world? I'm creating a fairly large game world, and setting up 1000+ chests inside the script could be burdensome. I'm not even sure if RPG Maker will allow a script that long. I'd hate to get half my game world built, and run into some kind of limitation on the script length.
If script length could be a problem, could the box IDs be setup a different way? I kinda like how Theo's script automatically generates a unique box ID from the event id and map id where it is invoked. If your script were to do something similar, then script call to open the box could take the box name and the open/close sound names in the prepare() call. Alternatively, if I were to pass in box ID 4 (which exceeds the BOXES array), if it could add a box with ID=4 on-the-fly (using default settings), instead of not doing anything, then that would work for me too.
Can you please add prefixes? Then you can for example store food items only in fridge-boxes.
@GolfHacker: Good ideas. I'll see what I can do with adding the option of setting up boxes in the script call.
@Fizzly: I'm not sure what you mean by 'prefixes', but I like the idea of limiting which items can go in which types of boxes. The way of doing this that immediately springs to mind is giving boxes a list of tags, and adding notes to the items to say which boxes they can be stored in (items with no such note will be storable in any). That sound okay?
THIS SCRIPT IS AWESOME!
Seriously, I tried many similar scripts and they kept throwing errors on my face.
Your script works FINE (at least for now =P ) and it's so simple, yet powerful.
Can I suggest something?
I would like to have "arrange" option. Because when I put items, weapons and some other stuff there is a mess in that box.
A simple option that works like "formation" (party) in menu. Choose one item, then replace it with second item would be great.
For example it could be like:
When in box - pressing "Z" simply takes items as it is now and pressing for example "A" or something would replace thingies.
Anyway, it's a really good script!
Hello, i would like to know how can i manually remove items from the box?
For an example, a chest is broken, then once i call the same id, the items won't be there anymore.
Is there a script call for that?
Thanks.
It's not necessary, just change the script box that the event loads into a different one with a conditional branch or a switch.
You can remove items with:
$game_boxes.remove_item(item, amount, box_id, false)Leave the last argument on 'false'.
The 'item' is $data_items[iD], $data_weapons[iD], etc. Just like in the add_item call.
The rest should be obvious.
But simply making a dummy storage for these cases and using that as an empty storage once the chest is broken is much more simple, as Dymdez already wrote.
This script looks pretty useful, but is it possible to move the entire inventory into a box with one command?
Curious to know with some testing, how do I make an event handle an individual inventory?
For example I have two boxes in a room, if I deposit inventory in one box, they both share the same contents.
Tried reading through the script on how to handle it but I'm not sure what I am doing wrong.