Disallow Usage of Items for specific Actor / Class?

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
493
Reaction score
460
First Language
german
Primarily Uses
RMMZ
Somebody has a quick solution or Plugin in which I can forbid access to use Items for specific Actors or Classes? I want specific Actors to behave like summons or pets (beastmastery). If not, I would quickly write a Plugin for myself, but maybe someone already has some tips.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,383
Reaction score
1,263
First Language
Dutch
Primarily Uses
RMMV
there is one that forbid Equips though, but not items or skills,
skills specific might be one of yanfly plugins though, but still,
there is not for items.

combine armor, skills, items etc in 1 plugin is better than using 3 for the same purpose :p
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
698
Reaction score
219
First Language
Vietnamese
Primarily Uses
RMMV
I think Yanfly's Item Requirements can help do this. It provides you a way to forbid item usage via pieces of codes putting into the item's note tag. Take a look and follow his instructions on how to set up, and I hope your problem can be resolved.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
493
Reaction score
460
First Language
german
Primarily Uses
RMMZ
I think Yanfly's Item Requirements can help do this. It provides you a way to forbid item usage via pieces of codes putting into the item's note tag. Take a look and follow his instructions on how to set up, and I hope your problem can be resolved.
Good tip! But it's not exactly what I was looking for. I wish to remove or disable the "Use Item" Command during Battle completly when a pet is selected. Okay then I just do it by myself, it shouldn't be too difficult.

If anyone finds this thread because he has the same issue, after some years or whatever, feel free to contact me.
 

id0

Villager
Member
Joined
May 28, 2013
Messages
27
Reaction score
4
First Language
Russian
Primarily Uses
N/A
Good tip! But it's not exactly what I was looking for. I wish to remove or disable the "Use Item" Command during Battle completly when a pet is selected. Okay then I just do it by myself, it shouldn't be too difficult.

If anyone finds this thread because he has the same issue, after some years or whatever, feel free to contact me.

Were you able to do it?
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
493
Reaction score
460
First Language
german
Primarily Uses
RMMZ
Were you able to do it?
In the mean time I just programmed a Plugin that disables Item Command for any Actor except the first one, as I had only one Protagonist and the rest were pets. Super simple but works fine for me :)

If I need it to be more flexible I could extend it.
 

id0

Villager
Member
Joined
May 28, 2013
Messages
27
Reaction score
4
First Language
Russian
Primarily Uses
N/A
In the mean time I just programmed a Plugin that disables Item Command for any Actor except the first one, as I had only one Protagonist and the rest were pets. Super simple but works fine for me :)

If I need it to be more flexible I could extend it.

Can you share the code? I have some item (vodka for example) only special actor can use. But in the game menu.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
493
Reaction score
460
First Language
german
Primarily Uses
RMMZ
Sure, but I don't think it fits your needs. But I can think about making a more flexible Plugin ;)

Code:
// Override
Window_ActorCommand.prototype.addItemCommand = function() {
    if (this._actor && this._actor._actorId == 1)
        this.addCommand(TextManager.item, 'item');
};

As you can see, it just overrides the Battle Menu and removes Item Command when the actor Id is not 1.
 
  • Like
Reactions: id0

id0

Villager
Member
Joined
May 28, 2013
Messages
27
Reaction score
4
First Language
Russian
Primarily Uses
N/A
A, I see. Thanks anyway)
 

Latest Threads

Latest Posts

Latest Profile Posts

I know it looks more like a apple but...its a cherry, his name is: Cherry Knight
i just started uploading some of my selfmade Pixel Art on DA,
visit me there if you are interrested^^
Im sorry but..I Want to play a game.
Anyone here is familiar with the US Law ? I'm working on a game idea at the moment and I have several questions on my mind :p

Forum statistics

Threads
109,108
Messages
1,042,151
Members
141,603
Latest member
MarkStudios
Top