waynee95's Storage System

Discussion in 'JS Plugin Releases (RMMV)' started by waynee95, Jun 21, 2017.

  1. HasdrubalBarca

    HasdrubalBarca Veteran Veteran

    Messages:
    160
    Likes Received:
    56
    First Language:
    English
    What's the limit on the separate systems we can set up? I've been using various system to represent chests by adding things to it via commands.

    Also, how's the new version coming along? Is there any new features?
     
    #61
  2. HintonR

    HintonR Veteran Veteran

    Messages:
    197
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi Way.

    I've found an incompatibility with VE - Materia System. Here are the SS: WAY.png WAY2.png

    I was thinking if its possible that if there are no items to add it doesn't bring up the quantity window.
    The error only occurs when I'm trying to store an "nonexistent item" -- but when adding items that actually exist
    the game works fun and there are no errors.

    Something like in Yanfly's Shop Core, that when there is actually no item to choose, it just plays an "invalid input" SE but doesn't actually do something.
     
    #62
  3. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    529
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    #63
  4. HintonR

    HintonR Veteran Veteran

    Messages:
    197
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMMV
  5. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    529
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @HintonR
    You did not add the items that would cause the error. But I think I know why it happened, I updated the plugin. Try it out, maybe I got the issue.
     
    #65
    HintonR likes this.
  6. HintonR

    HintonR Veteran Veteran

    Messages:
    197
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMMV
    Hmm... Did it not error? I added the plugins and when I talked to the guy. The same way, it broke. I will test the new version, nonetheless. Thank you
     
    #66
  7. Randy

    Randy Villager Member

    Messages:
    16
    Likes Received:
    3
    Location:
    Seattle, WA
    First Language:
    English
    Primarily Uses:
    N/A
    @waynee95 The one thing that I would like to see added is the option to count each item in a stack as an individual item or the whole stack as one item. For example: You have 3 potions. Currently they always takes up 3 slots, but it would be nice to have it only take up 1 slot since they're the same type of item.
     
    #67
  8. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    529
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @Randy
    There is already something like this available, if I understand you correctly.

    From the help file:
    In the storage system parameter settings, you can choose the Stack Size.
     
    #68
  9. Randy

    Randy Villager Member

    Messages:
    16
    Likes Received:
    3
    Location:
    Seattle, WA
    First Language:
    English
    Primarily Uses:
    N/A
    Ah, my bad. Love the plugin by the way!
     
    #69
  10. HintonR

    HintonR Veteran Veteran

    Messages:
    197
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey Way!

    Just got around to testing the update :) And I'm excited to say it works without breaking!

    Thank you a lot and wonderful work on plugin :D
     
    #70
  11. HintonR

    HintonR Veteran Veteran

    Messages:
    197
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey Way.

    Depositing Functions fine now,

    But Withdrawing an empty item still also crashes.
     
    Last edited: Mar 16, 2018
    #71
  12. HintonR

    HintonR Veteran Veteran

    Messages:
    197
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi Way!

    I was twiddling around with your code and here is how I fixed the crash.

    On Line 880:

    return (this._mode === 'add' || this._mode === 'remove') is what I added and it fixed the crashes

    EDIT: It stops it from crash, but the numbers are messed up. I'll check the formula. :p
    EDIT2: Yeah I forgot I modified the function for removeItem.

    win.Window_StorageItemList.prototype.isEnabled = function (item) {
    if (item && item.cannotStore) {
    return false;
    } else {
    if (this._mode == 'add')
    return (this._mode === 'add') ? this._storage.maxItems(item) > 0 : win.$gameParty.maxItems(item) - win.$gameParty.numItems(item) > 0;
    if (this._mode == 'remove')
    return (this._mode === 'remove') ? win.$gameParty.maxItems(item) > 0 : this._storage.maxItems(item) - this._storage.numItems(item) > 0;
    }
    };

    This is the modified code I ended up using. Not sure if its redundant... but yeah, I suppose since they are if statements already, they don't need to be ternary statements too...
     
    Last edited: Mar 16, 2018
    #72
  13. Bazzz

    Bazzz Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Englis
    Primarily Uses:
    RMMV
    Love your plugin.

    Any chance it could be made compatible with the limited inventory plugin?
     
    #73
  14. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    529
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @Bazzz
    Thanks. :)

    Limited Inventory from MrTrivel?
     
    #74
  15. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    48
    Location:
    India
    First Language:
    English
    Primarily Uses:
    RMMV
    @waynee95 Can I make a Storage system to access from multiple location (event)

    Like Pokemon Storage
     
    #75
  16. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    529
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @Rishi Raj Jain
    You mean accessing the same storage system but on different maps? Sure.
     
    #76
    Rishi Raj Jain likes this.
  17. Bazzz

    Bazzz Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Englis
    Primarily Uses:
    RMMV
    @waynee95
    Yes.
    If I only have 2 spots left in my personal inventory and take 4 items from your storage system, 2 items disappear.
    Thank you.
     
    #77
  18. uglywolf

    uglywolf Veteran Veteran

    Messages:
    34
    Likes Received:
    8
    Location:
    In front of Toshi-chan
    First Language:
    Malay
    Primarily Uses:
    RMMV
    Hi,
    Is it possible to get the stored items count?
    Not the capacity one, but the actual items(all) for example
    Potion x1
    Antidote x3

    And it says 4 items instead
    Not 2 items

    Or did I miss something in readme?
    I tried "allItems()" command though, but it doesn't really show the number of stored items.
     
    #78
  19. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    529
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @uglywolf
    So you want the number of individual items?

    $gameStorageSystems.storage(id).allItems().length
     
    #79
    uglywolf, Randy and fizzly like this.
  20. uglywolf

    uglywolf Veteran Veteran

    Messages:
    34
    Likes Received:
    8
    Location:
    In front of Toshi-chan
    First Language:
    Malay
    Primarily Uses:
    RMMV
    @waynee95

    That I do, like how many is it an "Iron Sword" currently stored, yes.

    I did try the provided script, but it still shows the capacity instead. If this requires Advanced JS knowledge, I think it might need to take a bit of a long time to understand that script though.
     
    #80

Share This Page