For Items, Weapons, & Armor that can't be "used" is it possible to remove the command that says "Use [Item]" instead of just graying it out? And by "use" I don't mean equip, which is a totally different function than what I'm referring to.
Remove "Use [Item]" Command?
RPG Maker MV SupportIt seems like Hime might have done a plugin for that already:
Here's one for battles:
And one for menus:
Here's one for battles:
Actor Battle Commands
This plugin provides advanced battle command manage functionality that allows you to manage each and every one of your actors' battle commands.You can choose what commands an actor will be able
himeworks.com
And one for menus:
Menu Command Manager
https://www.youtube.com/watch?v=ncfMXeMOz84n RPG Maker, you have access to a number of commands in the menu.You can also disable some of them using events, such as the save command, or the fo
himeworks.com
Is this the default menu or a custom menu?
You beat me to it. I was going to request hime scripts as well. The majority of scripts in projects i make are from himeworks
Yeah, I'm using a few Hime plugins as well and the Menu thing is something I'm also considering since I may have temporary members and some won't be able to do certain things. It's just to try and add more diversity to the cast.
That's actually not what I mean, here's a screenshot to what I'm referring to:
Instead of it being grayed out, I'd rather it just not be there. The same goes for weapons and armor, which actually bugs me more than the items.
Instead of it being grayed out, I'd rather it just not be there. The same goes for weapons and armor, which actually bugs me more than the items.
I believe that's from Yanfly's Item Core plugin:
www.yanfly.moe
I had a quick look through the code for it and I think this might work (untested):
You could try importing this as a plugin, loading [immediately?] after Item Core. 🙂
Item Core (YEP) - Yanfly.moe Wiki
JavaScript:
(function(alias) {
// only add "Use" command if item can be used
Window_ItemActionCommand.prototype.addUseCommand = function() {
if (this.isEnabled(this._item)) alias.apply(this, arguments);
};
})(Window_ItemActionCommand.prototype.addUseCommand);
The thread may be old but i found an other way to do this. Your code disable the "use" command but we still can select the item. Which is frustrating 'cause when we do it it only show the cancel option. So I thought that it may be more interesting to make the "unusable" items litteraly "unusable". Just put that code after YEP ItemCore and enjoy.
(function() {
var _Window_ItemList_isEnabled = Window_ItemList.prototype.isEnabled;
Window_ItemList.prototype.isEnabled = function(item) {
var isUsable = _Window_ItemList_isEnabled.call(this, item);
if (!isUsable) {
return false;
}
return true;
};
var _Scene_Item_onItemOk = Scene_Item.prototype.onItemOk;
Scene_Item.prototype.onItemOk = function() {
var item = this.item();
if (!$gameParty.canUse(item)) {
this._itemWindow.activate();
return;
}
_Scene_Item_onItemOk.call(this);
};
})();
(function() {
var _Window_ItemList_isEnabled = Window_ItemList.prototype.isEnabled;
Window_ItemList.prototype.isEnabled = function(item) {
var isUsable = _Window_ItemList_isEnabled.call(this, item);
if (!isUsable) {
return false;
}
return true;
};
var _Scene_Item_onItemOk = Scene_Item.prototype.onItemOk;
Scene_Item.prototype.onItemOk = function() {
var item = this.item();
if (!$gameParty.canUse(item)) {
this._itemWindow.activate();
return;
}
_Scene_Item_onItemOk.call(this);
};
})();
@cacamarx - OK, but as seen in the screenshot in post 6, the OP of this thread was using another plugin to add a "Discard" option. Your code might work as you say, but it is not strictly what was requested in this case.
This thread is over 4 years old, like you said, and the OP has since been banned. So:
This thread is over 4 years old, like you said, and the OP has since been banned. So:
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/remove-use-item-command.124551/