Hello, and please pardon me if this question has been asked already- I didn't bother reading the entire post history.
I'm having a bit of trouble with the script call concerning whether a warehouse has an item or not. That is,
- PHPlugins.PHWarehouse.prototype.hasItem("Title of the Warehouse", id); # Verifies if a warehouse has a particular item and returns the quantity of this item inside the warehouse
- PHPlugins.PHWarehouse.prototype.hasWeapon("Title of the Warehouse", id); # Verifies if a warehouse has a particular weapon and returns the quantity of this item inside the warehouse
- PHPlugins.PHWarehouse.prototype.hasArmor("Title of the Warehouse", id); # Verifies if a warehouse has a particular armor and returns the quantity of this item inside the warehouse
- PHPlugins.PHWarehouse.prototype.hasKeyItem("Title of the Warehouse", id); # Verifies if a warehouse has a particular key item and returns the quantity of this item inside the warehouse
Just how do you use these? I wanted to use them to determine if an item exists within a given warehouse and tried adding things like >=, = <=, etc, but it won't work. Something about an unexpected token. Also, it says, "Cannot read "hasItem" property of undefined" if I take away the semicolon.
EDIT: I should note that my goal is to make a large number of warehouses independent of variables. I'm creating a living world where NPCs take and put things into warehouses and I have the plan, but I need to add a conditional branch checking how much of an item is in a warehouse- mostly for the purpose of taking it out. Seemingly the hasItem and related scripts don't work with conditional branches.
PH - Warehouse/Storage
● ARCHIVED · READ-ONLY
-
-
@AK-GR-A At first I was having trouble figuring out what was wrong, but after looking closely I think you just need to remove the .prototype from the middle. I think that should make it work. Hopefully. Not sure honestly but give it a try anyway.
-
@AK-GR-A At first I was having trouble figuring out what was wrong, but after looking closely I think you just need to remove the .prototype from the middle. I think that should make it work. Hopefully. Not sure honestly but give it a try anyway.
I tried it; unfortunately it doesn't appear to work. I'll have to find some sort of alternative.
EDIT: Nevermind. I managed to fix it. Although frankly I'm not quite sure what the problem was. Ah well! Thanks for your help. -
When I open the "storage" It says
Cannot read property 'hasOwnProperty' of unidentified
any way to fix this ? -
Question about the way it's setup and designed to count down from your maximum set value to 0 as items are put into the warehouse. Is it possible to make that count from 0 to the maximum value instead?
And as far as the menu screen for it, is it able to be adjusted and compatible with other menu plugins such as icons and the formation of the menu? I love the plugin for what it is and is solid as its default creating, but for the sake of the way I want my game to look, is that maybe able to be arranged easily by someone with little knowledge of scripting? -
Hello, @PrimeHover! Thank you for the plugin!
I have the same issue as @grem333 regarding rule commands.
{chest}
[item: 1, 2, 5, 38
weapon: no
armor: no
keyItem: no]
The above item rule does not work, although it does work if I use "item: 1" and allow only one item to be stored or withdrawn,
Is this a bug or are we missing something?
Thank you in advance! -
How to fix this? :(
Spoiler
-
How to fix this? :(
Spoiler
Got the error here..
Someone just fired an issue in the GitHub's page, and I got the problem.
New version is coming out with a correction today.. -
Ok guys, update notes for version 1.2:
- ALL TOGETHER: There's a new parameter that allows you to see all the items (weapons, armors, etc..) in just one category called "All". If you activate this option, all the chests, storage and warehouses will only show one category. This modification fixes the incompatibility with the Shaz - No Item Category plugin.
- LIMITED INVENTORY: Well, there are some plugins that allow you to set a maximum number (or weight) in your own inventory. So, this new version fixes most of the incompatibility problems that were found in those kind of plugins. Basically, the warehouse will not let you withdrawn items if you do not have enough space in your inventory.
Hope you guys like it. Thanks! :rock-left: - ALL TOGETHER: There's a new parameter that allows you to see all the items (weapons, armors, etc..) in just one category called "All". If you activate this option, all the chests, storage and warehouses will only show one category. This modification fixes the incompatibility with the Shaz - No Item Category plugin.
-
Thanks for this wonderful script/plugin.
Seems to work well I'm going to try make a comment event system where you can upgrade the bank overtime.
I'm wondering though what is the max storage one can have before things go a little crazy?
EDIT: I also am having issues increasing the size of the storage overtime. I like to say start at 10 or 20 then increase it by another 10 or 20. I rather have just 1 chest vs many. I'm not even sure if that is possible in the current state. I don't see a plugin call to increase the size and I tried to create it instead but it just stays with the original size I choose.
EDIT 2: Also finding an issue with stacked items. Is there a way to limit the count to none stackable items. Meaning if I have 999x ore it's actually 1 slot?
Thanks :) -
Ahh it's my special day to hit a few issues. I hope you don't mind a video I can write up a bug report as well if you need I'm a more visual kind of person:
-
@Kane Hart Thank you for reporting!
I got all the bugs here, and I'm correcting it.
About the request to increase the maximum capacity of the warehouse, it's already done, and I'll implement in this new version as well!
----------------------------
EDIT:
@Kane Hart Thank you for reporting, again!
All the bugs were corrected and your requests were committed.
So, there are some update notes for version 1.2.1:
- STACK ITEM QUANTITY: This new parameter defines whether or not you want to consider stacked items as a single space in the capacity (0: false, 1: true). The default is 0.
- 3 NEW PLUGIN COMMANDS:
PHWarehouse capacity set <Title of the Warehouse:quantity>
Set a new maximum capacity for a warehouse already created
- PHWarehouse capacity increase <Title of the Warehouse:quantity>
Increase the maximum capacity for a warehouse already created
- PHWarehouse capacity decrease <Title of the Warehouse:quantity>
Decrease the maximum capacity for a warehouse already created
IMPORTANT: If you try to increase, decrease or set the maximum capacity to a number lower than the current capacity/number of items of your storage, the command will just be ignored.
- STACK ITEM QUANTITY: This new parameter defines whether or not you want to consider stacked items as a single space in the capacity (0: false, 1: true). The default is 0.
-
That was quick :) I will give her a shot after I finished eating. Looking forward to using this plugin :)
Edit: The bugs seem fixed and the new increase works just flawless :)
Thanks again :) -
Everything been going great with the plugin no issues yet. Though someone made a good comment on one my videos about being able to use the keyboard to enter numbers. Is there any sort of method to transfer say 99 items at once? I might just be missing it.
Thanks :) -
Everything been going great with the plugin no issues yet. Though someone made a good comment on one my videos about being able to use the keyboard to enter numbers. Is there any sort of method to transfer say 99 items at once? I might just be missing it.
Thanks :)
Unfortunately, there is not :(
Most of the applications of this plugin are using the default way to deposit and withdraw items.
It needs some custom programming to work that way. :) -
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? -
@AK-GR-A Yep, I think I can do this.
Give me some more time and I can update the script! I'm working on the Sprite Reflection one right now.
I'll keep in touch! -
Hi there PH!
I'm just wondering if it's possible to use the warehouse with Hidden Items? I can't find anything on it and would like to store said items. I use another extension (Ryuk's Add Item Type, found here) so that the players can view the hidden items. Basically I have an item type (eggs) that I want to be separate from the Items, Weapons, Armor, and Key Items.
Sorry if this sounds confusing, I am not really sure how else to explain it. But it all boils down to an ability to store Hidden Items, specifically Hidden Items A -
Hi there PH!
I'm just wondering if it's possible to use the warehouse with Hidden Items? I can't find anything on it and would like to store said items. I use another extension (Ryuk's Add Item Type, found here) so that the players can view the hidden items. Basically I have an item type (eggs) that I want to be separate from the Items, Weapons, Armor, and Key Items.
Sorry if this sounds confusing, I am not really sure how else to explain it. But it all boils down to an ability to store Hidden Items, specifically Hidden Items A
Got it!
Well, this is not possible in this plugin =\
A solution for this is to create a rule where just eggs can be stored. Either way, it would still show the name "Item" as the current option.
I think I can modify the plugin to work they way you need, but I think some rules will need to be rewritten.
Send me a personal message if you are interested in! -
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!)