Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
@waynee95
I want to creat a backpack and that you can only add items at the field and can only remove items when you are home.
I tried to use 2 systems and your scriptcall to move the items but it aint working
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
691
Reaction score
615
First Language
German
Primarily Uses
RMMV
@Lu_
Then let's try to figure out why it's not working. Do you get an error or does it just not work?

Can you post the code you used and describe what you wanted to happen but what happened instead?
 

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
@waynee95
I used this code you posted to move items:

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);
}
}

I replaced the ID's with my ID's. I wanted to move the items from on storage to another. I set them up the same way only the mode is different. I just want to move the items from the add mode storage to the remove mode storage and the other way around. But just nothing happens.
 

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
@waynee95 we solved the problem. I used two scripts instead of one... ty
 

Selvalanch

Villager
Member
Joined
Jul 13, 2016
Messages
18
Reaction score
0
First Language
Thai , English
Primarily Uses
excuse me.
- is there a limit for how many storage i can create?
- can i track the data from what item i store in each storage. like get a name and icon from the first item stored in storage(0) ( i plan to have only one item for each storage.) if this avalible, how to do?
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
691
Reaction score
615
First Language
German
Primarily Uses
RMMV
@Selvalanch
1.) You can create as many storage systems as you want.

2.) Yoiu can use this scriptcall
Code:
var item = $gameStorageSystems.storage(0).allItems()[0];
if (item) {
    var name = item.name;
    var iconIndex = item.iconIndex;
}
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
633
Reaction score
209
First Language
English
Primarily Uses
RMMV
Hey,

If you have the chance, could you help me with a mechanic I'm hoping to create utilizing your plugin?

What I'm hoping to create is a Battle Bag, a separate inventory of 8 items that you would have access to in battle, instead of having access to all the items in your inventory.

I can already set up most of this, by having a storage system of 8 items that players can access from their menu, and now just need to figure out how to swap the inventories in battle. I'm guessing the easiest way to do this would be to, prior to battle, store all items in the player's inventory in a separate storage system, and then retrieve the items from the Battle Bag storage. Then after battle, put the remaining items back in the Battle Bag storage, and retrieve the items from the temporary inventory storage.

Is there a command that I can use to add all items to/from a storage?

Edit: Seems I must have deleted a paragraph in my original post, haha. :kaoblush:
 
Last edited:

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
691
Reaction score
615
First Language
German
Primarily Uses
RMMV
@Vis_Mage
If you want to know how to move items from one storage to another, you can use this code posted here https://forums.rpgmakerweb.com/index.php?threads/waynee95s-storage-system.80181/page-9#post-1011953

EDIT: Ignore the mention of an issue regarding that code, it works. Just make sure to place all of the code inside ONE script event command.

Moving items from the party inventory to a storage system, use this

JavaScript:
$gameParty.allItems().forEach(function(item) {
    var amount = $gameParty.numItems(item);
    // Change 0 to the storage id of your choice
    $gameStorageSystems.storage(0).addItem(item, amount);
});

$gameParty.allItems().forEach(function(item) {
    var amount = $gameParty.numItems(item);
    $gameParty.loseItem(item, amount);
});
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
633
Reaction score
209
First Language
English
Primarily Uses
RMMV
Thank you, the command you gave seems to be working perfectly!

I do have one more question to go along with this system though, is there a command that can take all items out of a storage, and put them back into the inventory?
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
691
Reaction score
615
First Language
German
Primarily Uses
RMMV
@Vis_Mage
We can do that using some of the code we have already seen.

JavaScript:
// Change the 0 to the storage id of your choice
var storage = $gameStorageSystems.storage(0);

storage.allItems().forEach(function(item) {
    var amount = storage.numItems(item);
    $gameParty.gainItem(item, amount);
});

storage.allItems().forEach(function(item) {
    var amount = storage.numItems(item);
    storage.removeItem(item, amount);
});
 

Nacura

Veteran
Veteran
Joined
Feb 4, 2018
Messages
125
Reaction score
14
First Language
Español
Primarily Uses
RMMV
Hello friend, you know I want to increase the maximum storage and it gives me error, I have the maximum storage 20, I put 50 and it gives error, and now I put 0 and it gives me the same error.

I don't know if it will be the Script, but when I want to clean everything, or delete storage, I don't care about the error.

And thank you very much for continuing with this plugin. <32849b763b41a824d4d3b2215ffa63a85.png480de50e107ca3e40d0ba62297ce767a.pngbaa18be789f9321ec5d2cbe3eb1fad6a.png

Also the other mistake, is that I want to close the chest and it does not leave me, it is open.
 

Nacura

Veteran
Veteran
Joined
Feb 4, 2018
Messages
125
Reaction score
14
First Language
Español
Primarily Uses
RMMV
There I solve the error of increasing the maximum storage, now I will solve the other problems ajaj

Change Max Capacity:
Code:
$gameStorageSystems.storage(0).changeMaxCapacity(30)
 

Frizzle

Villager
Member
Joined
Apr 19, 2020
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMV
I seem to be having issues using this plug-in. It prevents my game from loading and runs some kind of script page that I cannot understand.

Few things to note:
I just purchased MV 5ish days ago, and probably have the newest updated version as a result.
I have Core_Engine and Item_Core to work in pair with this storage plug-in.

Screenshot below:Desktop Screenshot 2020.04.28 - 18.03.33.40.png

Any pointers would be great. I limit the amount of items that can be carried so a storage system would be very useful for my players if I could add one. Any help would be appreciated.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
691
Reaction score
615
First Language
German
Primarily Uses
RMMV
@Frizzle
Did you also install the WAY_Core plugin?

Did you create a storage system inside the plugin parameters before starting the game? There needs to be at least one.

Can you provide a screenshot of all plugins you use?
 

Frizzle

Villager
Member
Joined
Apr 19, 2020
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMV
@Frizzle
Did you also install the WAY_Core plugin?

Did you create a storage system inside the plugin parameters before starting the game? There needs to be at least one.

Can you provide a screenshot of all plugins you use?

Of course not, I'm far to stupid to have read that little bit xD

All joking aside, my issue has now been resolved... I'll try to pay more attention in the future x.x

Thank you for the help! Also, this plug-in is totally rad.
 

yopeople

Veteran
Veteran
Joined
Sep 6, 2016
Messages
88
Reaction score
36
First Language
english
Primarily Uses
@waynee95 Is there a function where the background can be the background of the game? Or just a blurred imaged of the background game just like how it is with opening the game character stats screen?
 

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
176
Reaction score
19
First Language
Australian
Primarily Uses
RMMV
Would that be possible to have a default transparent blurry background instead of black background?
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
691
Reaction score
615
First Language
German
Primarily Uses
RMMV
@kako05 You want it to look like the default background similar to the main menu?
 

Latest Threads

Latest Profile Posts

Doing RPG Maker News for 10th April, 2021. :LZScheeze: (Improving on the thumbnails, by using assets from the day's news.)
Just discovering the forum.
Since Final Fantasy VII has been trending today, decided to make a series of my favorite bars in the OG game! Check it out:

At 2021, we are now farther from the 1980's than they were from the 1950's. Consider that the next time you long for a 1980's song, when you thought your grandpa's taste for 1950's music was "outdated".
no, not my duct tape, anything but my duct tape!

Forum statistics

Threads
110,295
Messages
1,052,045
Members
143,324
Latest member
Armyrule94
Top