Isn't it really easy to test that by disabling the plugin and using some items? O__o
But no, default MZ does not close the window automatically when you run out of items.
Isn't it really easy to test that by disabling the plugin and using some items? O__o
Only kind of. Common events trigger after the item is used and consumed, so the player of the game would select the target, the item goes away.
I'm not sure what to tell you. As I said in the post you quoted, it works in my tests 😉
Tested it in both a new game project and my project and here are the results:
That would never work, you should always follow notetag formats as written. Incidentally, you also didn't do this by omitting the spaces that I showed in my example notetag, but in this case that didn't hurt anything (in some plugins, it could).
Good call, that would be exactly the reason. So, modify the code as below:
Game_Action.prototype.hasItemAnyValidEffects = function(target) {
if ($dataItems[this.item().id].meta.notClass)
{
var classArray=$dataItems[this.item().id].meta.notClass.split(',').map(element => element=Number(element));
if (classArray.includes(target.currentClass().id))
return false;
}
return this.item().effects.some(effect =>
this.testItemEffect(target, effect)
);
};
<notClass: 2,24,35,64>That got it! Glad I could help with it and squish this bug with you. Thank you once again for your help!
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-skill-learning-items-be-restricted-by-class.148995/