First of all, thanks for such a good plugin and forgive me for my English, I wanted to ask you if there is another possibility to change that related to "categories" by means of compatibility with any plugin other than the one provided by YEP, since the price of that plugin It is high for me and I consider it excessive, because I would only want that plugin and not the whole pack, thanks.
waynee95's Storage System
JS Plugin Releases (RMMV)Hey there,
This plugin is exactly what I was looking for! I've been using it for a while and love it, but I was wondering something.
I know you're really busy, but is there a way I could edit the plugin on my end to simply skip the final window where it asks how many of an item you would like to withdraw/deposit? In my game I'm using it as a closet and the player will only have one of each item so it's just an extra step.
If not that's totally OK!
Thanks. 😀
This plugin is exactly what I was looking for! I've been using it for a while and love it, but I was wondering something.
I know you're really busy, but is there a way I could edit the plugin on my end to simply skip the final window where it asks how many of an item you would like to withdraw/deposit? In my game I'm using it as a closet and the player will only have one of each item so it's just an extra step.
If not that's totally OK!
Thanks. 😀
how did you solve this? what do you mean by 2 scripts?
I tried to put this all in one script call but its too much to fit into one script call
@waynee95
Tried to squeeze it in there like this by placing al the variables on one line to fit everything else, still no luck. IDK how this is supposed to fit into one script call. Help please?
var srcId = 0; // source storage Id var destId = 1; // target storage Id var storage0 = $gameStorageSystems.storage(srcId); var storage1 = $gameStorageSystems.storage(destId); var allItems = storage0.allItems();
for (var i = 0; i < allItems.length; i++) {
var currentItem = allItems;
if (storage1.capacity() < storage1.maxCapacity()) {
var restCapacity = Math.min(
storage1.maxCapacity() - storage1.capacity(),
storage0.numItems(currentItem)
);
storage1.addItem(currentItem, restCapacity);
storage0.removeItem(currentItem, restCapacity);
}
}
Tried to squeeze it in there like this by placing al the variables on one line to fit everything else, still no luck. IDK how this is supposed to fit into one script call. Help please?
var srcId = 0; // source storage Id var destId = 1; // target storage Id var storage0 = $gameStorageSystems.storage(srcId); var storage1 = $gameStorageSystems.storage(destId); var allItems = storage0.allItems();
for (var i = 0; i < allItems.length; i++) {
var currentItem = allItems;
if (storage1.capacity() < storage1.maxCapacity()) {
var restCapacity = Math.min(
storage1.maxCapacity() - storage1.capacity(),
storage0.numItems(currentItem)
);
storage1.addItem(currentItem, restCapacity);
storage0.removeItem(currentItem, restCapacity);
}
}
from what ive seen that shouldnt be to hard given what is already available. I'd say set up a storage that is remove only. Have an event call a common event that you call "box" or whatever.
Right before it opens it (the storage) have it set a variable at random from 1-x however many you feel like making loot for. and from there have it add random loot with the built in method to add to the storage.
If you want to get extra fancy create multiple variables for more randomness.
Javascript isnt my strong suit but you may be able to throw an i++ in there somewhere to sort an array of the items to add at random based on the variables.
Bump
Hey, bit of an odd question. A while back, I had asked for help setting up a couple commands for swapping the main inventory used in the overworld, for a "Battle Bag" inventory, using a script call right before battle. That's all still working, but I somehow just now noticed one little issue, the battle drops get added to the Battle Bag inventory before I can run the script call to swap inventories.
Is there a small edit I can make to the plugin to force all battle drops to end up in a pre-determined inventory (In my case, I'd send them to the currently unused inventory ID 2, and just merge that back into the main inventory after battle.)
Is there a small edit I can make to the plugin to force all battle drops to end up in a pre-determined inventory (In my case, I'd send them to the currently unused inventory ID 2, and just merge that back into the main inventory after battle.)
@Myers & Sparks
Sorry for the late reply been really busy lately.
1.) I always hated that the script call box is way too small. So I cannot really change that fact. But it's only really limited in the number rows. So if something does not fit, move multiple lines of code into one line (so code flows to the right instead of to the bottom). It's not pretty but it works.
2.) As for you issue with the code not working. That's because the code is not correct. There's something missing in the line
because it has to be like this
So the script call should look like this and I also tested it. It works as expected on my end and it also fits inside the scriptcall box.
@Vis_Mage
Hmm... I would probably need a bit more information to help you. But one thing you could do is overriding the function that adds the battle drops to the party.
Take a look at the rpg_managers file, there you can find a function called gainDropItems. You could copy-paste that function into a new .js file in your /js/plugins directory and import it as a plugin and change it accordingly.
Sorry for the late reply been really busy lately.
1.) I always hated that the script call box is way too small. So I cannot really change that fact. But it's only really limited in the number rows. So if something does not fit, move multiple lines of code into one line (so code flows to the right instead of to the bottom). It's not pretty but it works.
2.) As for you issue with the code not working. That's because the code is not correct. There's something missing in the line
Code:
var currentItem = allItems;
Code:
var currentItem = allItems[i];
So the script call should look like this and I also tested it. It works as expected on my end and it also fits inside the scriptcall box.
Code:
var srcId = 0; var destId = 1;
var storage0 = $gameStorageSystems.storage(srcId);
var storage1 = $gameStorageSystems.storage(destId);
var allItems = storage0.allItems();
for (var i = 0; i < allItems.length; i++) { var currentItem = allItems[i];
if (storage1.capacity() < storage1.maxCapacity()) {
var restCapacity = Math.min(storage1.maxCapacity() - storage1.capacity(),storage0.numItems(currentItem));
storage1.addItem(currentItem, restCapacity);
storage0.removeItem(currentItem, restCapacity);
}}
@Vis_Mage
Hmm... I would probably need a bit more information to help you. But one thing you could do is overriding the function that adds the battle drops to the party.
Take a look at the rpg_managers file, there you can find a function called gainDropItems. You could copy-paste that function into a new .js file in your /js/plugins directory and import it as a plugin and change it accordingly.
Code:
BattleManager.gainDropItems = function() {
var items = this._rewards.items;
items.forEach(function(item) {
// Put battle drops into storage
$gameStorageSystems.storage(0).addItem(item, 1);
});
};
Thank you for the advice, however after about 3 hours of trying to get it to work, I cannot for the life of me get it to work.
What I'm trying to set up is to have a "Battle Bag" storage, an 8 slot storage that you can put items into from the menu. Before battle, I put the main inventory into a TEMP storage, and add the Battle Bag storage to the now empty main inventory. Then, after battle, I move the current inventory back into the Battle Bag storage, and add everything from the TEMP storage back into the inventory.
Swapping the inventories actually works just fine. The issue I'm having is, no matter what I seem to try, I cannot for the life of me get battle drops to go to a specific storage. Changing the $gameStorageSystems.storage(0).addItem(item, 1); line to a different storage ID does indeed put the dropped items in that storage, but ALSO still puts them in the main inventory.
I'm guessing that I'm just overlooking something simple, but if you get the chance, I'd really appreciate if you could take a crack at it.
What I'm trying to set up is to have a "Battle Bag" storage, an 8 slot storage that you can put items into from the menu. Before battle, I put the main inventory into a TEMP storage, and add the Battle Bag storage to the now empty main inventory. Then, after battle, I move the current inventory back into the Battle Bag storage, and add everything from the TEMP storage back into the inventory.
Swapping the inventories actually works just fine. The issue I'm having is, no matter what I seem to try, I cannot for the life of me get battle drops to go to a specific storage. Changing the $gameStorageSystems.storage(0).addItem(item, 1); line to a different storage ID does indeed put the dropped items in that storage, but ALSO still puts them in the main inventory.
I'm guessing that I'm just overlooking something simple, but if you get the chance, I'd really appreciate if you could take a crack at it.
@Vis_Mage
I will sent you a PM with a link to a project that you can use to setup a demo project for me. Then I can help you out.
I will sent you a PM with a link to a project that you can use to setup a demo project for me. Then I can help you out.
I just wanted to drop a little message saying that I found this plugin all the way back when it was version 1.6 (or so), and that I have loved it ever since. I just came back to see if there was an updated version and lo and behold, there is! Hahah! Well, updated, and I still love it. Two immediate things I noticed in the recent version is the background image that is allowed and that the items in the containers are now visible on the main inventory window when they weren't before. Immediate bonuses to this most current version that I love right away.
Thank you so much for supplying this plugin for the community. It is a jewel and works amazingly.
Thank you so much for supplying this plugin for the community. It is a jewel and works amazingly.
Any way to create loot tables with this plugin? Like let's say the player can loot barrels but it's random what appears in them?
@Morpheus if you want different loot everytime, you can do it with a random variable
to start: variable x = 0 ... 10
than the plugin command in those, so it has 10 random loot tables.
you can ofcourse increase or decrease the possibilities.
to start: variable x = 0 ... 10
than the plugin command in those, so it has 10 random loot tables.
you can ofcourse increase or decrease the possibilities.
@Guardinthena Thanks for the nice words! 😂
@Morpheus
Yeah, you can do that. As @ShadowDragon suggests you can use a combination of event commands and plugin commands.
@Morpheus
Yeah, you can do that. As @ShadowDragon suggests you can use a combination of event commands and plugin commands.
So, hey, this might sound like a crazy question but, I feel I need to ask...how many storage's can this plugin handle? Like, 50? Or, 100? Is there a limit? I'm asking because I'm making a...err, sizeable game with lots of areas to poke around. So I'm curious how crazy I should or should not be going on this.
@Guardinthena as far I can read, you can make loads of them.
if it does crash on 101 storage for example, you know you can cannot go over it.
if it does crash on 101 storage for example, you know you can cannot go over it.
@waynee95, I'm trying to figure out how to check amout of item X in Y waarehouse, but I have no idea HOW to do this. Can you please help? 🙁 Would be lovely to assign it to a variable.
@fizzly
Code:
// Get amount of item X in storage system Y
var amount = $gameStorageSystems.storage(Y).numItems($dataItems[X]);
// Storage that amount to variable with id 1
$gameVariables.setValue(1, amount);
Original thread: https://forums.rpgmakerweb.com/threads/waynee95s-storage-system.80181/