I've been making a game and trying to use limited inventory for the first time, and have Yanfly's plugins in the correct order as they appear on his site, as you can see from the last screenshot. I have MV version 1.6.2.
The issue I'm having is items are being duplicated, even when I 'remove' them from the inventory after use, as you can see in the 2nd screenshot. The other three screenshots show I had 1 key, I completed the variable event, now I have 2 keys. I thought, okay, at least then let me allow the player to sell the key, but then I get the error message, as if the game DID remove the key, so I can't sell it, but it's still there with a doppleganger taking up space in the inventory.
I know this is an issue with limited inventory, because I tried Max Items as '0' (meaning the player can have unlimited items) and there were no issues: ie, the key left my inventory when I asked it to, and in a second play through I was able to sell it without issue.
I'm not a coder, so I hope someone can help. If it's necessary, I'll continue the game with unlimited Items, but I'd rather have the limitation if someone can help me get it working properly.
Thanks,
James
I dont know if key items stacks, but if yo u want a limited inventory,
you can take a look to others or use if they stack <maxItem: x>
if you want max item of item ID x.
please note that <maxItem: x> can be incorrect, it is an option in the
YEP_EngineCore if not mistaken to set a different max item of a specific
item.
the error is something we need the console screenshot of the error when
it's popping up, you can press F8 and go to console tab which gives
details what the error is, to solve it easier.
I can't see any direct cause for your problem, but there are a few things that look suspicious
1) parallel processes are always a problem if they are used where not needed, especially if theyy do manipulate inventory and other things.
your cell map probably has an exit or door event to leave. I suggest you use that event to check for the numbers and either allow leaving or say "you should recruit more people" and refuse transfer.
Doing that way you won't need a parallel process at all as the test is triggered when the player tries to leave only.
2) yanfly's plugins are known to cause random effects when they are in the wrong order.
they have to be in exactly the order of the complete list on his website, top to bottom.
and we can't check that because you only gave an incomplete list of your plugins, so I suggest you carefully check that yourself.
3) please check all version numbers on all yanfly plugins, especially the core engine.
the latest core engine should have replaced the default error message in your screenshot with an advanced error message that contains most of the console output.
That it has not done this with your error is a strong indication that something is either wrong with your yanfly plugins, or that some of them are older versions.
EDIT:
4) what version is your project's rpg_core.js?
it might be an older version compared to your editor, especially if you have been working on the game for a longer time.
rpg_core.js is a file in your project folder, js subfolder. It is the base file for the engine itself and has nothing to do with any plugin.
you need to open that file with a text editor (don't doubleclick) and the engine version is listed in the title line. it should be 1.6.2, if there is no number it is 1.0
the last version of yanfly's core engine is 1.32, and I suspect you have an older one because most current yanfly plugins list their version in the plugin description.
But no matter what, the version will be listed somewhere in the help if you click on the help-button for the plugin
rpg_core.js v1.6.2
YEP_CoreEngine.js Version: 1.00
YEP_ItemCore.js Version: 1.00
go to yanfly's website and download the free pack and update those plugins contained in there
I don't know if the itemcore is in there, the base core will be there.
That seems to have done it. Thanks, Andar! ItemCore is in that pack, so I replaced both and now the item limitation is working as expected.
You should double check all of your Yanfly stuff - anything without a visible version number is very old, and may be incompatible with newer versions of MV or of the core plugins, causing further unexpected behavior.