PH - Warehouse/Storage

● ARCHIVED · READ-ONLY
Started by PrimeHover 140 posts Page 5 of 7 View original ↗
  1. It seems this plugin does something odd when used alongside Yanfly's Item Core. If there's an item in a warehouse that's not marked "<Not Independent Item>", trying to take said item from a warehouse will play the buzzer sound effect. However, upon checking inventory, the player can have multiple copies of the item. The items marked "<Not Independent Item>" work perfectly fine.


    I have this plugin installed under Yanfly's Item Core.


    Here are some screenshots, to show what I mean:

    Spoiler
    warehouse___item_core_01_by_natalyabass-dad2cvt.png


    The Wooden Sword isn't marked with "<Non Independent Item>".


    warehouse___item_core_02_by_natalyabass-dad2cvp.png


    The Torch, on the other hand, is.


    warehouse___item_core_03_by_natalyabass-dad2cvl.png


    The event where the warehouse is created. (The second page is just the "opened box" graphic with the "show <Box>" plugin command.)


    warehouse___item_core_04_by_natalyabass-dad2cvb.png


    These items work perfectly fine, thanks to being marked with the <Not Independent Item> tag. When these items are selected, they play the "select" sound effect and are removed from the warehouse. The "Available Space" section changes to reflect this.


    warehouse___item_core_05_by_natalyabass-dad2cv7.png


    It's these items that aren't cooperating. When selected, they play the "buzzer" sound effect, and do not get removed from the warehouse. The "Available Space" section also does not change.


    warehouse___item_core_06_by_natalyabass-dad2cv3.png


    warehouse___item_core_07_by_natalyabass-dad2cuv.png


    As expected, the inventory shows one Pickaxe and one Torch. But it also shows two Wooden Bows and two Wooden Swords, as you can probably see from the notifications in the top right corner. From top to bottom, the notifications read:


    Obtained Wooden Bow x1


    Obtained Wooden Bow x1


    Obtained Wooden Sword x1


    Obtained Wooden Sword x1


    Obtained Pickaxe x1


    Obtained Torch x1

    Hopefully this is either an easy fix or a case where I missed something.
  2. I found a bug. I made a warehouse (Locker) have the #0002 Cell Phone item in it by using the loot command:


    PHWarehouse loot item <Locker:2:1> and then showed the warehouse using the


    PHWarehouse show <Locker> Plugin Command.


    When I open up the locker after putting in the code, I can take infinite Cell Phones out of the locker!


    Here are some screenshots to explain:


    RPGerror1.png


    The Plugin Commands I put in


    RPGerror2.png


    I can take the cell phone out of the locker as many times as I want


    RPGerror3.png


    I have 32 Cell Phones!
  3. PrimeHover, there's a minor bug regarding the rules. It does not recognize "," as a separator and in turn, all items become disabled.


    {hhq}


    item: 13, 14


    weapon: no


    armor: no


    keyItem: no


    I've tried:


    item: 13 , 14


    item: 13 ,14


    item: 13,14 
  4. wintyrbarnes said:
    Spoiler
    This might have a really simple fix that I'm overlooking, but is there a way to make the quantity of an item a random number? I tried setting the amount of the item to a variable with the variable escape code (\v[n]) but when I checked it out in the game, the amounts came out as "NaN" and allowed me to withdraw an unlimited amount of the item. Am I missing something or is this something that hasn't been implemented yet? Thanks! 


    (Otherwise, this plugin works perfectly and is super duper handy, so also thanks for creating it!)



    @wintyrbarnes The Plugin command will not read the value of a variable like that. The only way to customize the plugin command I found is to "manually" call it through Script Call. Here's a way to do exactly what you tried there through Script Call:


    var str = 'PHWarehouse add item <Title of the Warehouse:id:' + $gameVariables.value(VariableIDHere) + '>';
    var args = str.split(" ");
    var command = args.shift();
    this.pluginCommand(command, args);


    Given you're setting up the variable's value through Event Commands, that will work for you. Just change the title and item id as desired, then change "VariableIDHere" with the desired variable id. And you may change the "add" for "loot", as well as "item" for any category you want as well. If there's any problem with this, just ask!

    GameFire said:
    Spoiler
    It seems this plugin does something odd when used alongside Yanfly's Item Core. If there's an item in a warehouse that's not marked "<Not Independent Item>", trying to take said item from a warehouse will play the buzzer sound effect. However, upon checking inventory, the player can have multiple copies of the item. The items marked "<Not Independent Item>" work perfectly fine.


    I have this plugin installed under Yanfly's Item Core.


    Here are some screenshots, to show what I mean:
    Spoiler
    warehouse___item_core_01_by_natalyabass-dad2cvt.png


    The Wooden Sword isn't marked with "<Non Independent Item>".


    warehouse___item_core_02_by_natalyabass-dad2cvp.png


    The Torch, on the other hand, is.





    The event where the warehouse is created. (The second page is just the "opened box" graphic with the "show <Box>" plugin command.)


    warehouse___item_core_04_by_natalyabass-dad2cvb.png


    These items work perfectly fine, thanks to being marked with the <Not Independent Item> tag. When these items are selected, they play the "select" sound effect and are removed from the warehouse. The "Available Space" section changes to reflect this.


    warehouse___item_core_05_by_natalyabass-dad2cv7.png


    It's these items that aren't cooperating. When selected, they play the "buzzer" sound effect, and do not get removed from the warehouse. The "Available Space" section also does not change.


    warehouse___item_core_06_by_natalyabass-dad2cv3.png


    warehouse___item_core_07_by_natalyabass-dad2cuv.png


    As expected, the inventory shows one Pickaxe and one Torch. But it also shows two Wooden Bows and two Wooden Swords, as you can probably see from the notifications in the top right corner. From top to bottom, the notifications read:


    Obtained Wooden Bow x1


    Obtained Wooden Bow x1


    Obtained Wooden Sword x1


    Obtained Wooden Sword x1


    Obtained Pickaxe x1


    Obtained Torch x1

    Hopefully this is either an easy fix or a case where I missed something.



    @GameFire Your problem with Instance/Independent items is actually due to you adding TEMPLATE items into the storage, and they should never exist in-game, in the player's inventory, that's why they'll refuse to go into player inventory. If you want to add independent items in the storage you'll have to manually script the game to generate Independent Items. That, my friend, I, unfortunately, still do not know how to magick-up through Script Calls. All in all, this plugin is not "fully" compatible with YEP Item Core, although it works perfectly fine if you're not starting them out with items that the YEP Item Core considers Independent (because the database IDs will be templates, not actual items).
  5. This looks awesome :D  but is it possible to make the warehouse act like a Refrigerator. For example, I put an Organic item like an apple and after 2 days the apple goes bad then the item gets replaced with a spoiled version. I am using Moghunters Time system. I have been trying to find a way to store my Crafting items like food but make it a destroyable. I am also trying to make a player run a shop where the player opens a store and NPC buy their items and the item stock/capacity will go down. Is this possible with your plugin? 
  6. For some odd reason my Chest is not showing how much items I am withdrawing D: I set my chest capacity to be 50 to test some things out. 

    Storage system.PNG
  7. Great script, goes really well with a limited item inventory type plugin.
  8. Sakurahan01 said:
    This looks awesome :D  but is it possible to make the warehouse act like a Refrigerator. For example, I put an Organic item like an apple and after 2 days the apple goes bad then the item gets replaced with a spoiled version. I am using Moghunters Time system. I have been trying to find a way to store my Crafting items like food but make it a destroyable. I am also trying to make a player run a shop where the player opens a store and NPC buy their items and the item stock/capacity will go down. Is this possible with your plugin? 



    I believe you can actually do that through Common Events, although it would not function as "organically" as real-life, unless you have a plugin strictly for that, setting up "shelf-life" for each, individual item...


    If you plan it through...

    Spoiler
    Say, items have a predetermined "shelf-life". You would have to run some extra event/coding to check up on how many of each perishable item is carried by the Player Inventory or was put into a Storage (yeah, you will have to monitor those with variables for eventing workarounds), you'll need to check that through Script Call commands provided by the Storage plugin to check storage inventories.


    Then store the day/time those were checked. Afterwards, run a "Has Spoiled?" common event by Hour or Day (your preference), checking if the storage/inventory item has existed past their "Shelf-life" determined by you (either another variable or an integer value, your dev choice), thus exchanging the spoiled item with a spoiled version or generic "junk" if has indeed expired.


    Through these methods, you can run different expiration situations for player inventory (realistically, lower Shelf-Life, unless the player has a portable icebox for extended shelf-life, in case of fruits, vegetables and the like) and Storages.


    Heck, you could even run even more extensive eventing if you wanted, such as spoiled food creating a "smell zone", like The Sims, which require the player to grab it (or if it is already in player inventory, he may actually inherit the smell as a State), and dispose of it or wash, whatever. You just need to plan ahead how much "realism" you are willing to implement into your game.



    I hope this has helped you. But anyways, I suppose a plugin constantly checking for perishable items' shelf-life does not currently exist, and would have to be well-made to not cause FPS drops (just me rambling with my lack of coding experience, I'm quite possibly wrong about FPS drop).
  9. You should set this up to have a bank function too xD
  10. CyBardo said:
    I believe you can actually do that through Common Events, although it would not function as "organically" as real-life, unless you have a plugin strictly for that, setting up "shelf-life" for each, individual item...


    If you plan it through...

    Spoiler
    Say, items have a predetermined "shelf-life". You would have to run some extra event/coding to check up on how many of each perishable item is carried by the Player Inventory or was put into a Storage (yeah, you will have to monitor those with variables for eventing workarounds), you'll need to check that through Script Call commands provided by the Storage plugin to check storage inventories.


    Then store the day/time those were checked. Afterwards, run a "Has Spoiled?" common event by Hour or Day (your preference), checking if the storage/inventory item has existed past their "Shelf-life" determined by you (either another variable or an integer value, your dev choice), thus exchanging the spoiled item with a spoiled version or generic "junk" if has indeed expired.


    Through these methods, you can run different expiration situations for player inventory (realistically, lower Shelf-Life, unless the player has a portable icebox for extended shelf-life, in case of fruits, vegetables and the like) and Storages.


    Heck, you could even run even more extensive eventing if you wanted, such as spoiled food creating a "smell zone", like The Sims, which require the player to grab it (or if it is already in player inventory, he may actually inherit the smell as a State), and dispose of it or wash, whatever. You just need to plan ahead how much "realism" you are willing to implement into your game.





     






    I hope this has helped you. But anyways, I suppose a plugin constantly checking for perishable items' shelf-life does not currently exist, and would have to be well-made to not cause FPS drops (just me rambling with my lack of coding experience, I'm quite possibly wrong about FPS drop).





     

    This is exactly what I want to do :D do you know a way where I can event this, an example of what you would do :)  I love the Idea of the "Smell zone" as well. 
  11. AK-GR-A said:
    Hello again! If you are thinking on improving upon your script, I have a most fervent request and I'd be elated if you would consider implementing it.


    In my RPG, I intend to make extensive use of this warehouse script by having a multitude of different storage compartments throughout the game which are used, in fact, by NPCs in my in-development living world system. But since there are so many of them, naming them all becomes quite a chore and probably an eye-sore in game. So what I'd like to request is that you could perhaps make a sort of alias option for warehouses- names that appear in-game. This is so that, while I would call a chest "Chest A-14 Delta" in edit mode, it could have the alias of just "Chest" in game like a bunch of others. Think it's doable?



    I know this is an old request, and one that PrimeHover said he'd get to, but seeing as it hasn't happened, and I needed it myself, I have forked his GitHub project and added in simple renaming functionality.


    Until my pull request is responded to, you can find the change here: https://github.com/Hikitsune-Red/Warehouse
  12. Hello everyone, and happy new year!


    I love the PHWarehouse plugin but there's a simple idea I have that I can't make in the game.


    I would love to make a Warehouse being created with a random set of items.


    Maybe it's possible with the current plugin, but I can't find the way of doing it.


    It would be nice to add a function like "PHWarehouse loot item random<Title of the Warehouse:ids:quantity>


    If someone has a way of doing this with the current plugin, I'd be glad to hear it!
  13. Narch said:
    Hello everyone, and happy new year!


    I love the PHWarehouse plugin but there's a simple idea I have that I can't make in the game.


    I would love to make a Warehouse being created with a random set of items.


    Maybe it's possible with the current plugin, but I can't find the way of doing it.


    It would be nice to add a function like "PHWarehouse loot item random<Title of the Warehouse:ids:quantity>


    If someone has a way of doing this with the current plugin, I'd be glad to hear it!



    A really easy way to do this is to utilize a series of conditional branches and random variables.


    ◆Plugin Command:PHWarehouse create <Mine Lamp Chest:5>
    ◆Plugin Command:PHWarehouse rename <Mine Lamp Chest:Chest>
    ◆Control Variables:#0201 NumItems = Random 1..5
    ◆Loop
    ◆If:NumItems = 0
    ◆Break Loop

    :Else
    ◆Control Variables:#0202 ItemID = Random 1..4
    ◆If:ItemID = 1
    ◆Plugin Command:PHWarehouse loot item <Mine Lamp Chest:1:1>

    :End
    ◆If:ItemID = 2
    ◆Plugin Command:PHWarehouse loot item <Mine Lamp Chest:2:1>

    :End
    ◆If:ItemID = 3
    ◆Plugin Command:PHWarehouse loot item <Mine Lamp Chest:3:1>

    :End
    ◆If:ItemID = 4
    ◆Plugin Command:PHWarehouse loot item <Mine Lamp Chest:4:1>

    :End
    ◆Control Variables:#0201 NumItems -= 1

    :End

    :Repeat Above
    ◆Plugin Command:PHWarehouse show <Mine Lamp Chest>


    And if you wanted to randomize the quantity of those items, it's as simple as adding in another loop like the one the whole thing is wrapped in, where another integer counts it down.


    But, after adding in that small bit of code to allow setting display names, I'm curious if I could add a function like that for simplicity's sake...
  14. Narch said:
    Hello everyone, and happy new year!


    I love the PHWarehouse plugin but there's a simple idea I have that I can't make in the game.


    I would love to make a Warehouse being created with a random set of items.


    Maybe it's possible with the current plugin, but I can't find the way of doing it.


    It would be nice to add a function like "PHWarehouse loot item random<Title of the Warehouse:ids:quantity>


    If someone has a way of doing this with the current plugin, I'd be glad to hear it!



    I have added in the ability to have a random list of ids and a random quantity.


    You can get the revised version here: https://github.com/Hikitsune-Red/Warehouse
  15. Hikitsune-Red said:
    I have added in the ability to have a random list of ids and a random quantity.


    You can get the revised version here: https://github.com/Hikitsune-Red/Warehouse



    Wow it's been so fast, thanks a lot! Really happy about the explication and plugin addition. Simplified a huge part of my work.


    I made some late playtesting. Everything apparently works like it should, but it needed something I don't think is intented.


    One the 2 random command, there's a thing to do on the idlist, or else it will do wonky stuff like dodging the first item, or even going into a negative mode, giving unlimited withdraw with the first item spawning at x0, and messing the storage space. This thing I had to do is to be sure the list was beginning with the " | " symbol (ex: |9|8|7|5:1  instead of 9|8|7|5:1).


    Also with the randomLoot command, if I try to put only 1 in quantity, I'll always get 2 items instead of just one.


    Apart from that, the plugin addition suits my needs and I'm very grateful Hikitsune. Thanks.
  16. Narch said:
    Wow it's been so fast, thanks a lot! Really happy about the explication and plugin addition. Simplified a huge part of my work.


    I made some late playtesting. Everything apparently works like it should, but it needed something I don't think is intented.


    One the 2 random command, there's a thing to do on the idlist, or else it will do wonky stuff like dodging the first item, or even going into a negative mode, giving unlimited withdraw with the first item spawning at x0, and messing the storage space. This thing I had to do is to be sure the list was beginning with the " | " symbol (ex: |9|8|7|5:1  instead of 9|8|7|5:1).


    Also with the randomLoot command, if I try to put only 1 in quantity, I'll always get 2 items instead of just one.


    Apart from that, the plugin suits my needs and I'm very grateful Hikitsune. Thanks.



    Hmm... I will take a look at that to see if I can fix that.


    Again, I'm not a JavaScript guy, so I knew there was bound to be a bug or two XD



    Glad I could help.
  17. Why apply this plugin and add a plugin command properly?


    I have clearly put this on the event page.


    ◆Plugin Command:PHWarehouse create <Testing Chest:10>
    ◆Plugin Command:PHWarehouse show <Testing Chest>


    So, obviously, 10 space of warehouses have to be floated. Why is it not working like this in the picture below?


    Please explain how this bug occurs. There is no absolute bug, it is a bug that I don't understand!


    20170113_162015.png
  18. Narch said:
    Wow it's been so fast, thanks a lot! Really happy about the explication and plugin addition. Simplified a huge part of my work.


    I made some late playtesting. Everything apparently works like it should, but it needed something I don't think is intented.


    One the 2 random command, there's a thing to do on the idlist, or else it will do wonky stuff like dodging the first item, or even going into a negative mode, giving unlimited withdraw with the first item spawning at x0, and messing the storage space. This thing I had to do is to be sure the list was beginning with the " | " symbol (ex: |9|8|7|5:1  instead of 9|8|7|5:1).


    Also with the randomLoot command, if I try to put only 1 in quantity, I'll always get 2 items instead of just one.


    Apart from that, the plugin addition suits my needs and I'm very grateful Hikitsune. Thanks.



    Both bugs have been fixed, you can get the new version at the same link.
  19. Hikitsune-Red said:
    Both bugs have been fixed, you can get the new version at the same link.



    I tried applying the modified plugin and it still didn't work. But I found the cause:


    I have not been able to get plugins in my saved game, and I've had this problem.


    So I tried with a new game...


    Grrrrrrrrrreat! finally, it's work!2017-01-15T01-29-29-965Z.png


    Anyway thx u for giving me a solution.



  20. Hi Kitsune. I tested the plugin a lot while doing events since the last time (I'm not a pro so I may take more time than more competent makers). I come to you to report bugs I found, and even one being heavy for my project, but maybe not related directly to PHWarehouse.


    1. The first one is again the " | " sign. I found it's necessary to write a line like this: PHWarehouse randomLoot item <Mediarack1:58|59|60|61|:10>


    If the ID list is not closed with a " | ", the last item will be ignored (in this exemple, the 61).


    Also not a direct bug, but important to notice if another user read this, having the ID list starting with the " | " sign, will create an invisible item that will be spawned inside the chest, and take space of the determined quantity possibility (ending up with a warehouse of 475/500 despite being empty. Happens on small warehouses too).


    2. I installed the MrTS_LimitedInventory plugin because I saw compatibility made in previous patches. I tested it in various position in the plugin list, and tested with YEP_Item Core off.


    The limit on MrTS plugin works, blocking the inventory from getting new items, but, a warehouse will never put a stop to withdraw.


    It causes items to vanish when the player takes them from the warehouse.


    Apart from that I'd like to make 2 suggestions if you want to upgrade the plugin. It would be really nice to have an option allowing items to be displayed one by one instead of stacks (might be hard to code),


    and it would be great to have an option removing the "All" when All text option is enable, Leaving only the Withdraw text and Deposit text (would remove some sort of redundancy).


    Thank you for your time and work!