I'm using Yanfly's Item Core plugin for my project, and I am grateful for the slew of mechanics it introduces. I am making some aesthetic alterations to it to best suit my project and give it a more unique feel, which have been going smoothly until I hit this problem. One of the things about the script that bothers me is selecting any item, whether it can be used or not opens up this little command window where you need to select to use the item. I know that other options can be added there, but when "Use" is the only one present it looks weird and it feels tedious, especially if it's a key item or an item that can only be used in battle, making the menu entirely pointless, like this:
The only time this window is relevant to me is for weapons and armor, as I am using Yanfly's attachable augments system to allow the player to customize equipment. What I would like is for the game to be able to differentiate between usable items, unusable items, and weapons, and respond accordingly:
Item is usable - Go straight to the actor selection window
Item is not usuable - item is grayed out and selecting it sounds the buzzer
Item is a weapon or armor - open the command window.
In the case of weapons and armor, I have figured out how to remove the "use" command from the command window, so no assistance is required there. I believe I have found the clause which opens up the command window.
I would guess the solution would involve creating an if clause somewhere around this. The game is certainly able to differentiate between usable items, unusable ones and equipment, so it's just a matter of phrasing it right. Any help on this would be much appreciated.
The only time this window is relevant to me is for weapons and armor, as I am using Yanfly's attachable augments system to allow the player to customize equipment. What I would like is for the game to be able to differentiate between usable items, unusable items, and weapons, and respond accordingly:
Item is usable - Go straight to the actor selection window
Item is not usuable - item is grayed out and selecting it sounds the buzzer
Item is a weapon or armor - open the command window.
In the case of weapons and armor, I have figured out how to remove the "use" command from the command window, so no assistance is required there. I believe I have found the clause which opens up the command window.
Code:
Scene_Item.prototype.createActionWindow = function() {
var wy = this._itemWindow.y;
this._itemActionWindow = new Window_ItemActionCommand(0, wy);
this._itemActionWindow.setHandler('use', this.onActionUse.bind(this));
this._itemActionWindow.setHandler('cancel', this.onActionCancel.bind(this));
this.addWindow(this._itemActionWindow);
};
I would guess the solution would involve creating an if clause somewhere around this. The game is certainly able to differentiate between usable items, unusable ones and equipment, so it's just a matter of phrasing it right. Any help on this would be much appreciated.