Bypassing Item Info Window in Yanfly's Item Core

Crystal Flareon

Villager
Member
Joined
Oct 31, 2015
Messages
11
Reaction score
16
First Language
Klingon
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.

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.
 

Zoey

Warper
Member
Joined
Jul 24, 2014
Messages
2
Reaction score
0
First Language
Hungarian
Primarily Uses
RMXP
Bump! :)
This is exactly what I am looking for as well. Did you, by any chance, figure it out since then?
 

bohutang

Villager
Member
Joined
Oct 24, 2016
Messages
24
Reaction score
4
First Language
china
Primarily Uses
This problem also bothers me, if you find a solution, I hope to share it. Thank you.
 

Zoey

Warper
Member
Joined
Jul 24, 2014
Messages
2
Reaction score
0
First Language
Hungarian
Primarily Uses
RMXP

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Love it when someone confuses "RPG Maker (or script/plugin) has a bug" with "I didn't set it up right and it's not working as I want (or gives an error)"
Is animation really as hard as I think it is?
Out of sudden, snow. Everywhere.
Blech. I hate coming up with stories. Making gameplay is fun but coming up with lore and reasons for these areas/mechanics just makes me sleepy.

Forum statistics

Threads
94,575
Messages
922,009
Members
124,441
Latest member
nanaya07
Top