I know this is a big necropost but I have a hopefully simple question?
I want to change the max capacity to be based on a variable. In "text" mode in the plugin parameters I have set it to \v[71] and set variable 71 to 12. When I open the stash in game, it displays 12 as the max capacity, but won't let me actually store anything. Any ideas? Thanks!
I don’t think writing here is necroposting. After all, this is the main thread for this plugin, and it’s meant for people who have questions or concerns about it. Even if the creator, someone really helpful and amazing, who I hope is doing well, can’t reply for any reason, maybe another user can help.
So… you wanted to change the storage capacity by linking it to a variable, right? That’s why you modified the text to display the capacity like that.
Now, how are you changing the maximum quantity? Because in the RPG Maker editor, and even with the plugin command, it’s kind of tricky to input anything that isn’t a number there. No matter what you put in the text field, you should still be able to store items normally. I tested it, and yeah, you can still store items even if you put your variable in the “Text” field (\v[71]).
Just a warning: this only changes the display; it doesn’t actually increase the capacity.
So you probably need to check what you’re doing, what plugins you’re using, and whether everything is set up correctly, especially in the editor under “Allowed Item Types” (since the storage capacity itself isn’t related to that).
I recommend this:
don’t touch the text part, or at least
not the “%1”. You don’t need to change that, it’s important and used for the calculation.
Create a new project and use only the WayStorageSystem.js plugin. Create a test event, and on the first page, after setting your variable to the value you want (for example, set Variable 71 = 12 using the editor), then call this script:
Code:
$gameStorageSystems.storage(A).changeMaxCapacity($gameVariables.value(B));
$gameStorageSystems.open(A);
Replace
A with the storage ID (remember the first one in the editor is 0), and replace
B with the ID of your variable.
If it’s the first storage and you’re using variable 71, it should be:
Code:
$gameStorageSystems.storage(0).changeMaxCapacity($gameVariables.value(71));
$gameStorageSystems.open(0);
You don’t need to change anything in the text part in the editor, again, just leave it as it is. The plugin will automatically display the correct capacity.
However, I’m afraid your issue with storing items might not be related to this. This is simply the correct way to change the storage capacity using a variable, and even with your issue, I tested it and the storage worked perfectly. So I strongly recommend trying everything in a new project, in case you’re dealing with plugin conflicts or setup issues elsewhere.
If you need more help, feel free to DM me and send screenshots of your event or plugin settings. I’ll be happy to help you figure out what’s going wrong.