waynee95's Storage System

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Wolfmother64
I send you a PM with a link to a project that you can use to setup a demo that shows the issue, since I cannot reproduce the issue on my end and I need more information. So please provide me with that demo, so I can see what exact issue you run into.
 

vergataerisch

Warper
Member
Joined
Jun 1, 2019
Messages
2
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
First of all, thank you so much for such an excellent plugin!!

I wanted to make all my chests be "Bethesda-style"—in that you can find a multitude of items in them and are able to take only what you want, as well as drop your own items you don't want or want to stash in them. This plugin works perfectly for that!

However, I have come across a small issue when setting these up:

Whenever the item categories for my add/remove storages are off (which is preferable for the type of storage I need), the item descriptions for the "remove" section update normally as I select each of my items; however, the description for the first item in the "add" section does not refresh unless I select another item and then re-select the first one again. Without selecting another item, it shows the description for the first item that's already in the storage (i.e., the first item from the "remove" list). This is true even when I have nothing else to add in my inventory (showing the description for the first stored item when listing my blank inventory). I looked through the code (I am inquisitive and eager to learn, but also a bit ignorant and very amateur!) and noticed many "refresh" functions throughout (some specifically mentioning the info window and such), so my ignorant educated guess is that there may be one missing somewhere(?), but I couldn't find where that could be...

I also have a small suggestion (which I hope is welcomed) for something that I was actually able to sucessfully find and edit in the code with my limited experience (note: the issue above was already present in the original plugin), but it would be useful to have this as an option in the Scene Settings: for add/remove loot-chest-type storages, it would be nice to have the "remove" category show up on the left-hand side and be the default option (instead of the add function); that way the player opens a container and is immediately able to interact with what's inside, picking items from it, and so on. Then if they want to put something back or something else they can go to the add menu on the right-hand side. However, I understand why this is not the default, as this is originally meant to be a storage system...! :)

For anyone that may be curious on how I inverted these, I reversed the order of lines 638 and 639 (v. 2.3.0), thus placing the "remove" command before the "add" command, and it did the trick. Both functions still work as they should.

Example:
this.addCommand(this._removeText, "remove");
this.addCommand(this._addText, "add");

Anyway, thanks again for making, sharing, and maintaining this plugin! I would have had to spend hours upon hours if I even tried to tackle this through common eventing!
 
Last edited:

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@vergataerisch
Let me know if v2.3.1 fixes that issue, just redownload the plugin.
 

Leidz

Villager
Member
Joined
Apr 12, 2019
Messages
12
Reaction score
0
First Language
french
Primarily Uses
RMMV
Hello! Is there a way to get the id of the last removed item from the storage? I'm trying to do a WoW style auction house with youre storage system !
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Leidz
That is not possible at the moment. For what do you exactly need that?
 

Leidz

Villager
Member
Joined
Apr 12, 2019
Messages
12
Reaction score
0
First Language
french
Primarily Uses
RMMV
Because i already made "Sell stuff to auction house" system with scripts call. But the "Buy stuff from it" part seem more difficult without some id picking on storage remove mode :/

Here exactly why i need it: ^-^
O》Select weapon with remove mode
X》Force close storage windows (idk how script in plugin work but i will google it)
X》Pick the last selected weapon id using remove mode. ( need it for this part!)
O》Ton of scriptcalled variables detect id, get weapon stats price, and custom price (added on variable when i sell it with my [sell stuff to auction house] system) ]
O》Message: Are you sure To buy it?[Show weapon id and stats, base price, custom price]
O》If yes:
-Remove some gold using custom price var.
-Weapon can stay with the player.
O》If no:
-Give back selected weapon to auction house stock,
-back to storage windows.
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Leidz
Hmm, I feel like my plugin is not really suited for that specific use case and I don't have time to add your wanted features, sorry. Maybe you can find someone who can supply an edit for my plugin.
 

Leidz

Villager
Member
Joined
Apr 12, 2019
Messages
12
Reaction score
0
First Language
french
Primarily Uses
RMMV
No problem, i understand, i will find some informations about that, thanks for reply!
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Leidz
If you cannot find any other help. Let me know, then I will do it.
 

Leon_Artmann

Veteran
Veteran
Joined
Jan 23, 2019
Messages
43
Reaction score
7
First Language
Portuguese
Primarily Uses
RMMV
Thanks for this awesome work, @waynee95 ! I'm having just a small issue. When limiting the party inventory with the YEP_CoreEngine , items are completely lost because there's a possibility of a loop. Here's what's happening with me:

-> I've made so that Player can only carry 5 items (in total, not a stack. using YEP_CoreEngine for this)
-> I've made a storage unit with your plugin that can hold more than 5 items
-> Player can only TAKE 5 items at a time, BUT he/she can also ADD 1 fish back, and that allows them to TAKE 5 more fish, which will NOT appear in the inventory, thanks to the inventory limit.

I've tried changing the stack option paramets in your plugin but even with it set to NONE or 99, this persists.

To be honest with you I'd actually prefer to use Mr. Triviel's Limited Inventory plugin instead of this YEP_Core parameter. Are they compatible at the moment? I haven't tested it in my project yet and YEP_core does the job, so it's been a good placeholder so far.



I also have a suggestion, but I know it's probably quite impossible... Any change that this could work with Megumi014's "Point and Click Inventory"? I've tested them together and they DO work but it would be truly amazing if we could the player inventory to show up beside the Storage inventory, so that the Player can see how much space they have left and all of that (a billion games do that, but I could only find images from minecraft online)

Thank you very much for everything!
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Leon_Artmann
I sent you a message with a link to a demo project, that you need to send me back so that I can investigate the bug.

At the moment my plugin should not work with Mr. Trivel's plugin unfortunately. When we resolved the bug above, I could look into Mr. Trivel's plugin and see how to integrate it with my plugin.

Regarding the other plugin you mentioned, I don't know that one. I would need to look it up. But it sounds a bit more complicated than the two things mentioned above, so no guarantees (while it would probably be possible, it might take a while and I am a little bit short on time at the moment, so I would rather spend my time on actual bugs and problems and compatibility patches regarding plugins that are more common. This seems a little too specific).
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
WAY_StorageSystem v2.3.2
  • Fix issue where the player can remove more items from the storage than he can hold, while the remaining items will just be voided.
  • Fix addItem not resprecting the item maximum.
You can find the download on the first page of this thread.
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
WAY_StorageSystem v2.3.3
v2.3.2 did not fix the issues properly and introduced another issue. Hopefully now all issues are resolved.

You can find the download on the first page of this thread.

EDIT:
WAY_StorageSystem v2.3.4
Had to fix a typo in the code...
 
Last edited:

Leon_Artmann

Veteran
Veteran
Joined
Jan 23, 2019
Messages
43
Reaction score
7
First Language
Portuguese
Primarily Uses
RMMV
Hi again @waynee95 ! I'm testing the plugin with Mr. Trivel's No Item Category (https://forums.rpgmakerweb.com/index.php?threads/no-item-categories.61641/) and both plugins work together, as nothing broke so far, but I'm wondering if it's possible at all to apply the "no category" thing to the storages as well? I realize it might be a very specific request, but thought I might as well ask.

Also, Mr trivel has a cool plugin that can limit how inventory by the weight of items (https://forums.rpgmakerweb.com/index.php?threads/limited-inventory.59965/) . I think someone mentioned it already here, but right now they're not compatible, right?

thanks for everything!
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Leon_Artmann
1.) There is a parameter in the plugin settings to enable/disable categories. What would the plugin you mentioned do different compared to that option?

2.) No, currently my plugin is not compatible with that.
 

voooldo

Villager
Member
Joined
Apr 19, 2014
Messages
5
Reaction score
0
First Language
Portuguese
Primarily Uses
I'm pretty sure its a stupid question, but...

So, in my game, there's a guy called Traveling Jack. He's usually outside dungeons and what he does is: he get your loot (cus I'm using weight system) and take it to your HQ. Well, obviously, he's a Add only storage.

So what I want to do is: when I get to the HQ he'll be there and I will be able to take every item that he's holding.

TR;DR: I want to transfer all the items from a storage to my inventory.

And maybe one other thing: is it possible to transfer all items from a storage to another? Respecting the receiving storage limit, of course.
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@voooldo
This requires some JavaScript. To add all item from one storage to another, you can use this code inside a script call inside an event:
Code:
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[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);
  }
}
This will as many items from the storage with Id 0 to the target storage with Id 1.

The code for transfering all items from a storage to the player will look similar.

Code:
var srcId = 0; // sourcer storage Id
var storage = $gameStorageSystems.storage(0);
var allItems = storage.allItems();

for (var i = 0; i < allItems.length; i++) {
  var currentItem = allItems[i];
  var amount = storage.numItems(currentItem);

  $gameParty.gainItem(currentItem, amount);
  storage.removeItem(currentItem, amount);
}
This will move all items from storage with Id 0 to the player inventory. Although you have to incorporate a check from the plugin that you are using to limit the transfer of items. But you might wanna ask this in the thread of that plugin instead.
 

Lu_

Villager
Member
Joined
Sep 26, 2019
Messages
25
Reaction score
13
First Language
German
Primarily Uses
RMMV
Hay @waynee95
Is there a way to change the storage mode through a scriptcall?
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
668
Reaction score
571
First Language
German
Primarily Uses
RMMV
@Lu_
No that is not possible at the moment. What do you wanna do with that?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Lol, I was about to write a small tutorial and realized it would belong to the MZ section ....that does not exist yet.
I've noticed that more videos on YouTube have these segmented bookmark things in the videos themselves. It's nice being able to jump to parts of a video you want, and to have them all clearly labelled.
Why you do this? Now I have to buy the new RPG Maker xD
I've always dreaded planning for my games so I just didn't plan at all. That... didn't work out after all. :kaosigh:
Turns out it can be kind of fun if you keep the scope small and don't take it way too seriously.
well... for the first time in months... I feel like my game is headed towards something again. I finally have it where I won't be drawing battle assets for the rest of the year...

Forum statistics

Threads
99,572
Messages
966,770
Members
131,226
Latest member
Pseunition
Top